Closed
Bug 1069772
Opened 11 years ago
Closed 9 years ago
In prerendering, document.visibilityState should returns "prerender".
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla49
| Tracking | Status | |
|---|---|---|
| firefox49 | --- | fixed |
People
(Reporter: teoli, Assigned: freesamael)
References
()
Details
(Keywords: dev-doc-complete, Whiteboard: btpp-active)
Attachments
(2 files, 7 obsolete files)
|
13.43 KB,
patch
|
freesamael
:
review+
|
Details | Diff | Splinter Review |
|
1.89 KB,
patch
|
freesamael
:
review+
|
Details | Diff | Splinter Review |
document.visibilityState should returns "prerender" when in prerender mode.
According to this, I understand that Chrome supports it: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/TwCghLHBYwA
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → sawang
Updated•9 years ago
|
Whiteboard: btpp-active
| Assignee | ||
Comment 1•9 years ago
|
||
| Assignee | ||
Comment 2•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Attachment #8751595 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Attachment #8751597 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•9 years ago
|
||
| Assignee | ||
Comment 4•9 years ago
|
||
| Assignee | ||
Comment 5•9 years ago
|
||
| Assignee | ||
Comment 6•9 years ago
|
||
| Assignee | ||
Comment 7•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Attachment #8751716 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Attachment #8751717 -
Attachment is obsolete: true
| Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8752064 [details] [diff] [review]
Part 1: Update document to support prerender visibility state. r=smaug
Hi Olli,
It seems as long as prerender flag is set correctly, it needs only minimal change to nsDocument to support "prerender" visibilityState.
Could you help to review this patch?
Attachment #8752064 -
Flags: review?(bugs)
| Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8752065 [details] [diff] [review]
Part 2: Add test case
Hi Olli,
The test case tries to verify behaviors based on the description of the latest draft [1]:
> If doc was prerendered and has not previously transitioned to "visible", return "prerender".
It indicates visibilityState should never change back to "prerender" again after active, so the flow tests transition from prerender => visible => hidden => visible on both remote and non-remote browsers.
It also checks hidden attribute should be true when "hidden" or "prerender" [2].
Could you help to review this patch?
[1] https://w3c.github.io/page-visibility/#visibilitystate-attribute
[2] https://w3c.github.io/page-visibility/#hidden-attribute
Attachment #8752065 -
Flags: review?(bugs)
Comment 10•9 years ago
|
||
Comment on attachment 8752064 [details] [diff] [review]
Part 1: Update document to support prerender visibility state. r=smaug
Not about this bug; just wondering if anyone supports "unloaded" state, and if so, should we too. Perhaps worth to file a bug.
Attachment #8752064 -
Flags: review?(bugs) → review+
Updated•9 years ago
|
Attachment #8752065 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #10)
> Comment on attachment 8752064 [details] [diff] [review]
> Part 1: Update document to support prerender visibility state
>
> Not about this bug; just wondering if anyone supports "unloaded" state, and
> if so, should we too. Perhaps worth to file a bug.
I just noticed the latest draft has removed "unloaded" state, instead it simply uses hidden:
> Return "hidden" if: ...
> 3. The user agent is to unload doc
Comment 12•9 years ago
|
||
ah, that is better. I was looking at some other version then.
| Assignee | ||
Comment 13•9 years ago
|
||
| Assignee | ||
Comment 14•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Attachment #8752065 -
Attachment is obsolete: true
| Assignee | ||
Comment 15•9 years ago
|
||
Comment on attachment 8753710 [details] [diff] [review]
Part 2: Add test case. r=smaug
split the test case into 2 so it runs on non-e10s mode
Attachment #8753710 -
Attachment description: Part 2: Add test case → Part 2: Add test case. r=smaug
Attachment #8753710 -
Flags: review+
| Assignee | ||
Updated•9 years ago
|
Attachment #8752064 -
Attachment description: Part 1: Update document to support prerender visibility state → Part 1: Update document to support prerender visibility state. r=smaug
| Assignee | ||
Comment 16•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 17•9 years ago
|
||
rebase before checkin
| Assignee | ||
Comment 18•9 years ago
|
||
rebase before checkin
| Assignee | ||
Updated•9 years ago
|
Attachment #8752064 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Attachment #8753710 -
Attachment is obsolete: true
| Assignee | ||
Updated•9 years ago
|
Attachment #8756233 -
Attachment description: Part 2: Add test case → Part 2: Add test case. r=smaug
Attachment #8756233 -
Flags: review+
| Assignee | ||
Updated•9 years ago
|
Attachment #8756234 -
Attachment description: Part 1: Update document to support prerender visibility state → Part 1: Update document to support prerender visibility state. r=smaug
Attachment #8756234 -
Flags: review+
Comment 19•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d9b584a14402
https://hg.mozilla.org/integration/mozilla-inbound/rev/7909d0735869
Keywords: checkin-needed
Comment 20•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/d9b584a14402
https://hg.mozilla.org/mozilla-central/rev/7909d0735869
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
| Reporter | ||
Updated•9 years ago
|
Keywords: dev-doc-needed
| Reporter | ||
Comment 21•9 years ago
|
||
Updated:
https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState
and
https://developer.mozilla.org/en-US/Firefox/Releases/49#DOM_HTML_DOM
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•