Ignore:
Timestamp:
Jun 9, 2016, 11:33:02 AM (9 years ago)
Author:
timothy_horton@apple.com
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r201818 r201875  
    16991699{
    17001700    CSSParser parser(m_state.document());
    1701     return parser.parseVariableDependentValue(propID, value, m_state.style()->customProperties());
     1701    return parser.parseVariableDependentValue(propID, value, m_state.style()->customProperties(), m_state.style()->direction(), m_state.style()->writingMode());
    17021702}
    17031703
Note: See TracChangeset for help on using the changeset viewer.