Changeset 201875 in webkit
- Timestamp:
- Jun 9, 2016 11:33:02 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201874 r201875 1 2016-06-09 Tim Horton <timothy_horton@apple.com> 2 3 Writing-mode-dependent properties don't apply if their value is a variable 4 https://bugs.webkit.org/show_bug.cgi?id=158449 5 <rdar://problem/26662478> 6 7 Reviewed by Simon Fraser. 8 9 * fast/css/variables/direction-dependent-variable-properties-expected.html: Added. 10 * fast/css/variables/direction-dependent-variable-properties.html: Added. 11 Add a test ensuring that direction-dependent properties work correctly, 12 including flipping when the direction is flipped. 13 1 14 2016-06-09 Ryan Haddad <ryanhaddad@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r201870 r201875 1 2016-06-09 Tim Horton <timothy_horton@apple.com> 2 3 Writing-mode-dependent properties don't apply if their value is a variable 4 https://bugs.webkit.org/show_bug.cgi?id=158449 5 <rdar://problem/26662478> 6 7 Reviewed by Simon Fraser. 8 9 Test: fast/css/variables/direction-dependent-variable-properties.html 10 11 * css/CSSParser.cpp: 12 (WebCore::CSSParser::parseVariableDependentValue): 13 * css/CSSParser.h: 14 * css/StyleResolver.cpp: 15 (WebCore::StyleResolver::resolvedVariableValue): 16 CSSVariableDependentValue stores the unresolved (direction-dependent) property ID, 17 because the property that it resolves to cannot be determined until style resolution time. 18 Plumb the requisite direction and writing mode information into parseVariableDependentValue 19 at style resolution time so that the property can be resolved to the correct 20 non-direction-dependent property for each use of the value. 21 1 22 2016-06-09 Ryan Haddad <ryanhaddad@apple.com> 2 23 -
trunk/Source/WebCore/css/CSSParser.cpp
r201759 r201875 1857 1857 } 1858 1858 1859 RefPtr<CSSValue> CSSParser::parseVariableDependentValue(CSSPropertyID propID, const CSSVariableDependentValue& dependentValue, const CustomPropertyValueMap& customProperties )1859 RefPtr<CSSValue> CSSParser::parseVariableDependentValue(CSSPropertyID propID, const CSSVariableDependentValue& dependentValue, const CustomPropertyValueMap& customProperties, TextDirection direction, WritingMode writingMode) 1860 1860 { 1861 1861 m_valueList.reset(new CSSParserValueList()); 1862 1862 if (!dependentValue.valueList().buildParserValueListSubstitutingVariables(m_valueList.get(), customProperties)) 1863 1863 return nullptr; 1864 if (!parseValue(dependentValue.propertyID(), false)) 1864 1865 CSSPropertyID dependentValuePropertyID = dependentValue.propertyID(); 1866 if (CSSProperty::isDirectionAwareProperty(dependentValuePropertyID)) 1867 dependentValuePropertyID = CSSProperty::resolveDirectionAwareProperty(dependentValuePropertyID, direction, writingMode); 1868 1869 if (!parseValue(dependentValuePropertyID, false)) 1865 1870 return nullptr; 1871 1866 1872 for (auto& property : m_parsedProperties) { 1867 1873 if (property.id() == propID) -
trunk/Source/WebCore/css/CSSParser.h
r201759 r201875 500 500 void setCustomPropertyName(const AtomicString& propertyName) { m_customPropertyName = propertyName; } 501 501 502 RefPtr<CSSValue> parseVariableDependentValue(CSSPropertyID, const CSSVariableDependentValue&, const CustomPropertyValueMap& customProperties );502 RefPtr<CSSValue> parseVariableDependentValue(CSSPropertyID, const CSSVariableDependentValue&, const CustomPropertyValueMap& customProperties, TextDirection, WritingMode); 503 503 504 504 private: -
trunk/Source/WebCore/css/StyleResolver.cpp
r201818 r201875 1699 1699 { 1700 1700 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()); 1702 1702 } 1703 1703
Note: See TracChangeset
for help on using the changeset viewer.