Closed
Bug 1268798
Opened 9 years ago
Closed 9 years ago
Give fullscreenElement and fullscreenEnabled attributes a dummy setter rather than making them readonly
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: xidorn, Assigned: xidorn)
References
()
Details
(Keywords: dev-doc-complete, Whiteboard: btpp-active)
Attachments
(4 files)
There is a pattern like
> document.fullscreenElement = document.fullscreenElement || document.mozFullScreenElement || ...;
and
> document.fullscreenEnabled = document.fullscreenEnabled || document.mozFullScreenEnabled || ...;
This would throw in strict mode. We may want to give them a dummy setter rather than marking them readonly so that they would never throw.
Updated•9 years ago
|
Assignee: nobody → bugzilla
Whiteboard: btpp-active
Comment 1•9 years ago
|
||
(vaguely reminds me of https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/5S7qeLSXT5Q)
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 2•9 years ago
|
||
(In reply to Mike Taylor [:miketaylr] from comment #1)
> (vaguely reminds me of
> https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/5S7qeLSXT5Q)
So removing prefixed API would be another breaking change... I think we don't have plan to remove them currently, but we may eventually want to do that, or get something speced, as stated in bug 1249225.
Assignee | ||
Comment 3•9 years ago
|
||
heycam added a "[LenientSetter]" extended attribute to WebIDL, which we may want to use.
But it seems to me implementing this could be non-trivial, and we may not want to uplift this patch. It means we'll not be able to ship unprefixed Fullscreen API for another cycle.
Comment 4•9 years ago
|
||
Xidorn, we could implement it as a no-op setter for now and use "any" in IDL and add support for [LenientSetter] as a cleanup later. If that's easier to uplift. But I suppose there's no real rush either.
Assignee | ||
Comment 5•9 years ago
|
||
No, there is no real rush.
Assignee | ||
Comment 6•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50757/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/50757/
Attachment #8749127 -
Flags: review?(khuey)
Attachment #8749128 -
Flags: review?(khuey)
Attachment #8749129 -
Flags: review?(khuey)
Attachment #8749130 -
Flags: review?(bugs)
Assignee | ||
Comment 7•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50759/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/50759/
Assignee | ||
Comment 8•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50761/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/50761/
Assignee | ||
Comment 9•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50763/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/50763/
Comment on attachment 8749127 [details]
MozReview Request: Bug 1268798 part 1 - Fix exception whitelist in WebIDL parser. r?khuey
Please explain why you want to use repr() instead of str().
Flags: needinfo?(bugzilla)
Comment 11•9 years ago
|
||
Comment on attachment 8749130 [details]
MozReview Request: Bug 1268798 part 4 - Mark Document.fullscreenElement and fullscreenEnabled with LenientSetter. r?smaug
https://reviewboard.mozilla.org/r/50763/#review48155
Assuming [LenientSetter] is implemented correctly in other patches, r+.
Attachment #8749130 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 12•9 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #10)
> Please explain why you want to use repr() instead of str().
When I ran runtests.py manually, I get
> Rule 'OtherOrComma' defined, but not used
exception which is in the whitelist.
Then I investigate a bit, and found that the format string uses `%r` rather than `"%s"`, so I changed that. Later I found that when this file is called from the build system, it is still use `"%s"`. I guess that is because I installed a newer version of ply or something locally, while the build system uses an in-tree dependency.
I think `%r` actually makes more sense here, as it would escape the string properly, and save two bytes in the code :) And given the newer version uses that, I expect we may want to switch to that at some point as well.
Flags: needinfo?(bugzilla)
Assignee | ||
Comment 13•9 years ago
|
||
khuey, part 1 and 2 are not necessary to this bug, so if you are not comfortable with them, I can just skip them and land part 3 and part 4.
I need part 1 to run tests locally, and part 2 is to make unexpected result in tests listed more explicitly after finish testing. Neither of them affects adding [LenientSetter] extended attribute.
Comment on attachment 8749127 [details]
MozReview Request: Bug 1268798 part 1 - Fix exception whitelist in WebIDL parser. r?khuey
https://reviewboard.mozilla.org/r/50757/#review48655
Attachment #8749127 -
Flags: review?(khuey) → review+
Comment on attachment 8749128 [details]
MozReview Request: Bug 1268798 part 2 - Add result summary for WebIDL parser test. r?khuey
https://reviewboard.mozilla.org/r/50759/#review48657
Attachment #8749128 -
Flags: review?(khuey) → review+
Comment on attachment 8749129 [details]
MozReview Request: Bug 1268798 part 3 - Add LenientSetter extended attribute. r?khuey
https://reviewboard.mozilla.org/r/50761/#review48659
Attachment #8749129 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 17•9 years ago
|
||
Thanks for reviewing!
Assignee | ||
Comment 18•9 years ago
|
||
Assignee | ||
Comment 19•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf82e81dd0e4cf9597d36563f65149b25be45e39
Bug 1268798 part 1 - Fix exception whitelist in WebIDL parser. r=khuey
https://hg.mozilla.org/integration/mozilla-inbound/rev/020c9ed2224f9c074974cfbd05a5b8a1934879c6
Bug 1268798 part 2 - Add result summary for WebIDL parser test. r=khuey
https://hg.mozilla.org/integration/mozilla-inbound/rev/e84a5823b6082794edec9644fbba489cf4fcf841
Bug 1268798 part 3 - Add LenientSetter extended attribute. r=khuey
https://hg.mozilla.org/integration/mozilla-inbound/rev/d2de04de7164db3dcb0f3c18394dd9092a8c1610
Bug 1268798 part 4 - Mark Document.fullscreenElement and fullscreenEnabled with LenientSetter. r=smaug
Comment 20•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cf82e81dd0e4
https://hg.mozilla.org/mozilla-central/rev/020c9ed2224f
https://hg.mozilla.org/mozilla-central/rev/e84a5823b608
https://hg.mozilla.org/mozilla-central/rev/d2de04de7164
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•8 years ago
|
Keywords: dev-doc-needed
Comment 21•8 years ago
|
||
Added a comment in:
https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreenElement
https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreenEnabled
and
https://developer.mozilla.org/en-US/Firefox/Releases/49#Others
I also documented this in this meta-page about how to use webidl to document things properly:
https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#Not_throwing_exceptions
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
•