Changeset 143948 in webkit
- Timestamp:
- Feb 25, 2013 10:56:19 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r143931 r143948 1 2013-02-25 Alexis Menard <alexis@webkit.org> 2 3 transition-property property doesn't accept "all, <IDENT>". 4 https://bugs.webkit.org/show_bug.cgi?id=110074 5 6 Reviewed by Dean Jackson. 7 8 Extend exising test to cover the bug. 9 10 * transitions/transitions-parsing-expected.txt: 11 * transitions/transitions-parsing.html: 12 1 13 2013-02-25 Sergio Villar Senin <svillar@igalia.com> 2 14 -
trunk/LayoutTests/transitions/transitions-parsing-expected.txt
r143019 r143948 27 27 PASS style.webkitTransitionProperty is 'background-position, font-size, color' 28 28 PASS computedStyle.webkitTransitionProperty is 'background-position, font-size, color' 29 PASS style.transitionProperty is 'all, font-size, color' 30 PASS computedStyle.transitionProperty is 'all, font-size, color' 31 PASS style.webkitTransitionProperty is 'all, font-size, color' 32 PASS computedStyle.webkitTransitionProperty is 'all, font-size, color' 33 PASS style.transitionProperty is 'font-size, color, all' 34 PASS computedStyle.transitionProperty is 'font-size, color, all' 35 PASS style.webkitTransitionProperty is 'font-size, color, all' 36 PASS computedStyle.webkitTransitionProperty is 'font-size, color, all' 37 PASS style.transitionProperty is 'font-size, all, color' 38 PASS computedStyle.transitionProperty is 'font-size, all, color' 39 PASS style.webkitTransitionProperty is 'font-size, all, color' 40 PASS computedStyle.webkitTransitionProperty is 'font-size, all, color' 29 41 Invalid transition-property values. 30 42 PASS style.transitionProperty is '' -
trunk/LayoutTests/transitions/transitions-parsing.html
r143019 r143948 59 59 shouldBe("style.webkitTransitionProperty", "'background-position, font-size, color'"); 60 60 shouldBe("computedStyle.webkitTransitionProperty", "'background-position, font-size, color'"); 61 62 style.transitionProperty = "all, font-size, color"; 63 shouldBe("style.transitionProperty", "'all, font-size, color'"); 64 shouldBe("computedStyle.transitionProperty", "'all, font-size, color'"); 65 shouldBe("style.webkitTransitionProperty", "'all, font-size, color'"); 66 shouldBe("computedStyle.webkitTransitionProperty", "'all, font-size, color'"); 67 68 style.transitionProperty = "font-size, color, all"; 69 shouldBe("style.transitionProperty", "'font-size, color, all'"); 70 shouldBe("computedStyle.transitionProperty", "'font-size, color, all'"); 71 shouldBe("style.webkitTransitionProperty", "'font-size, color, all'"); 72 shouldBe("computedStyle.webkitTransitionProperty", "'font-size, color, all'"); 73 74 style.transitionProperty = "font-size, all, color"; 75 shouldBe("style.transitionProperty", "'font-size, all, color'"); 76 shouldBe("computedStyle.transitionProperty", "'font-size, all, color'"); 77 shouldBe("style.webkitTransitionProperty", "'font-size, all, color'"); 78 shouldBe("computedStyle.webkitTransitionProperty", "'font-size, all, color'"); 61 79 62 80 debug("Invalid transition-property values."); -
trunk/Source/WebCore/ChangeLog
r143947 r143948 1 2013-02-25 Alexis Menard <alexis@webkit.org> 2 3 transition-property property doesn't accept "all, <IDENT>". 4 https://bugs.webkit.org/show_bug.cgi?id=110074 5 6 Reviewed by Dean Jackson. 7 8 http://dev.w3.org/csswg/css3-transitions/#transition-property-property 9 allows all, <IDENT> as a value for the transition-property property. In 10 fact thanks to http://trac.webkit.org/changeset/143019 we correctly 11 implemented that behavior for transition shorthand property while 12 fixing bugs on the previous implementation. We did introduce a 13 AnimationParseContext to track whether the parsing of the 14 transition-property was finished or not in relation to the keyword. 15 This patch extend that mechanism to the longhand by renaming the 16 boolean and the functions to use it in the context class and set it 17 correctly while parsing the longhand property. 18 19 Test: LayoutTests/transitions/transitions-parsing.html 20 21 * css/CSSParser.cpp: 22 (WebCore::AnimationParseContext::AnimationParseContext): 23 (WebCore::AnimationParseContext::commitAnimationPropertyKeyword): 24 (WebCore::AnimationParseContext::animationPropertyKeywordAllowed): 25 (AnimationParseContext): 26 (WebCore::CSSParser::parseAnimationShorthand): 27 (WebCore::CSSParser::parseTransitionShorthand): 28 (WebCore::CSSParser::parseAnimationProperty): We can remove the 29 condition inShorthand() here, if 'none' is parsed then no more keyword 30 can appear, if 'all' is parsed then we can continue the parsing but 31 invalidate the property if another keyword is encountered. These 32 conditions are valid for the shorthand and the longhand. 33 1 34 2013-02-25 No'am Rosenthal <noam@webkit.org> 2 35 -
trunk/Source/WebCore/css/CSSParser.cpp
r143028 r143948 203 203 public: 204 204 AnimationParseContext() 205 : m_animationPropertyKeyword InShorthandAllowed(true)205 : m_animationPropertyKeywordAllowed(true) 206 206 , m_firstAnimationCommitted(false) 207 207 , m_hasSeenAnimationPropertyKeyword(false) … … 219 219 } 220 220 221 void commitAnimationPropertyKeyword InShorthand()221 void commitAnimationPropertyKeyword() 222 222 { 223 m_animationPropertyKeyword InShorthandAllowed = false;224 } 225 226 bool animationPropertyKeyword InShorthandAllowed() const223 m_animationPropertyKeywordAllowed = false; 224 } 225 226 bool animationPropertyKeywordAllowed() const 227 227 { 228 return m_animationPropertyKeyword InShorthandAllowed;228 return m_animationPropertyKeywordAllowed; 229 229 } 230 230 … … 240 240 241 241 private: 242 bool m_animationPropertyKeyword InShorthandAllowed;242 bool m_animationPropertyKeywordAllowed; 243 243 bool m_firstAnimationCommitted; 244 244 bool m_hasSeenAnimationPropertyKeyword; … … 3309 3309 3310 3310 // There are more values to process but 'none' or 'all' were already defined as the animation property, the declaration becomes invalid. 3311 if (!context.animationPropertyKeyword InShorthandAllowed() && context.hasCommittedFirstAnimation())3311 if (!context.animationPropertyKeywordAllowed() && context.hasCommittedFirstAnimation()) 3312 3312 return false; 3313 3313 } … … 3367 3367 3368 3368 // There are more values to process but 'none' or 'all' were already defined as the animation property, the declaration becomes invalid. 3369 if (!context.animationPropertyKeyword InShorthandAllowed() && context.hasCommittedFirstAnimation())3369 if (!context.animationPropertyKeywordAllowed() && context.hasCommittedFirstAnimation()) 3370 3370 return false; 3371 3371 } … … 4429 4429 return cssValuePool().createIdentifierValue(result); 4430 4430 if (equalIgnoringCase(value, "all")) { 4431 if ( inShorthand() &&context.hasSeenAnimationPropertyKeyword())4432 context.commitAnimationPropertyKeyword InShorthand();4431 if (context.hasSeenAnimationPropertyKeyword()) 4432 context.commitAnimationPropertyKeyword(); 4433 4433 context.sawAnimationPropertyKeyword(); 4434 4434 return cssValuePool().createIdentifierValue(CSSValueAll); 4435 4435 } 4436 4436 if (equalIgnoringCase(value, "none")) { 4437 if (inShorthand()) 4438 context.commitAnimationPropertyKeywordInShorthand(); 4437 context.commitAnimationPropertyKeyword(); 4439 4438 context.sawAnimationPropertyKeyword(); 4440 4439 return cssValuePool().createIdentifierValue(CSSValueNone); … … 4604 4603 case CSSPropertyWebkitTransitionProperty: 4605 4604 currValue = parseAnimationProperty(context); 4606 if (value && context.hasSeenAnimationPropertyKeyword())4605 if (value && !context.animationPropertyKeywordAllowed()) 4607 4606 return false; 4608 4607 if (currValue)
Note: See TracChangeset
for help on using the changeset viewer.