| Summary: | [css-cascade] "related-property" logic for (-webkit-)text-orientation is broken | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Oriol Brufau <obrufau> | ||||||||||||||
| Component: | CSS | Assignee: | Oriol Brufau <obrufau> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, joepeck, koivisto, macpherson, menard, simon.fraser, webkit-bug-importer | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| Bug Depends on: | |||||||||||||||||
| Bug Blocks: | 238350 | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Oriol Brufau
2022-03-24 16:46:36 PDT
For revert-layer this implies a problem like bug 238125 (but it would need to be addressed in a different way). This example is not upright: @layer { div { writing-mode: vertical-lr; text-orientation: upright; } } @layer { div { -webkit-text-orientation: revert-layer; } } And CSSOM is also broken: CSS.supports("text-orientation", "sideways-right"); // false document.body.style.webkitTextOrientation = "sideways-right"; document.body.style.textOrientation; // "sideways-right" !!! invalid value Since the only difference between these properties is that -webkit-text-orientation accepts sideways-right, but this value always computes to sideways, I would: 1. Make -webkit-text-orientation an shorthand of text-orientation 2. Alias sideways-right into sideways at parse time This is similar to the example in the spec https://drafts.csswg.org/css-cascade/#legacy-shorthand, which says that page-break-before:always expands to break-before:page at parse time. Created attachment 455718 [details]
Patch
Created attachment 455750 [details]
Patch
Created attachment 455751 [details]
Patch
Created attachment 455754 [details]
Patch
PTAL Comment on attachment 455754 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455754&action=review > Source/WebCore/css/parser/CSSPropertyParser.cpp:5659 > + else > + return false; > + if (!keyword || !m_range.atEnd()) > + return false; could just remove the else brach, it will hit the !keyword case Created attachment 456807 [details]
Patch
Comment on attachment 456807 [details] Patch (In reply to Antti Koivisto from comment #8) > Comment on attachment 455754 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=455754&action=review > > > Source/WebCore/css/parser/CSSPropertyParser.cpp:5659 > > + else > > + return false; > > + if (!keyword || !m_range.atEnd()) > > + return false; > > could just remove the else brach, it will hit the !keyword case Done. Committed r292463 (249314@main): <https://commits.webkit.org/249314@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456807 [details]. |