Closed Bug 856638 Opened 11 years ago Closed 11 years ago

Allow passing PopupNotification options to _showPrompt in nsBrowserGlue.js

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 23

People

(Reporter: Mardak, Assigned: Mardak)

Details

Attachments

(1 file, 1 obsolete file)

I've got a notification that would like to add in options, but it probably would be cleaner to have my _promptInterests pass in options instead of having _showPrompt handle that logic.
Attached patch v1 (obsolete) — Splinter Review
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #731890 - Flags: review?(dolske)
Comment on attachment 731890 [details] [diff] [review]
v1

Review of attachment 731890 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with the following.

::: browser/components/nsBrowserGlue.js
@@ +1641,3 @@
>     */
>    _showPrompt: function CPP_showPrompt(aRequest, aMessage, aPermission, aActions,
> +                                       aNotificationId, aAnchorId, aOptions) {

Hmm, I think we'd be better off simply fixing up the 3 callers of _showPrompt to explicitly pass one in, even if null.

I should have just done this in last week's pointerLock patch, this seems so obvious in hindsight.

@@ +1706,5 @@
> +              aRequest.allow();
> +            }
> +          }
> +        },
> +      };

Might as well just move this whole block into _promptPointerLock().
Attachment #731890 - Flags: review?(dolske) → review+
Attached patch for checkinSplinter Review
Attachment #731890 - Attachment is obsolete: true
(In reply to Justin Dolske [:Dolske] from comment #2)
> Hmm, I think we'd be better off simply fixing up the 3 callers of
> _showPrompt to explicitly pass one in, even if null.
Updated the callers to pass in null and fixed the comment block to not be [optional].

> Might as well just move this whole block into _promptPointerLock().
As discussed on IRC, this isn't a simple move as |eventCallback| relies on a couple names defined in _showPrompt: |browser| and |onFullScreen|, which depends on popup that only gets set after passing in options.
https://hg.mozilla.org/integration/mozilla-inbound/rev/075ef2e03d2f
 Add an options parameter and use that variable for the existing pointerLock options. Update existing callers to pass in null.
https://hg.mozilla.org/mozilla-central/rev/075ef2e03d2f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: