Closed
Bug 910501
Opened 11 years ago
Closed 11 years ago
Selecting "Prevent this page from creating additional dialogs" on an alert/prompt/confirm should prevent all future alert/prompt/confirm on that page
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 27
People
(Reporter: TimAbraldes, Assigned: TimAbraldes)
Details
Attachments
(2 files, 4 obsolete files)
641 bytes,
text/html
|
Details | |
11.84 KB,
patch
|
TimAbraldes
:
review+
|
Details | Diff | Splinter Review |
STR:
1. Go to http://dolske.net/mozilla/tests/prompt/sizes.html
2. Use the buttons to quickly create prompts and dismiss them (spacebar is helpful for this)
3. When the "Prevent this page from creating additional dialogs" checkbox appears, select it
4. Continue to click on one of the buttons (or use spacebar) and note that eventually dialogs are created
Assignee | ||
Comment 1•11 years ago
|
||
The patch I'm working on in bug 856977 also fixes this issue, so I'll just assign myself
Assignee: nobody → tabraldes
Assignee | ||
Comment 2•11 years ago
|
||
This testcase demonstrates the issue without the user needing to push any buttons (except the ok/cancel buttons of the dialog, of course)
I've recently learned (see bug 856977 comment 15 and bug 856977 comment 16) that the "prevent this page from creating additional dialogs" doesn't intend to prevent ALL additional dialogs from being created; it just intends to limit the rate at which new dialogs can be created.
Using the attached test case, I found that my version of Aurora limits new dialogs to 1 dialog every 3 seconds after I've selected "prevent this page from creating additional dialogs."
I find this behavior confusing: I expect a checkbox labeled "prevent this page from creating additional dialogs" to prevent the page from creating dialogs, without exception. Also, I don't really want the ability to rate-limit dialogs on a page; I want the ability to disable them completely.
I'm leaving this bug open, pending the outcome of discussion about this behavior.
Assignee | ||
Updated•11 years ago
|
Summary: Even if you select "Prevent this page from creating additional dialogs", dialogs will sometimes be created → Selecting "Prevent this page from creating additional dialogs" on an alert/prompt/confirm should prevent all future alert/prompt/confirm on that page
Assignee | ||
Comment 3•11 years ago
|
||
This patch should be applied on top of the patch in bug 856977.
This patch removes the rate-limiting behavior for dialogs and prefers a simpler enable/disable mechanism.
I haven't yet built/tested this patch.
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #812825 -
Attachment is obsolete: true
Assignee | ||
Comment 5•11 years ago
|
||
:gavin for the browser piece.
:bz for the dom pieces.
Attachment #812827 -
Attachment is obsolete: true
Attachment #812865 -
Flags: review?(gavin.sharp)
Attachment #812865 -
Flags: review?(bzbarsky)
Comment 6•11 years ago
|
||
Comment on attachment 812865 [details] [diff] [review]
Patch v3
This seems fine, assuming we've agreed on the behavior.
Attachment #812865 -
Flags: review?(bzbarsky) → review+
Comment 7•11 years ago
|
||
Comment on attachment 812865 [details] [diff] [review]
Patch v3
>diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
>- windowUtils.limitDialogs();
>+ windowUtils.disableDialogs();
Hmm, I guess this is just fixing a bug introduced by the patch for bug 856977? Ideally that patch would have just done this to begin with, right? Or am I missing something?
Attachment #812865 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #7)
> Comment on attachment 812865 [details] [diff] [review]
> Patch v3
>
> >diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
>
> >- windowUtils.limitDialogs();
> >+ windowUtils.disableDialogs();
>
> Hmm, I guess this is just fixing a bug introduced by the patch for bug
> 856977? Ideally that patch would have just done this to begin with, right?
> Or am I missing something?
The patch in bug 856977 renamed "preventFurtherDialogs" to "limitDialogs" in order to make the existing behavior more obvious: The bug existed before the patch for bug 856977, it's just that now the function is named appropriately so it's more obvious that there's a bug.
The patch in bug 856977 hasn't landed yet, so I'm happy to include this change as part of that patch instead of this patch. We've already fixed another similar instance in that patch (bug 856977 comment 39).
Assignee | ||
Comment 9•11 years ago
|
||
Removing the tabbrowser.xml change (this is moving to bug 856977) and carrying forward r+
Attachment #812865 -
Attachment is obsolete: true
Attachment #813227 -
Flags: review+
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Tim Abraldes [:TimAbraldes] [:tabraldes] from comment #8)
> (In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment
> #7)
> > Comment on attachment 812865 [details] [diff] [review]
> > Patch v3
> >
> > >diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
> >
> > >- windowUtils.limitDialogs();
> > >+ windowUtils.disableDialogs();
> >
> > Hmm, I guess this is just fixing a bug introduced by the patch for bug
> > 856977? Ideally that patch would have just done this to begin with, right?
> > Or am I missing something?
>
> The patch in bug 856977 renamed "preventFurtherDialogs" to "limitDialogs" in
> order to make the existing behavior more obvious: The bug existed before the
> patch for bug 856977, it's just that now the function is named appropriately
> so it's more obvious that there's a bug.
Oops, this is inaccurate. nsIDOMWindowUtils.preventFurtherDialogs calls nsGlobalWindow::PreventFurtherDialogs with an argument of 'true,' which would indeed disable dialogs (instead of rate-limiting them).
> The patch in bug 856977 hasn't landed yet, so I'm happy to include this
> change as part of that patch instead of this patch. We've already fixed
> another similar instance in that patch (bug 856977 comment 39).
I've updated the patches in this bug and in bug 856977.
Assignee | ||
Comment 11•11 years ago
|
||
Rebasing to apply cleanly on top of latest patch in bug 856977
Attachment #813227 -
Attachment is obsolete: true
Attachment #813245 -
Flags: review+
Assignee | ||
Comment 12•11 years ago
|
||
Ran this through try one last time:
https://tbpl.mozilla.org/?tree=Try&rev=1ebd9b65e7b2
Landed on m-i:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b0d701ca9d9f
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Comment 13•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
You need to log in
before you can comment on or make changes to this bug.
Description
•