Closed
Bug 980943
Opened 11 years ago
Closed 9 years ago
Closing the CTP overlay and then clicking on it trigger the CTP pop-up and restore the "Activate" text
Categories
(Core Graveyard :: Plug-ins, defect, P4)
Core Graveyard
Plug-ins
Tracking
(firefox42 fixed)
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: pauly, Assigned: rowbot, Mentored)
References
Details
(Whiteboard: [diamond] [lang=js] [good next bug])
Attachments
(2 files, 3 obsolete files)
3.01 KB,
patch
|
mconley
:
review+
|
Details | Diff | Splinter Review |
1.35 KB,
patch
|
mconley
:
review+
|
Details | Diff | Splinter Review |
STR:
1. Set Flash to 'Ask to Activate'
2. Open a youtube video
3. Close the CTP overlay from the X button
4. Click on the overlay
AR: The CTP popup shows up and the "Activate" text is restored
Nightly 30.0a1 (2014-03-07), Win 7 x64
Reporter | ||
Comment 1•11 years ago
|
||
Regression of bug 853973
Comment 2•11 years ago
|
||
Will probably be fixed by bug 979318, taking this to keep track.
Assignee: nobody → georg.fritzsche
OS: Windows 7 → All
Priority: -- → P4
Hardware: x86_64 → All
Updated•11 years ago
|
Flags: firefox-backlog?
Updated•11 years ago
|
Assignee: georg.fritzsche → nobody
Updated•11 years ago
|
Flags: firefox-backlog? → firefox-backlog+
Reporter | ||
Comment 3•11 years ago
|
||
Not fixed by bug 979318.
Comment 4•11 years ago
|
||
The overlay click listener is added here:
http://hg.mozilla.org/mozilla-central/annotate/882826199076/browser/base/content/browser-plugins.js#l600
For this bug it should be enough to remove the listener in the close button handler:
http://hg.mozilla.org/mozilla-central/annotate/882826199076/browser/base/content/browser-plugins.js#l391
We should add test-coverage to this test here:
http://dxr.mozilla.org/mozilla-central/source/browser/base/content/test/plugins/browser_CTP_hide_overlay.js
This involves synthesizing a mouse click on the element and checking that the notification is still dismissed, similar to here:
http://hg.mozilla.org/mozilla-central/annotate/882826199076/browser/base/content/test/plugins/browser_pluginnotification.js#l460
Whiteboard: 853973 → p=3 [mentor=gfritzsche] [lang=js] [good-next-bug]
Comment 5•11 years ago
|
||
... and finally, running the relevant test here is done by:
> mach mochitest-browser browser/base/content/test/plugins/browser_CTP_hide_overlay.js
Updated•10 years ago
|
Mentor: georg.fritzsche
Whiteboard: p=3 [mentor=gfritzsche] [lang=js] [good-next-bug] → p=3 [lang=js] [good-next-bug]
Comment 6•10 years ago
|
||
Hi,
I am interested in working on this bug. So please can you assign it to me?
Thanks in advance,
Regards,
Anup.
Comment 7•10 years ago
|
||
Anup, we typically don't assign owners until you've submitted your first patch. Please feel free to work on this anyway! Let Georg or me know if you have questions.
Updated•10 years ago
|
Points: --- → 3
Whiteboard: p=3 [lang=js] [good-next-bug] → [diamond] [lang=js] [good-next-bug]
Updated•10 years ago
|
Whiteboard: [diamond] [lang=js] [good-next-bug] → [diamond] [lang=js] [good next bug]
Assignee | ||
Comment 8•9 years ago
|
||
Remove the click event listener from the CTP overlay after the user dismisses the overlay.
Attachment #8630063 -
Flags: review?(gfritzsche)
Assignee | ||
Comment 9•9 years ago
|
||
Test that the overlay remains hidden and that no plugin notification is shown when clicking on the overlay after it is dismissed by the user.
Comment 10•9 years ago
|
||
Attachment #8630063 -
Flags: review?(gfritzsche) → review?(mconley)
Assignee | ||
Comment 11•9 years ago
|
||
I forgot to request review for the patch in comment 9 as well, but I don't have the ability to add a review request after the fact. So, if you would kindly review that patch as well, I would appreciate it. And when you get a chance, could you assign this bug to me? Thanks!
Updated•9 years ago
|
Assignee: nobody → smokey101stair
Comment 12•9 years ago
|
||
Attachment #8630064 -
Flags: review?(mconley)
Comment 13•9 years ago
|
||
Comment on attachment 8630064 [details] [diff] [review]
bug980943_test.diff
Review of attachment 8630064 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for the test! This looks good - just one suggestion.
::: browser/base/content/test/plugins/browser_CTP_hide_overlay.js
@@ +83,5 @@
> + // Simulate clicking on the overlay.
> + utils.sendMouseEvent("mousedown", overlayLeft, overlayTop, 0, 1, 0, false, 0, 0);
> + utils.sendMouseEvent("mouseup", overlayLeft, overlayTop, 0, 1, 0, false, 0, 0);
> +
> + return plugin && overlay.classList.contains("visible");
This will return false if plugin is not defined, which will cause the test to pass.
I think I'd prefer this to return true if what is expected is true, namely:
let overlayHidden = yield ContentTask.spawn(... {
// ...
return plugin && !overlay.classList.contains("visible");
}
And then:
ok(notification.dismissed, "No notification should be shown");
ok(overlayHidden, "Overlay should be hidden");
Attachment #8630064 -
Flags: review?(mconley) → review-
Comment 14•9 years ago
|
||
Comment on attachment 8630063 [details] [diff] [review]
bug980943_remove_event_listener.diff
Review of attachment 8630063 [details] [diff] [review]:
-----------------------------------------------------------------
This breaks the case when the overlay is closed, and then re-opened.
STR:
1) Click on X to close the overlay
2) Right click on the plugin area
3) Choose "Activate this plugin" from the context menu
4) Ignore the doorhanger, and try clicking on the plugin overlay
ER:
The doorhanger should re-show
AR:
The doorhanger does not re-show, since we had removed the click event handler in step 1.
There's so much state involved with this overlay, it's kinda madness. What I'd suggest we do is tie the handling of the click event to the visibility class of the overlay.
So instead of removing the click event listener, can you try doing a check in onOverlayClick for the visibility of the overlay, and ignoring the event if the overlay is not visible?
Attachment #8630063 -
Flags: review?(mconley) → review-
Assignee | ||
Comment 15•9 years ago
|
||
> So instead of removing the click event listener, can you try doing a check in
> onOverlayClick for the visibility of the overlay, and ignoring the event if the
> overlay is not visible?
Done. This works now with your STR in comment 14.
Attachment #8630063 -
Attachment is obsolete: true
Attachment #8631159 -
Flags: review?(mconley)
Assignee | ||
Comment 16•9 years ago
|
||
Implemented your suggestions so that the test fails if plugin is undefined.
Attachment #8630064 -
Attachment is obsolete: true
Attachment #8631165 -
Flags: review?(mconley)
Comment 17•9 years ago
|
||
Comment on attachment 8631159 [details] [diff] [review]
bug980943_check_visibility_on_click.diff
Review of attachment 8631159 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with these last changes. Thanks!
::: browser/modules/PluginContent.jsm
@@ +627,4 @@
> // Have to check that the target is not the link to update the plugin
> if (!(event.originalTarget instanceof contentWindow.HTMLAnchorElement) &&
> (event.originalTarget.getAttribute('anonid') != 'closeIcon') &&
> + overlay.classList.contains('visible') && event.button == 0 && event.isTrusted) {
Busted indentation - this should be aligned with the ! and the ( in the two lines above.
Also, let's break up the next && term onto the next lines, so:
overlay.classList.contains("visible") &&
event.button == 0 &&
event.isTrusted)
Attachment #8631159 -
Flags: review?(mconley) → review+
Comment 18•9 years ago
|
||
Comment on attachment 8631165 [details] [diff] [review]
bug980943_test v2
Review of attachment 8631165 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great, thanks!
Attachment #8631165 -
Flags: review?(mconley) → review+
Assignee | ||
Comment 19•9 years ago
|
||
Fixed indentation and broke it into multiple lines as suggested.
Asking for re-review since I made changes.
Whats the actual policy on this anyways, it's not clear to me? So, you gave my patch an r+ on the basis that I would make a few simple changes, which I am more than happy to make. Do I still need to request review after making those changes or do I just attach a new patch with the changes in it and obsolete the old one without requesting another review? I'd hate to waste people's time asking for reviews if it's not necessary to do so.
Also, I don't have the ability to do push a try run, so that is something you will need to do for me.
Attachment #8631159 -
Attachment is obsolete: true
Attachment #8631187 -
Flags: review?(mconley)
Comment 20•9 years ago
|
||
Comment on attachment 8631187 [details] [diff] [review]
bug980943_check_visibility_on_click v2
Review of attachment 8631187 [details] [diff] [review]:
-----------------------------------------------------------------
(In reply to Trevor Rowbotham from comment #19)
> Created attachment 8631187 [details] [diff] [review]
> bug980943_check_visibility_on_click v2
>
> Fixed indentation and broke it into multiple lines as suggested.
>
> Asking for re-review since I made changes.
>
> Whats the actual policy on this anyways, it's not clear to me? So, you gave
> my patch an r+ on the basis that I would make a few simple changes, which I
> am more than happy to make. Do I still need to request review after making
> those changes or do I just attach a new patch with the changes in it and
> obsolete the old one without requesting another review? I'd hate to waste
> people's time asking for reviews if it's not necessary to do so.
Heh, yeah, sorry, that was my fault. So, for people who have landing abilities, an r+ with fix basically means "Just fix these things, and land r=me". But because you don't have direct landing privileges, it makes less sense for you. I should have r-'d, and I'm sorry for the confusion.
But this version of the patch looks good, so r=me. :)
>
> Also, I don't have the ability to do push a try run, so that is something
> you will need to do for me.
I can definitely do that for you.
Attachment #8631187 -
Flags: review?(mconley) → review+
Comment 21•9 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c49ee71cdade
Needinfo'ing myself to check-in once this comes back green.
Flags: needinfo?(mconley)
Assignee | ||
Comment 22•9 years ago
|
||
> Heh, yeah, sorry, that was my fault. So, for people who have landing abilities, an r+ with fix basically means "Just fix
> these things, and land r=me". But because you don't have direct landing privileges, it makes less sense for you. I should
> have r-'d, and I'm sorry for the confusion.
It's all good. Thanks for the explanation, that makes sense.
Comment 23•9 years ago
|
||
(In reply to Mike Conley (:mconley) - Needinfo me! from comment #21)
> Try push:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=c49ee71cdade
>
> Needinfo'ing myself to check-in once this comes back green.
Green!
Flags: needinfo?(mconley)
Keywords: checkin-needed
Assignee | ||
Comment 24•9 years ago
|
||
Awesome! Thanks for checking this in for me.
Comment 25•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e2d0420db83f
https://hg.mozilla.org/integration/mozilla-inbound/rev/ce793a58a526
Keywords: checkin-needed
Comment 26•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e2d0420db83f
https://hg.mozilla.org/mozilla-central/rev/ce793a58a526
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Comment 27•9 years ago
|
||
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•