Changeset 202950 in webkit
- Timestamp:
- Jul 7, 2016, 5:20:38 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/css/shorthand-omitted-initial-value-overrides-shorthand.html (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSParser.cpp (modified) (2 diffs)
-
Source/WebCore/css/CSSParser.h (modified) (1 diff)
-
Source/WebCore/css/StyleProperties.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202948 r202950 1 2016-07-07 Dean Jackson <dino@apple.com> 2 3 REGRESSION(r200769): animations are no longer overridden 4 https://bugs.webkit.org/show_bug.cgi?id=159450 5 <rdar://problem/27120570> 6 7 Reviewed by Zalan Bujtas. 8 9 Update an existing test to exercise a prefixed form applying 10 to non-prefixed longhands. 11 12 * fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt: 13 * fast/css/shorthand-omitted-initial-value-overrides-shorthand.html: 14 1 15 2016-07-07 Myles C. Maxfield <mmaxfield@apple.com> 2 16 -
trunk/LayoutTests/fast/css/shorthand-omitted-initial-value-overrides-shorthand-expected.txt
r200769 r202950 10 10 PASS transition-delay 11 11 12 Prefixed transition properties 13 PASS transition-property 14 PASS transition-property 15 PASS transition-property 16 PASS transition-property 17 12 18 Animation properties 13 19 PASS animation-name … … 20 26 PASS animation-fill-mode 21 27 28 Prefixed animation properties 29 PASS -webkit-animation-name 30 PASS animation-name 31 PASS -webkit-animation-name 32 PASS animation-name 33 22 34 PASS successfullyParsed is true 23 35 -
trunk/LayoutTests/fast/css/shorthand-omitted-initial-value-overrides-shorthand.html
r200769 r202950 25 25 26 26 debug(""); 27 debug("Prefixed transition properties"); 28 testStyle("-webkit-transition-property: none; transition: 1s;", "transition-property", "all"); 29 testStyle("-webkit-transition-property: none; -webkit-transition: 1s;", "transition-property", "all"); 30 testStyle("transition-property: none; transition: 1s;", "transition-property", "all"); 31 testStyle("transition-property: none; -webkit-transition: 1s;", "transition-property", "all"); 32 33 debug(""); 27 34 debug("Animation properties"); 28 35 testStyle("animation-name: foo; animation: 1s;", "animation-name", "none"); … … 36 43 37 44 debug(""); 45 debug("Prefixed animation properties"); 46 testStyle("-webkit-animation-name: foo; -webkit-animation: none;", "-webkit-animation-name", "none"); 47 testStyle("-webkit-animation-name: foo; animation: none;", "animation-name", "none"); 48 testStyle("animation-name: foo; -webkit-animation: none;", "-webkit-animation-name", "none"); 49 testStyle("animation-name: foo; animation: none;", "animation-name", "none"); 50 51 debug(""); 38 52 successfullyParsed = true; 39 53 -
trunk/Source/WebCore/ChangeLog
r202949 r202950 1 2016-07-07 Dean Jackson <dino@apple.com> 2 3 REGRESSION(r200769): animations are no longer overridden 4 https://bugs.webkit.org/show_bug.cgi?id=159450 5 <rdar://problem/27120570> 6 7 Reviewed by Zalan Bujtas. 8 9 The change in r200769 removed a lot of the prefixing variant 10 handling, but unfortunately we can't be completely rid 11 of it until we alias the prefixed transitions and animations 12 to the non-prefixed form. For example, setting the prefixed 13 shorthand has to reset the non-prefixed longhands. 14 15 The fix was to explicitly call the variant forms when 16 parsing such longhands, and make sure that MutableStyleProperties 17 removes all prefixed variants when removing shorthands. 18 19 The existing test was amended to cover this case: 20 fast/css/shorthand-omitted-initial-value-overrides-shorthand.html 21 22 * css/CSSParser.cpp: 23 (WebCore::CSSParser::parseAnimationShorthand): 24 (WebCore::CSSParser::addPropertyWithPrefixingVariant): 25 (WebCore::CSSParser::parseTransitionShorthand): 26 * css/CSSParser.h: 27 * css/StyleProperties.cpp: 28 (WebCore::MutableStyleProperties::removeShorthandProperty): 29 1 30 2016-07-07 Alex Christensen <achristensen@webkit.org> 2 31 -
trunk/Source/WebCore/css/CSSParser.cpp
r202765 r202950 3813 3813 } 3814 3814 3815 // Fill in any remaining properties with the initial value. 3815 3816 for (i = 0; i < numProperties; ++i) { 3816 // If we didn't find the property, set an intial value.3817 3817 if (!parsedProperty[i]) 3818 3818 addAnimationValue(values[i], cssValuePool.createImplicitInitialValue()); 3819 3820 addProperty(shorthand.properties()[i], WTFMove(values[i]), important); 3821 } 3819 } 3820 3821 // Now add all of the properties we found. 3822 // In this case we have to explicitly set the variant form as well, 3823 // to make sure that a shorthand clears all existing prefixed and 3824 // unprefixed values. 3825 for (i = 0; i < numProperties; ++i) 3826 addPropertyWithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important); 3822 3827 3823 3828 return true; 3824 3829 } 3830 3831 void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, RefPtr<CSSValue>&& value, bool important, bool implicit) 3832 { 3833 addProperty(propId, value.copyRef(), important, implicit); 3834 3835 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId); 3836 if (prefixingVariant == propId) 3837 return; 3838 3839 if (m_currentShorthand) { 3840 // We can't use ShorthandScope here as we can already be inside one (e.g we are parsing CSSTransition). 3841 m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand); 3842 addProperty(prefixingVariant, WTFMove(value), important, implicit); 3843 m_currentShorthand = prefixingVariantForPropertyId(m_currentShorthand); 3844 } else 3845 addProperty(prefixingVariant, WTFMove(value), important, implicit); 3846 } 3847 3825 3848 3826 3849 RefPtr<CSSPrimitiveValue> CSSParser::parseColumnWidth() … … 3951 3974 3952 3975 // Now add all of the properties we found. 3976 // In this case we have to explicitly set the variant form as well, 3977 // to make sure that a shorthand clears all existing prefixed and 3978 // unprefixed values. 3953 3979 for (i = 0; i < numProperties; ++i) 3954 addProperty (shorthand.properties()[i], WTFMove(values[i]), important);3980 addPropertyWithPrefixingVariant(shorthand.properties()[i], WTFMove(values[i]), important); 3955 3981 3956 3982 return true; -
trunk/Source/WebCore/css/CSSParser.h
r201875 r202950 150 150 std::unique_ptr<MediaQuery> parseMediaQuery(const String&); 151 151 152 void addPropertyWithPrefixingVariant(CSSPropertyID, RefPtr<CSSValue>&&, bool important, bool implicit = false); 152 153 void addProperty(CSSPropertyID, RefPtr<CSSValue>&&, bool important, bool implicit = false); 153 154 void rollbackLastProperties(int num); -
trunk/Source/WebCore/css/StyleProperties.cpp
r202242 r202950 640 640 if (!shorthand.length()) 641 641 return false; 642 return removePropertiesInSet(shorthand.properties(), shorthand.length()); 642 643 bool propertiesWereRemoved = removePropertiesInSet(shorthand.properties(), shorthand.length()); 644 645 CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID); 646 if (prefixingVariant == propertyID) 647 return propertiesWereRemoved; 648 649 StylePropertyShorthand shorthandPrefixingVariant = shorthandForProperty(prefixingVariant); 650 bool prefixedVariantPropertiesWereRemoved = removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length()); 651 return propertiesWereRemoved || prefixedVariantPropertiesWereRemoved; 643 652 } 644 653
Note:
See TracChangeset
for help on using the changeset viewer.