Writing-mode-dependent properties don't apply if their value is a variable
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2016 18:33:02 +0000 (18:33 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jun 2016 18:33:02 +0000 (18:33 +0000)
commitc9dfcee2c49efa7b4f23ebff9ba6221f37360136
tree62fbeeec414804b1011b3a22781a77b6b44419c8
parentb7310618cd4863ea4e00fe28468717f5b785e130
Writing-mode-dependent properties don't apply if their value is a variable
https://bugs.webkit.org/show_bug.cgi?id=158449
<rdar://problem/26662478>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/css/variables/direction-dependent-variable-properties.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseVariableDependentValue):
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::resolvedVariableValue):
CSSVariableDependentValue stores the unresolved (direction-dependent) property ID,
because the property that it resolves to cannot be determined until style resolution time.
Plumb the requisite direction and writing mode information into parseVariableDependentValue
at style resolution time so that the property can be resolved to the correct
non-direction-dependent property for each use of the value.

LayoutTests:

* fast/css/variables/direction-dependent-variable-properties-expected.html: Added.
* fast/css/variables/direction-dependent-variable-properties.html: Added.
Add a test ensuring that direction-dependent properties work correctly,
including flipping when the direction is flipped.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/variables/direction-dependent-variable-properties-expected.html [new file with mode: 0644]
LayoutTests/fast/css/variables/direction-dependent-variable-properties.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/StyleResolver.cpp