Repository navigation
layout: Replace UA stylesheet usage of legacy :matches by :is - #44837
Conversation
|
🔨 Triggering try run (#25638098543) for Linux (WPT) |
|
Test results for linux-wpt from try job (#25638098543): Flaky unexpected result (27)
Stable unexpected results that are known to be intermittent (21)
Stable unexpected results (6)
|
|
|
|
You can use |
These rules were ignored because :matches is legacy, but were removed from the standard: whatwg/html#7867 Signed-off-by: avis137 <[email protected]>
Several rules were not used because Stylo does not implement the legacy :matches alias. Fixes servo#43355 Signed-off-by: avis137 <[email protected]>
Signed-off-by: avis137 <[email protected]>
58ac61e to
db44faa
Compare
|
Excuse me, I somehow hadn't expected there'd be any coverage. Should have foreseen it. I have updated the expected tests results. |
|
|
||
|
|
||
| :matches(table, thead, tbody, tfoot, tr) > form { | ||
| :is(table, thead, tbody, tfoot, tr) > form { |
There was a problem hiding this comment.
This should be restricted to HTML documents. https://html.spec.whatwg.org/multipage/rendering.html#tables-2
Gecko uses
:is(tr, tbody, thead, tfoot, table) > form:-moz-is-html {
/* Important: don't show these forms in HTML */
display: none !important;
}I guess we need to add a similar pseudo-class for Servo. It doesn't have to block this PR, but at least add a TODO comment pointing to some tracking issue.
There was a problem hiding this comment.
I would be willing to try to implement a :-servo-is-html pseudo-class in Stylo and Servo should this be the preferred approach, but I imagine there are alternatives too, so I wouldn't want to just go ahead.
In any case, I have opened issue #44886 yesterday to track the current limitation.
TimvdLippe
left a comment
There was a problem hiding this comment.
Approving and Oriols comment can be tackled in a follow-up PR. Thanks for investigating and fixing this!
…vo#44920) Follows-up servo#44837, which applied this rule in all documents. This PR adds a separate stylesheet for HTML documents, as suggested in servo#44886 (comment), which turned out way simpler than I somehow had expected. Testing: more WPT tests passing Fixes: servo#44886, as this rule appears to be the only case where a distinction between HTML and non-HTML documents is needed Signed-off-by: avis137 <[email protected]>
Several UA stylesheet rules were ignored because Stylo does not implement the legacy :matches alias.
This pull request replaces all occurrences of the legacy :matches() pseudo-selector by :is() selectors,
except for the h1-h6 in section rules that are removed as they are no longer in the specification (whatwg/html#7867).
Testing: existing WPT tests have new passes, and new expected fails of tests that seem outdated (https://bugzilla.mozilla.org/show_bug.cgi?id=1887417#c3)
Fixes: #43355