Closed
Bug 1124245
Opened 9 years ago
Closed 9 years ago
[E10s] IsParentActivated() call in nsGlobalWindow looks wrong
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(2 files, 1 obsolete file)
19.74 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
2.04 KB,
patch
|
Details | Diff | Splinter Review |
...since IsParentActivated() relies on global state in nsFocusManager, and the same nsFocusManager can be used for several tabs in several parent process windows.
Assignee | ||
Comment 1•9 years ago
|
||
In fact we can't really keep mParentFocusType as such in nsFocusManager.
Assignee | ||
Comment 2•9 years ago
|
||
(/me kicks himself for not catching this while reviewing the patch.)
Assignee | ||
Comment 4•9 years ago
|
||
Store the state in TabChild and nsGlobalWindow should read the state when it gets its docshell.
Flags: needinfo?(bugs)
Updated•9 years ago
|
tracking-e10s:
--- → +
Comment 5•9 years ago
|
||
What's the effect of this? Is there any user-visible bug here?
Flags: needinfo?(bugs)
Assignee | ||
Comment 6•9 years ago
|
||
Yes, but let me fix this.
Assignee: nobody → bugs
Flags: needinfo?(bugs)
Assignee | ||
Comment 7•9 years ago
|
||
nsFocusManager::WindowShown is still a bit odd, but decided to not change the current behavior. https://tbpl.mozilla.org/?tree=Try&rev=897aca538dba
Attachment #8555566 -
Flags: review?(enndeakin)
Comment 8•9 years ago
|
||
Comment on attachment 8555566 [details] [diff] [review] v1 >- mRemoteBrowser->Show(size); >+ nsPIDOMWindow* win = mOwnerContent->OwnerDoc()->GetWindow(); >+ bool parentIsActive = false; >+ if (win) { >+ nsCOMPtr<nsPIWindowRoot> windowRoot = >+ static_cast<nsGlobalWindow*>(win)->GetTopWindowRoot(); >+ if (windowRoot) { >+ nsPIDOMWindow* topWin = windowRoot->GetWindow(); >+ parentIsActive = topWin && topWin->IsActive(); >+ } >+ } The active state gets propagated down to child windows. Do you need to use the root window here?
Attachment #8555566 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 9•9 years ago
|
||
We don't propagate that flag. We propagate NS_DOCUMENT_STATE_WINDOW_INACTIVE state.
Assignee | ||
Comment 10•9 years ago
|
||
Boo, there is some bug in the patch. It doesn't update background tabs properly or something.
Assignee | ||
Comment 11•9 years ago
|
||
This passes locally. (I'm still not quite happy how we deal with activate, especially in non-e10s case, but that is for some other bug) https://tbpl.mozilla.org/?tree=Try&rev=a2e570a4abfd The change to the test is needed just to be able to run it separately locally on linux. interdiff coming
Attachment #8555566 -
Attachment is obsolete: true
Attachment #8556758 -
Flags: review?(enndeakin)
Assignee | ||
Comment 12•9 years ago
|
||
Updated•9 years ago
|
Attachment #8556758 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 13•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/647d24c9a40a
Comment 14•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/647d24c9a40a
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•