Closed Bug 1268798 Opened 9 years ago Closed 8 years ago

Give fullscreenElement and fullscreenEnabled attributes a dummy setter rather than making them readonly

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

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.
Assignee: nobody → bugzilla
Whiteboard: btpp-active
(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.
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.
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.
No, there is no real rush.
Blocks: 1269276
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 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+
(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)
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+
Thanks for reviewing!
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: