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.
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?
<rdar://problem/26662478>
<rdar://problem/26662474>
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.