Closed Bug 1099052 Opened 10 years ago Closed 8 years ago

CSS-transformed video elements have that transform applied when using fullscreen video mode

Categories

(Core :: Layout, defect)

33 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1215365

People

(Reporter: ehamaz, Unassigned)

Details

(Keywords: reproducible, testcase)

Attachments

(2 files)

Attached file video.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20141030112145

Steps to reproduce:

1 - Download the attached HTML file
2 - Load the file in Firefox 33.1 on Mac OS X 10.6.8
3 - Click the full screen button


Actual results:

The full screen video is centred at the top left corner of the screen


Expected results:

The full screen video is centred at the centre of the screen
Err, yeah, that's interesting...

Boris, can you sanity-check the following? I *think* what we should do is force a 0 transform on the video element itself once it's in fullscreen. Is there any reason that'd break anything? And can we do that in ua CSS:

video:fullscreen,
audio:fullscreen {
transform: none !important;
}

Or would we need to hack bits of layout? Or is this essentially wontfix (getcomputedstyle, for instance, is going to return unexpected results if we override it in fullscreen, and the webpage doesn't know we made the video go fullscreen)? :-)

(AFAICT from their inspector, blink does something similar - in fact, it seems to reset that and a whole bunch of other styles besides, on any fullscreen element...)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bzbarsky)
OS: Mac OS X → All
Product: Firefox → Core
Hardware: x86 → All
Summary: Video element's off centre full screen display → CSS-transformed video elements have that transform applied when using fullscreen video mode
This is really a spec question.  See https://fullscreen.spec.whatwg.org/#user-agent-level-style-sheet-defaults and our version thereof in ua.css
Flags: needinfo?(bzbarsky) → needinfo?(annevk)
I don't have strong opinions here. CSS really needs to own this part of Fullscreen and make it work.
Flags: needinfo?(roc)
Flags: needinfo?(philipj)
Flags: needinfo?(jackalmage)
Flags: needinfo?(annevk)
I'll raise this on www-style.
Flags: needinfo?(roc)
I think this should be added to the spec:

*|*:not(:root):fullscreen {
  transform: none !important;
}

WebKit/Blink already have this:

video:-webkit-full-screen, audio:-webkit-full-screen {
  transform: none !important;
}

But I'm not sure why it should be limited to audio and video.
Flags: needinfo?(philipj)
This is fixed on the specification side now.
Flags: needinfo?(jackalmage)
Component: Untriaged → Layout: Tables
Er... what does this have to do with tables?
Component: Layout: Tables → Layout
Flags: needinfo?(kkumari)
Sorry, I wanted to change the component to Layout but by mistake Layout Tables got selected. I know it has nothing to do with tables.
Flags: needinfo?(kkumari)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a9d365730d87&selectedJob=15084309

Seems green enough to me. Per the discussion earlier, it seems this is what we want to be doing (more or less) ? I verified with a Windows build from that trypush that the testcase gets fullscreened correctly.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
The spec doesn't have the flex bit, just the transform bit, no?  Discussion in https://www.w3.org/Bugs/Public/show_bug.cgi?id=27931 suggests the flex bit is pointless.
It looks like we already have a similar rule in ua.css: 
http://mxr.mozilla.org/mozilla-central/source/layout/style/ua.css#279

...which includes:
>279 *|*:-moz-full-screen:not(:root) {
>[...]
>295   transform: none !important;
>296 }

So I don't see why this additional rule would benefit us. (It does the same thing as the quoted CSS above, AFAICT)
It looks like xidorn actually added that "transform" line quite recently, in Bug 1215365. Perhaps this bug should be duped forward to that bug?
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Daniel Holbert [:dholbert] from comment #14)
> It looks like xidorn actually added that "transform" line quite recently, in
> Bug 1215365. Perhaps this bug should be duped forward to that bug?

Yup! I tested the "is it still broken" on beta. :-\
Assignee: gijskruitbosch+bugs → nobody
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(gijskruitbosch+bugs)
Resolution: --- → DUPLICATE
Comment on attachment 8704548 [details]
MozReview Request: Bug 1099052 - don't use transform or flex when elements are full screen roots, r?dholbert

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29597/diff/1-2/
Attachment #8704548 - Flags: review?(dholbert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: