Closed
Bug 1368103
Opened 8 years ago
Closed 8 years ago
Accessibles in background tabs don't have offscreen state in e10s
Categories
(Core :: Disability Access APIs, enhancement)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: eeejay, Assigned: eeejay)
References
Details
(Whiteboard: [aes?])
Attachments
(1 file, 1 obsolete file)
|
2.53 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
Before e10s, every accessible in a non-visible tab would have an offscreen state.
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → eitan
Updated•8 years ago
|
Whiteboard: [aes?]
| Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8871963 -
Flags: review?(surkov.alexander)
Comment 2•8 years ago
|
||
Comment on attachment 8871963 [details] [diff] [review]
Use DOM doc visibilityState to determine if a tab is hidden. r?surkov
Review of attachment 8871963 [details] [diff] [review]:
-----------------------------------------------------------------
I trust you that IsHidden is an equivalent in this case but where it is defined?
::: accessible/generic/Accessible.cpp
@@ +345,5 @@
> return 0;
>
> + // Offscreen state if the document's visibility state is not visible.
> + if (!Document() || Document()->IsHidden())
> + return states::OFFSCREEN;
no Document() check is required I believe, since no one should get here for shutdown accessible
::: accessible/generic/DocAccessible.h
@@ +138,5 @@
> }
>
> + bool IsHidden() const
> + {
> + return !mDocumentNode || mDocumentNode->Hidden();
same here, you can safely skip !mDocumentNode check I think
Attachment #8871963 -
Flags: review?(surkov.alexander) → review+
| Assignee | ||
Comment 3•8 years ago
|
||
I am nervously removing those null-checks!
| Assignee | ||
Comment 4•8 years ago
|
||
I needed to re-add the xul:tabpanel checks for cases where the tabs are not documents.
Otherwise test_visibility.xul fails. Having both checks will accomodate both cases.
Attachment #8873885 -
Flags: review?(surkov.alexander)
| Assignee | ||
Updated•8 years ago
|
Attachment #8871963 -
Attachment is obsolete: true
Comment 5•8 years ago
|
||
(In reply to Eitan Isaacson [:eeejay] from comment #3)
> I am nervously removing those null-checks!
you never should get here, if they fail, then something very bad happened
(In reply to Eitan Isaacson [:eeejay] from comment #4)
> Created attachment 8873885 [details] [diff] [review]
> Use DOM doc visibilityState to determine if a tab is hidden. r?surkov
>
> I needed to re-add the xul:tabpanel checks for cases where the tabs are not
> documents.
> Otherwise test_visibility.xul fails. Having both checks will accomodate both
> cases.
thanks we have a test, otherwise Marco would be surprised by not working prefs and other UI stuff I guess :)
Comment 6•8 years ago
|
||
Comment on attachment 8873885 [details] [diff] [review]
Use DOM doc visibilityState to determine if a tab is hidden. r?surkov
Review of attachment 8873885 [details] [diff] [review]:
-----------------------------------------------------------------
::: accessible/generic/Accessible.cpp
@@ +345,5 @@
> return 0;
>
> + // Offscreen state if the document's visibility state is not visible.
> + if (Document()->IsHidden())
> + return states::OFFSCREEN;
shouldn't we move this out the cycle? when Document::IsHidden() returns true? Is it always about background tab documents?
Attachment #8873885 -
Flags: review?(surkov.alexander) → review+
| Assignee | ||
Comment 7•8 years ago
|
||
(In reply to alexander :surkov from comment #6)
> Comment on attachment 8873885 [details] [diff] [review]
> Use DOM doc visibilityState to determine if a tab is hidden. r?surkov
>
> Review of attachment 8873885 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: accessible/generic/Accessible.cpp
> @@ +345,5 @@
> > return 0;
> >
> > + // Offscreen state if the document's visibility state is not visible.
> > + if (Document()->IsHidden())
> > + return states::OFFSCREEN;
>
> shouldn't we move this out the cycle? when Document::IsHidden() returns
> true?
Good point!
> Is it always about background tab documents?
When the document is not visible (like if the window is minimized too). You can test it with document.visibilityState
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6f99018495e7
Use DOM doc visibilityState to determine if a tab is hidden. r=surkov
Comment 9•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•