Closed
Bug 516076
Opened 16 years ago
Closed 16 years ago
document.commandDispatcher.getControllerForCommand looks in active window
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta4-fixed |
People
(Reporter: neil, Assigned: enndeakin)
References
Details
(Keywords: regression)
Attachments
(1 file)
21.01 KB,
patch
|
neil
:
review+
smaug
:
superreview+
roc
:
approval1.9.2+
|
Details | Diff | Splinter Review |
Under 1.9.1, document.commandDispatcher.getControllerForCommand always looked for the focused element within the same top-level window. However on trunk it looks for the focused element in the active window. For example, if a dialog calls a function in its opener, then it always checks the calling dialog's controller. Alternatively, if you step through goUpdateCommand using Venkman then it always checks Venkman's controllers.
Assignee | ||
Comment 1•16 years ago
|
||
I hope to get rid of the focus controller as it doesn't really have much in it anymore. For now, to fix the regression though, just pass a suitable context window to it's methods.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #400766 -
Flags: superreview?(Olli.Pettay)
Attachment #400766 -
Flags: review?(neil)
Assignee | ||
Comment 2•16 years ago
|
||
Also, this patch caused some contenteditable tests to fail when run on the try server. The fix for that is in nsFocusManager::WindowHidden included in this patch.
Reporter | ||
Updated•16 years ago
|
Attachment #400766 -
Flags: review?(neil) → review+
Reporter | ||
Comment 3•16 years ago
|
||
Comment on attachment 400766 [details] [diff] [review]
pass the window to the focus controller methods
Works with my test cases.
>+ nsCOMPtr<nsPIDOMWindow> focusedWindow;
>+ nsIContent* focusedContent =
>+ GetRootFocusedContentAndWindow(aContextWindow, getter_AddRefs(focusedWindow));
>+ if (focusedContent) {
...
>+ nsIDocument* doc = focusedContent->GetOwnerDoc();
>+ nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(doc->GetWindow());
Didn't GetRootFocusedContentAndWindow already get the right window?
Assignee | ||
Comment 4•16 years ago
|
||
> >+ nsIDocument* doc = focusedContent->GetOwnerDoc();
> >+ nsCOMPtr<nsIDOMWindowInternal> domWindow = do_QueryInterface(doc->GetWindow());
> Didn't GetRootFocusedContentAndWindow already get the right window?
I'll remove those lines and just refer to focusedWindow instead.
Updated•16 years ago
|
Attachment #400766 -
Flags: superreview?(Olli.Pettay) → superreview+
Comment 5•16 years ago
|
||
Comment on attachment 400766 [details] [diff] [review]
pass the window to the focus controller methods
> // 2879DB1C-47AA-46C4-B184-2590CC39F262
> #define NS_IFOCUSCONTROLLER_IID \
> { 0x2879db1c, 0x47aa, 0x46c4, \
> { 0xb1, 0x84, 0x25, 0x90, 0xcc, 0x39, 0xf2, 0x62 } }
You should update the IID
Assignee | ||
Comment 6•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
Assignee | ||
Comment 7•16 years ago
|
||
Comment on attachment 400766 [details] [diff] [review]
pass the window to the focus controller methods
Regression so could affect some extensions.
Attachment #400766 -
Flags: approval1.9.2?
Attachment #400766 -
Flags: approval1.9.2? → approval1.9.2+
Updated•16 years ago
|
Keywords: checkin-needed
Comment 8•16 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•