Closed
Bug 702146
Opened 13 years ago
Closed 13 years ago
Add override style sheet for :-moz-full-screen-ancestor
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: cpearce, Assigned: cpearce)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
The :-moz-full-screen-ancestor style rules should be in an override style sheet, not ua.css.
Assignee | ||
Comment 1•13 years ago
|
||
We should also add transform:none and change clip:none to clip:auto in the default style for :-moz-full-screen-ancestor.
I've emailed Anne to get the W3 spec changed to clip:auto rather than clip:none.
Assignee | ||
Comment 2•13 years ago
|
||
That should be -moz-transform:none rather than transform:none, the latter isn't supported in Firefox yet.
Assignee | ||
Comment 3•13 years ago
|
||
* Move rules for :-moz-full-screen-ancestor to a new file /content/base/src/FullScreenOverride.css.
* s/clip:none;/clip:auto;/
* Add -moz-transform:none to :-moz-full-screen-ancestor.
* Load FullScreenOverride.css and add it as an override style sheet to full-screen documents.
Comment 4•13 years ago
|
||
Comment on attachment 574752 [details] [diff] [review]
Patch v1
So as far as I can tell if you AddFullScreenStyleOverride then RemoveFullScreenStyleOverride then AddFullScreenStyleOverride the sheet won't be added.... what am I missing?
Things will also break, I think, if the presshell for the document is recreated while in full-screen.
If we don't need lazy-loading here, it's probably better to just put this stylesheet in the stylesheet cache like the forms sheet and have style set creation add it as an override sheet.
Also, why do we ever need to _remove_ this sheet?
Finally, I assume the !important removal is on purpose so that these rules will override document rules by default but document !important rules will be able to overide our rules?
Attachment #574752 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #4)
> Comment on attachment 574752 [details] [diff] [review] [diff] [details] [review]
> Patch v1
>
> So as far as I can tell if you AddFullScreenStyleOverride then
> RemoveFullScreenStyleOverride then AddFullScreenStyleOverride the sheet
> won't be added.... what am I missing?
Oops. I forgot to reset mFullScreenStyleOverride in RemoveFullScreenStyleOverride() ;)
> Things will also break, I think, if the presshell for the document is
> recreated while in full-screen.
Hmm, so if we put the override sheet in the stylesheet cache would we still need to re-enable the override style sheet if the presshell was recreated? Where do we do this? Or would the recreation automatically do this for us?
> Finally, I assume the !important removal is on purpose so that these rules
> will override document rules by default but document !important rules will
> be able to overide our rules?
Yup.
Comment 6•13 years ago
|
||
Maybe we should put this at "UA important" (Gecko-only, I know, but we can make it up) instead for now? What are the use cases for wanting to override position:fixed and such?
An author might want to display a badge, or floating toolbar, or advertisement overlay, even while content is fullscreen. They might want to possibly size/position the fullscreen element to not overlap that content.
Assignee | ||
Comment 8•13 years ago
|
||
Store override sheet in style cache, similar to forms.css.
Attachment #574752 -
Attachment is obsolete: true
Attachment #575768 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 9•13 years ago
|
||
bz: review ping?
Comment 10•13 years ago
|
||
Sorry, this got lost in the travel + holiday weekend mess...
> Or would the recreation automatically do this for us?
Exactly. CreateStyleSet would get called and things would Just Work.
Comment 11•13 years ago
|
||
Comment on attachment 575768 [details] [diff] [review]
Patch v2: Store override sheet in style cache
r=me.
Attachment #575768 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 12•13 years ago
|
||
Landed, targeting Firefox 11 for this.
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb3bfc552568
Comment 13•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•