Hide title/favicon title in the doorhanger if they don't exist

RESOLVED FIXED in Firefox 43

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: liuche, Assigned: sebastian)

Tracking

Trunk
Firefox 43
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox41 affected, firefox43 fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
For pages like file:/// that don't have a title/favicon, set the title/favicon doorhanger elements as GONE.
(Reporter)

Comment 1

3 years ago
Created attachment 8625784 [details]
Screenshot: Doorhanger with blank title/favicon

Margaret, want to upload your xpi for testing?
Flags: needinfo?(margaret.leibovic)
Summary: Hide title/favicon title if they don't exist → Hide title/favicon title in the doorhanger if they don't exist

Comment 2

3 years ago
(In reply to Chenxia Liu [:liuche] from comment #1)
> Created attachment 8625784 [details]
> Screenshot: Doorhanger with blank title/favicon
> 
> Margaret, want to upload your xpi for testing?

I don't think this has to do with the XPI. Any XPI hosted locally on your file system would do it.

You could just use the boilerplate add-on for this:
https://github.com/mozilla/firefox-for-android-addons/tree/master/boilerplate/native-ui-boilerplate
Flags: needinfo?(margaret.leibovic)
(Assignee)

Comment 3

3 years ago
This has annoyed me a lot recently while developing add-ons and APIs. I'm going to fix that. :)
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
(Assignee)

Comment 4

3 years ago
Created attachment 8646920 [details] [diff] [review]
1177124-doorhanger-title.patch
Attachment #8646920 - Flags: review?(liuche)
(Reporter)

Comment 5

3 years ago
Comment on attachment 8646920 [details] [diff] [review]
1177124-doorhanger-title.patch

Review of attachment 8646920 [details] [diff] [review]:
-----------------------------------------------------------------

One comment - up to you what you decide though.

::: mobile/android/base/DoorHangerPopup.java
@@ +309,5 @@
>              show();
>              return;
>          }
>  
> +        final Bitmap favicon = tab.getFavicon();

I wonder if this should be in Doorhanger.showTitle - I think we can assume that if both the favicon is null and the string is empty, we don't want to just show a blank space. I'm not sure what we'd want to do if there is no title but a favicon exists - but that seems like an edge-enough case that I don't care one way or the other. (e.g., who remembers to add a favicon but forgets the title?)
Attachment #8646920 - Flags: review?(liuche) → review+
(Assignee)

Comment 6

3 years ago
url:        https://hg.mozilla.org/integration/fx-team/rev/0bfda075f48486c4b6bdda5750cb307d59c1d3e9
changeset:  0bfda075f48486c4b6bdda5750cb307d59c1d3e9
user:       Sebastian Kaspari <s.kaspari@gmail.com>
date:       Wed Aug 12 15:30:57 2015 +0200
description:
Bug 1177124 - Doorhanger: Hide title/favicon if they don't exist. r=liuche
https://hg.mozilla.org/mozilla-central/rev/0bfda075f484
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
You need to log in before you can comment on or make changes to this bug.