Closed
Bug 933462
Opened 12 years ago
Closed 11 years ago
[e10s] Popup blocker notifications don't work in e10s
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 31
People
(Reporter: billm, Assigned: billm)
References
(Depends on 2 open bugs, Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
|
19.93 KB,
patch
|
Felipe
:
review+
|
Details | Diff | Splinter Review |
The path is roughly as follows:
1. nsGlobalWindow fires a DOMPopupBlocked event.
2. browser.xml handles it, adds to a list of "page reports", and calls triggers a DOMUpdatePageReport event.
3. browser.js handles that event via gPopupBlockerObserver.
We'll need to handle the DOMPopupBlocked in a content script and then send a message to the parent. Hopefully the UI steps can remain the same after that. The final step of allowing popups goes though Services.perms via toggleAllowPopupsForSite. I'm not sure how that code works.
| Assignee | ||
Comment 1•11 years ago
|
||
This was pretty straightforward.
Comment 2•11 years ago
|
||
Comment on attachment 8390136 [details] [diff] [review]
popup-blocking
Can we get rid of the stupid "pageReports" name while we're at it? It's a horrible old name that is meaningless.
"blockedPopup" or "blockedPopupInfo" would be better.
| Assignee | ||
Comment 3•11 years ago
|
||
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #2)
> Comment on attachment 8390136 [details] [diff] [review]
> popup-blocking
>
> Can we get rid of the stupid "pageReports" name while we're at it? It's a
> horrible old name that is meaningless.
>
> "blockedPopup" or "blockedPopupInfo" would be better.
I can change it in most places. Changing the one in browser.xml is a little trickier because we use that field in Firefox desktop, android, and metro. I think a good compromise would be to support a new name and the old name in browser.xml and start using the new name in Firefox desktop. Then we can file bugs to fix android and metro, and hopefully those teams can take care of fixing it and testing the fix (which is that part I'm reluctant to do).
Comment 4•11 years ago
|
||
That sounds great - thanks!
| Assignee | ||
Comment 5•11 years ago
|
||
This mostly gets rid of pageReports.
Attachment #8390136 -
Attachment is obsolete: true
Attachment #8390136 -
Flags: review?(felipc)
Attachment #8390807 -
Flags: review?(felipc)
Comment 6•11 years ago
|
||
Comment on attachment 8390807 [details] [diff] [review]
popup-blocking v2
Review of attachment 8390807 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/base/content/browser.js
@@ +512,1 @@
> var uri = gBrowser.currentURI;
change this to browser.currentURI ?
@@ +541,5 @@
> var foundUsablePopupURI = false;
> + var blockedPopups = browser.blockedPopups;
> + if (blockedPopups) {
> + for (let i = 0; i < blockedPopups.length; i++) {
> + let blockedPopup = blockedPopups[i];
why not keep the for as |(let blockedPopup of blockedPopups)| ?
Attachment #8390807 -
Flags: review?(felipc) → review+
| Assignee | ||
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
Comment 9•11 years ago
|
||
(In reply to :Felipe Gomes from comment #6)
> why not keep the for as |(let blockedPopup of blockedPopups)| ?
(because we need "i" later down)
| Assignee | ||
Comment 10•11 years ago
|
||
Sorry, I should have been more explicit. Felipe and i talked about it on IRC.
Comment 11•11 years ago
|
||
Huh, at some point between the attached patch and the checkin the type of popupWindowURI mysteriously changed from a URI to a string...
| Assignee | ||
Comment 12•11 years ago
|
||
I noticed that the version of the patch where it was a URI was broken because we were sending the URI over a message manager, which doesn't support URIs. Do you want me to change the name to popupWindowURL?
Comment 13•11 years ago
|
||
Henrik, I wonder if we should have an e10s testrun in Mozmill which runs our existing tests with e10s pref'd on to catch bugs like this? FWIW, I'd be fine if we isolated this to Nightly testruns for now.
Flags: in-qa-testsuite?(hskupin)
Comment 14•11 years ago
|
||
This was backed out from Fx32 in bug 1024391. Due to time constraints, it will be shipping as-is in Fx31. Hopefully Fx33 will contain a proper fix for bug 1024391 while leaving this fix in place.
Comment 15•11 years ago
|
||
Comment on attachment 8390807 [details] [diff] [review]
popup-blocking v2
I think I may have found a bug, but I'm commenting here because it's easier to comment on the patch this way.
>- if (!gBrowser.pageReport.reported) {
>+ if (!gBrowser.selectedBrowser.blockedPopups.reported) {
So, you switched from pageReport to blockedPopups. Seems OK, but...
>+ this.blockedPopups = aBlockedPopups;
>+ if (aFreshPopup) {
>+ this.blockedPopups.reported = false;
... aBlockedPopups is a completely new array every time...
>- this.pageReport.push(obj);
>- this.pageReport.reported = false;
... while the old code merely appended on to the existing array.
| Assignee | ||
Comment 16•11 years ago
|
||
The code that handles the DOMPopupBlocked event has moved to browser-content.js (onPopupBlocked there). It appends to its own array, just as the old code did. That array is then sent up to the parent periodically. The parent replaces its copy of the array with the one from the child, which is the code you pointed out. I think everything is correct there.
Updated•11 years ago
|
Updated•11 years ago
|
Comment 17•11 years ago
|
||
Removing my name from in-qa-testsuite flag for a better query.
Flags: in-qa-testsuite?(hskupin) → in-qa-testsuite?
Comment 18•11 years ago
|
||
(In reply to Anthony Hughes, QA Mentor (:ashughes) from comment #13)
> Henrik, I wonder if we should have an e10s testrun in Mozmill which runs our
> existing tests with e10s pref'd on to catch bugs like this? FWIW, I'd be
> fine if we isolated this to Nightly testruns for now.
Mozmill doesn't support e10s yet (see bug 695026). But once we do we will run tests for e10s for sure. Given that we already have popup blocker tests in the suite, nothing actionable for us here. I will set it to + given that we have coverage, but simply can't run them at the moment.
Flags: in-qa-testsuite? → in-qa-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•