Closed
Bug 697110
Opened 12 years ago
Closed 12 years ago
Support doorhangers for popup blocking
Categories
(Firefox for Android Graveyard :: General, defect, P2)
Tracking
(firefox11 fixed, fennec11+)
VERIFIED
FIXED
People
(Reporter: gcp, Assigned: gcp)
References
Details
Attachments
(1 file)
5.65 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Modify the popup blockers to use the new Java doorhangers.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → gpascutto
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•12 years ago
|
||
Includes a fix to actually delete the callback objects in NativeWindow.
Attachment #571749 -
Flags: review?(mark.finkle)
Comment 2•12 years ago
|
||
Comment on attachment 571749 [details] [diff] [review] Patch 1. Add the PopupBlockerObserver service and use NativeWindow.doorhanger >diff --git a/mobile/chrome/content/browser.js b/mobile/chrome/content/browser.js > let id = aData; > if (this.doorhanger._callbacks[id]) { > let prompt = this.doorhanger._callbacks[id].prompt; > this.doorhanger._callbacks[id].cb(); >- for (let callback in this.doorhanger._callbacks) { >- if (callback.prompt == prompt) { >- delete callback; >+ for (let id in this.doorhanger._callbacks) { >+ if (this.doorhanger._callbacks[id].prompt == prompt) { >+ delete this.doorhanger._callbacks[id]; Only a mild worry about using two variables named 'id'. You could use for each and keep 'callback' >+ BrowserApp.deck.addEventListener("DOMUpdatePageReport", >+ PopupBlockerObserver.onUpdatePageReport, >+ false); No wrap needed. Honest. >+var PopupBlockerObserver = { >+ onUpdatePageReport: function onUpdatePageReport(aEvent) >+ { nit: { on same line as 'function' >+ var cBrowser = BrowserApp.selectedBrowser; nit: can we switch to 'let' and 'browser' >+ >+ if (Services.prefs.getBoolPref("privacy.popups.showBrowserMessage")) { >+ var brandShortName = Strings.brand.GetStringFromName("brandShortName"); >+ var message; >+ var popupCount = cBrowser.pageReport.length; nit: use 'let' >+ var buttons = [ nit: use 'let' >+ accessKey: null, >+ accessKey: null, >+ accessKey: null, Just remove these. We should be fine without them. >+ allowPopupsForSite: function allowPopupsForSite(aAllow) { >+ var currentURI = BrowserApp.selectedBrowser.currentURI; nit: Use 'let' >+ showPopupsForSite: function showPopupsForSite() { >+ let newTab = BrowserApp.addTab(popupURIspec); >+ newTab.active = true; >+ BrowserApp.selectTab(newTab); In XUL fennec we do not activate/select the new tab. This should be enough: BrowserApp.addTab(popupURIspec); r+ with nits and removing the active/selectTab (I know the 'let' things weren't yours. I should have changed those a long time ago)
Attachment #571749 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Pushed with comments addressed. http://hg.mozilla.org/projects/birch/rev/f3eea1384f14
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 4•12 years ago
|
||
bug 695448 also affected with these changes
Comment 5•12 years ago
|
||
20111104040406 http://hg.mozilla.org/projects/birch/rev/f3eea1384f14 Samsung Galaxy SII
Status: RESOLVED → VERIFIED
Comment 6•12 years ago
|
||
and by comment #4, I meant bug 698845
Comment 7•12 years ago
|
||
These patches were backed while investigating Talos failures. Now that tests are green again, we will need to reland.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Comment 8•12 years ago
|
||
backout was backed out https://hg.mozilla.org/projects/birch/rev/6f925b45a547
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Comment 9•12 years ago
|
||
20111114041052 http://hg.mozilla.org/projects/birch/rev/859ecdfe0168 Samsung Galaxy SII (Android 2.3.4)
Status: RESOLVED → VERIFIED
Flags: in-litmus?(fennec)
Whiteboard: [QA+]
Comment 10•12 years ago
|
||
Test cases updated: BFT - popup and annoyance blocking: https://litmus.mozilla.org/show_test.cgi?id=33636 https://litmus.mozilla.org/show_test.cgi?id=33700
Flags: in-litmus?(fennec) → in-litmus+
Whiteboard: [QA+]
Updated•12 years ago
|
tracking-fennec: --- → 11+
Updated•12 years ago
|
status-firefox11:
--- → fixed
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
•