summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/page-info.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/desktop/page-info.c b/desktop/page-info.c
index 79701d2f7..6467b60d4 100644
--- a/desktop/page-info.c
+++ b/desktop/page-info.c
@@ -462,11 +462,18 @@ static nserror page_info__layout(
{
int cur_y = 0;
int max_x = 0;
+ enum nsurl_scheme_type scheme;
+
+ scheme = nsurl_get_scheme_type(browser_window_access_url(pi->bw));
cur_y += pi->window_padding;
for (unsigned i = 0; i < PI_ENTRY__COUNT; i++) {
struct page_info_entry *entry = pi->entries + i;
+ if (i == PI_ENTRY_CERT && scheme != NSURL_SCHEME_HTTPS) {
+ continue;
+ }
+
switch (entry->type) {
case PAGE_INFO_ENTRY_TYPE_TEXT:
cur_y += entry->u.text.height;
@@ -576,6 +583,7 @@ nserror page_info_redraw(
const struct redraw_context *ctx)
{
struct redraw_context new_ctx = *ctx;
+ enum nsurl_scheme_type scheme;
struct rect r = {
.x0 = clip->x0 + x,
.y0 = clip->y0 + y,
@@ -585,6 +593,8 @@ nserror page_info_redraw(
int cur_y = 0;
nserror err;
+ scheme = nsurl_get_scheme_type(browser_window_access_url(pi->bw));
+
/* Start knockout rendering if it's available for this plotter. */
if (ctx->plot->option_knockout) {
bool res = knockout_plot_start(ctx, &new_ctx);
@@ -602,6 +612,10 @@ nserror page_info_redraw(
const struct page_info_entry *entry = pi->entries + i;
int cur_x = pi->window_padding;
+ if (i == PI_ENTRY_CERT && scheme != NSURL_SCHEME_HTTPS) {
+ continue;
+ }
+
switch (entry->type) {
case PAGE_INFO_ENTRY_TYPE_TEXT:
err = page_info__redraw_text_entry(
@@ -704,15 +718,22 @@ nserror page_info_mouse_action(
int y,
bool *did_something)
{
+ enum nsurl_scheme_type scheme;
int cur_y = 0;
nserror err;
+ scheme = nsurl_get_scheme_type(browser_window_access_url(pi->bw));
+
cur_y += pi->window_padding;
for (unsigned i = 0; i < PI_ENTRY__COUNT; i++) {
struct page_info_entry *entry = pi->entries + i;
bool hovering = false;
int height;
+ if (i == PI_ENTRY_CERT && scheme != NSURL_SCHEME_HTTPS) {
+ continue;
+ }
+
switch (entry->type) {
case PAGE_INFO_ENTRY_TYPE_TEXT:
cur_y += entry->u.text.height;