Summary: | Writing-mode-dependent properties don't apply if their value is a variable | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||||
Component: | CSS | Assignee: | Tim Horton <thorton> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, hyatt, koivisto, mitz, sam, simon.fraser, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
I did some debugging, and found the point where this goes wrong, but I’m not sure how to fix it. Once we get into CSSParser::parseVariableDependentValue, our propID is the resolved one (PaddingLeft, for example). The CSSVariableDependentValue still has the unresolved propID (WebkitPaddingStart), though, so the comparison (property.id() == propID) fails, and we end up returning nullptr. I’m not sure if/when we should be doing the resolution, though. Inside parseVariableDependentValue? Created attachment 280928 [details]
Patch
Comment on attachment 280928 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=280928&action=review > Source/WebCore/css/CSSParser.cpp:1871 > for (auto& property : m_parsedProperties) { I would prefer a blank line above this one. Created attachment 280929 [details]
Patch
Comment on attachment 280929 [details] Patch Clearing flags on attachment: 280929 Committed r201875: <http://trac.webkit.org/changeset/201875> All reviewed patches have been landed. Closing bug. |
Created attachment 280647 [details] repro The two boxes in the attached test case should render identically. However, the box which has -webkit-padding-start: var(--margin-leading); ends up getting no horizontal padding, because referencing variables in writing-mode/direction-dependent properties does not work.