Closed
Bug 755062
Opened 12 years ago
Closed 12 years ago
It is too easy to enable flash for sites
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox14 verified, firefox15 verified, blocking-fennec1.0 betaN+, fennec+)
VERIFIED
FIXED
Firefox 15
People
(Reporter: kbrosnan, Assigned: Margaret)
References
Details
(Keywords: uiwanted, ux-error-prevention)
Attachments
(1 file, 1 obsolete file)
4.64 KB,
patch
|
mfinkle
:
review+
jaws
:
feedback+
mfinkle
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
From the release sign off enabling Flash is too easy. The door hanger tends to get the user to enable flash for the whole site.
Comment 1•12 years ago
|
||
Click-to-play in desktop Firefox just puts an icon in the urlbar. The doorhanger doesn't appear unless you click the icon. We could do the same in Fennec, especially if we implemented a general method for collapsing and re-showing doorhangers (bug 700437).
Depends on: 700437
Keywords: uiwanted,
ux-error-prevention
Reporter | ||
Updated•12 years ago
|
blocking-fennec1.0: --- → ?
Updated•12 years ago
|
tracking-fennec: ? → +
blocking-fennec1.0: ? → betaN+
Comment 2•12 years ago
|
||
Margaret - What do you think about hiding the doorhanger if any flash plugin is ivisible on the page. So we only show the doorhanger if the plugins on the page are not visible or too small to show the placeholder.
Assignee: nobody → margaret.leibovic
Assignee | ||
Comment 3•12 years ago
|
||
This is a tricky issue. You'll want to see bug 734323. Previously, we would wait until the load event to decide whether or not to show the doorhanger, but the problem was that we wouldn't end up showing the doorhanger if an invisible plugin was added to the DOM after the load event had already fired. The solution to this was to decide whether or not to show the doorhanger for each PluginClickToPlay event. We could add some logic to see whether or not we've already processed a visible plugin, and not show the doorhanger in that case, but if an invisible plugin is added before a visible one, we'll still end up showing the doorhanger. I think this is probably as good of a solution as we'll be able to get. Adding Jared in case he has ideas.
Comment 4•12 years ago
|
||
Warning: Hack Ahead What if we delayed sending the doorhanger request in the PluginClickToPlay event. If we saw an invisible plugin and delayed 500ms, and then a visible plugin was found - we could cancel the timeout on the doorhanger request. We would only do the delay while the page was loading, by using "oad" or "pageshow" or something. I did warn you!
Comment 5•12 years ago
|
||
Yeah, we could do a hack like that. On another note, we could remove the checked-by-default site-wide enabling of Flash.
Reporter | ||
Comment 6•12 years ago
|
||
UX had issue with that as the user would get this notification every time they went to a site (with flash).
Comment 7•12 years ago
|
||
Then it looks like we will just have to bump up the priority for bug 700437.
Assignee | ||
Comment 8•12 years ago
|
||
If we're going to need bug 700437 to fix this completely, I don't think this should be a beta blocker. I think we could try to land mfinkle's hack idea for beta, but bug 700437 feels to risky at this point, especially since the UX for it isn't spec-ed out yet.
Assignee | ||
Comment 9•12 years ago
|
||
The logic is a little tricksy here, so I tried to make sure the comments explained things well enough. To test this, I made a test page that includes an invisible plugin, then adds a visible plugin after the page has finished loading: http://people.mozilla.com/~mleibovic/test/invisible_and_visible_embeds.html. I also checked some of Martijn's many test cases to make sure this didn't regress other behavior: http://people.mozilla.org/~mwargers/tests/plugins/flash/.
Attachment #626094 -
Flags: review?(mark.finkle)
Attachment #626094 -
Flags: feedback?(jaws)
Comment 10•12 years ago
|
||
Comment on attachment 626094 [details] [diff] [review] only show the doorhanger if visible plugins don't get added in the near future Review of attachment 626094 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/chrome/content/browser.js @@ +2120,5 @@ > + if (!this.pluginDoorhangerTimeout) { > + this.pluginDoorhangerTimeout = setTimeout(function() { > + if (!this.clickToPlayPluginDoorhangerShown && !this.pluginOverlayVisible) > + PluginHelper.showDoorHanger(this); > + }.bind(this), 500); We're going to need to clearTimeout on this on pagehide.
Attachment #626094 -
Flags: feedback?(jaws) → feedback+
Comment 11•12 years ago
|
||
Comment on attachment 626094 [details] [diff] [review] only show the doorhanger if visible plugins don't get added in the near future Agreed about the clearTimeout comment. Also, could we somehow combine clickToPlayPluginDoorhangerShown and pluginOverlayVisible into a single flag? I cringe at adding one-off boolean flags.
Assignee | ||
Comment 12•12 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #11) > Comment on attachment 626094 [details] [diff] [review] > only show the doorhanger if visible plugins don't get added in the near > future > > Agreed about the clearTimeout comment. Also, could we somehow combine > clickToPlayPluginDoorhangerShown and pluginOverlayVisible into a single > flag? I cringe at adding one-off boolean flags. We use clickToPlayPluginDoorhangerShown to decide if we need to make a NativeWindow.doorhanger.hide() call. If we combine the flags, we'd end up making that call a lot more, which means a message to Java, and I'm not sure if it's worth it. Actually, I just discovered that we can run into a NPE in Tab.removeDoorHanger() if we try to remove a non-existent doorhanger, and that's pretty bad, especially since that's theoretically possible in our current code. I'll file a bug to fix that ASAP.
Assignee | ||
Comment 13•12 years ago
|
||
(In reply to Margaret Leibovic [:margaret] from comment #12) > Actually, I just discovered that we can run into a NPE in > Tab.removeDoorHanger() if we try to remove a non-existent doorhanger, and > that's pretty bad, especially since that's theoretically possible in our > current code. I'll file a bug to fix that ASAP. Nevermind, I'm dumb. HashMap's remove method won't throw, so this isn't an issue.
Assignee | ||
Comment 14•12 years ago
|
||
This patch combines the flags into a single shouldShowPluginDoorhanger flag. However, this has the negative quality that we'll always be making a call to hide the doorhanger when the user clicks on an overlay to activate a plugin (keeping a check for !shouldShowPluginDoorhanger doesn't really make sense, since that should always be true if the user is clicking on a visible plugin). Up to you, I can switch back to the two flags, or keep this as is
Attachment #626094 -
Attachment is obsolete: true
Attachment #626094 -
Flags: review?(mark.finkle)
Attachment #626281 -
Flags: review?(mark.finkle)
Updated•12 years ago
|
Attachment #626281 -
Flags: feedback+
Comment 15•12 years ago
|
||
Comment on attachment 626281 [details] [diff] [review] updated patch I'm OK with sending the message to hide the doorhanger unconditionally. It shouldn't be a performance impact. The Tab class is becoming large (lots of data memebrs) and I worry about maintainability. I can file a new bug about re-organizing it a bit.
Attachment #626281 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 16•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8e017a0a0f6b
Target Milestone: --- → Firefox 15
Comment 17•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8e017a0a0f6b
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 18•12 years ago
|
||
Comment on attachment 626281 [details] [diff] [review] updated patch [Triage Comment]
Attachment #626281 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 19•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/6a19f69f6f95
status-firefox14:
--- → fixed
status-firefox15:
--- → fixed
Comment 20•12 years ago
|
||
This works exactly like it is described in comment #15 on all branches. Closing bug as verified fixed on: Firefox 15.0a1 (2012-05-31) Firefox 14.0a2 (2012-05-31) Firefox 14.0b4 (2012-05-31) Device: Samsung Galaxy Nexus OS: Android 4.0.2
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•