RESOLVED WORKSFORME 215941
Add ::marker { font-variant-numeric: tabular-nums; } to UA stylesheet per spec
https://bugs.webkit.org/show_bug.cgi?id=215941
Summary Add ::marker { font-variant-numeric: tabular-nums; } to UA stylesheet per spec
Tyler Wilcock
Reported 2020-08-28 12:04:05 PDT
Quoting https://www.w3.org/TR/css-pseudo-4/#marker-pseudo: > UAs must add the following rule to their default style sheet: > ::marker { font-variant-numeric: tabular-nums; }
Attachments
Patch (1.24 KB, patch)
2020-08-28 12:07 PDT, Tyler Wilcock
no flags
Tyler Wilcock
Comment 1 2020-08-28 12:07:16 PDT
Darin Adler
Comment 2 2020-08-28 14:38:13 PDT
Comment on attachment 407493 [details] Patch Code change looks great. Can we add a test, please? Surprised there is no test of this in Web Platform Tests.
Tyler Wilcock
Comment 3 2020-08-28 14:45:46 PDT
Sure, I'll add one and give it another r?.
Tyler Wilcock
Comment 4 2020-08-28 16:05:53 PDT
Actually, I think there is a WPT for the addition of this property, but it started passing here with the addition of `::marker { text-transform }` for some reason: https://bugs.webkit.org/show_bug.cgi?id=214359
Darin Adler
Comment 5 2020-08-30 18:30:35 PDT
That is very strange. Maybe we don’t need this change, then?
Darin Adler
Comment 6 2020-08-30 18:30:54 PDT
If the test is passing that makes it sound like we might not need this code.
Darin Adler
Comment 7 2020-08-31 09:45:21 PDT
It the test already passes without this fix, then there are a few different possibilities: 1) The test is not a very good test, and we need to make a better test that can detect that this is missing. 2) The test is being run incorrectly or skipped, and we need to correct how it’s being run by WebKit’s test machinery. 3) This code change isn’t actually needed for some reason. We should not land the change without figuring this out.
Darin Adler
Comment 8 2020-08-31 09:46:29 PDT
Another possibility is: 4) There is another bug in the implementation of markers that causes the test to pass. A "false negative". Once we fix that other bug then the test will start failing.
Radar WebKit Bug Importer
Comment 9 2020-09-04 12:05:13 PDT
Oriol Brufau
Comment 10 2020-09-13 08:08:56 PDT
(In reply to Darin Adler from comment #7) > 3) This code change isn’t actually needed for some reason. Basically this one. font-variant-numeric is already applied in RenderListItem::computeMarkerStyle https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/rendering/RenderListItem.cpp#L59 However, before bug 214359, I think this wouldn't be reflected in getComputedStyle for unstyled ::marker. BTW, not sure if it's the same in WebKit, but directly adding ::marker in the UA sheet would have disabled some optimizations in Chromium. I had to do it more carefully. See this comment from the link above: > Although the CSS Pseudo-Elements Module Level 4 spec. saids to add ::marker to the UA sheet we apply it here as an optimization because it only applies to markers. That is, it does not apply to all elements.
Darin Adler
Comment 11 2020-09-13 12:56:42 PDT
So I think there is no bug to fix here. Resolving for now. If we can find something wrong, then it’s fine to reopen this bug.
Note You need to log in before you can comment on or make changes to this bug.