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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11
Tracking Status
firefox10 --- wontfix
firefox11 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

The :-moz-full-screen-ancestor style rules should be in an override style sheet, not ua.css.
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.
That should be -moz-transform:none rather than transform:none, the latter isn't supported in Firefox yet.
Attached patch Patch v1 (obsolete) — Splinter Review
* 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.
Assignee: nobody → chris
Status: NEW → ASSIGNED
Attachment #574752 - Flags: review?(bzbarsky)
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-
(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.
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.
Store override sheet in style cache, similar to forms.css.
Attachment #574752 - Attachment is obsolete: true
Attachment #575768 - Flags: review?(bzbarsky)
bz: review ping?
Blocks: 706192
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 on attachment 575768 [details] [diff] [review]
Patch v2: Store override sheet in style cache

r=me.
Attachment #575768 - Flags: review?(bzbarsky) → review+
Landed, targeting Firefox 11 for this.

https://hg.mozilla.org/integration/mozilla-inbound/rev/bb3bfc552568
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/bb3bfc552568
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: