Closed Bug 1366163 Opened 3 years ago Closed 2 years ago

stylo: rendering of <video controls> and <audio controls> is wrong


(Core :: CSS Parsing and Computation, defect, P2)




Tracking Status
firefox57 --- fixed


(Reporter: TYLin, Assigned: TYLin)




(2 files, 2 obsolete files)

With the WIP patches in bug 1290276 comment 22, I got an incomplete rendering of <video controls>. (See the attachment.)

At least "-moz-context-properties" is not supported yet (Bug 1366162). I'm not sure what else is missing.
Priority: -- → P1
Attachment #8880237 - Attachment is obsolete: true
Attachment #8880237 - Flags: review?(emilio+bugs)
After bug 1372876 is fixed, the remaining issue for the <video controls> is the :hover rule in [1] for the -moz-range-thumb [2].

.volumeControl:hover::-moz-range-thumb {
  background-color: #48a0f7;

Depends on: 1372876
Should that remaining issue be fixed by bug 1375969?
Flags: needinfo?(tlin)
Yes. Based on my local build, the issue in comment 2 has been fixed by bug 1375969. <video controls> looks the same on gecko and stylo now. Thanks emilio!
Closed: 2 years ago
Depends on: 1370797
Flags: needinfo?(tlin)
Resolution: --- → WORKSFORME
Depends on: 1375969
We still have some reftests failed like layout/reftests/bugs/449149-1a.html for <audio controls>.
Resolution: WORKSFORME → ---
Assignee: nobody → tlin
Priority: P1 → --
Priority: -- → P2
Gecko and stylo generate different frame subtree for "positionDurationBox" [1] in "data:text/html,<audio controls>". See

stylo generated a "-moz-anonymous-flex-item" block with many newline-only text frame in it, but gecko doesn't. I haven't figured out why.

Whitespace-only flex items are a bug, per spec, so this is a stylo issue.

I suspect that we're messing up the TextIsOnlyWhitespace cached state, somehow. That path is different for stylo and non-stylo.
The difference of the frame tree described in comment 6 might be because servo doesn't blockify the children if the parent's display is "flex" where gecko has the fixup implemented in [1].

Emilio, do you have any idea how to fix that in servo?

Flags: needinfo?(emilio+bugs)
I'm pretty sure servo does this in
Flags: needinfo?(emilio+bugs)
That being said, it does indeed seem like we're skipping it incorrectly, I can take a look at it if you want.
I think the check in GeckoElement::skip_root_and_item_based_display_fixup is just incorrect...
Ok, that seemed to work :)

Thanks a lot for finding that Ting-Yu!
I'm going to go ahead and submit that patch since I've heard Ting-Yu is on North Korea, so won't probably be available in a bit.
Comment on attachment 8894663 [details]
Bug 1366163: Fix skip_root_and_item_based_display_fixup.

Oops, thanks for fixing. :-)
Attachment #8894663 - Flags: review?(cam) → review+
Comment on attachment 8894664 [details]
Bug 1366163: Update test expectations.
Attachment #8894664 - Flags: review?(cam) → review+
Attachment #8894663 - Attachment is obsolete: true
Pushed by
Update test expectations. r=heycam
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.