Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 298043007: Support unknown property strings in transition-property (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/StylePropertyShorthandCustom.cpp ('k') | Source/core/css/resolver/CSSToStyleMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 529f929f638276ae40d72b8dcb31b5ca10865dd7..5431a1a06c4a70be1d11560a18377168b63e9a50 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1897,7 +1897,7 @@ bool CSSPropertyParser::parseAnimationShorthand(CSSPropertyID propId, bool impor
bool CSSPropertyParser::parseTransitionShorthand(CSSPropertyID propId, bool important)
{
const unsigned numProperties = 4;
- const StylePropertyShorthand& shorthand = shorthandForProperty(propId);
+ const StylePropertyShorthand& shorthand = parsingShorthandForProperty(propId);
ASSERT(numProperties == shorthand.length());
ShorthandScope scope(this, propId);
@@ -1938,8 +1938,8 @@ bool CSSPropertyParser::parseTransitionShorthand(CSSPropertyID propId, bool impo
return false;
}
- ASSERT(shorthand.properties()[0] == CSSPropertyTransitionProperty || shorthand.properties()[0] == CSSPropertyWebkitTransitionProperty);
- if (!isValidTransitionPropertyList(values[0].get()))
+ ASSERT(shorthand.properties()[3] == CSSPropertyTransitionProperty || shorthand.properties()[3] == CSSPropertyWebkitTransitionProperty);
+ if (!isValidTransitionPropertyList(values[3].get()))
return false;
// Fill in any remaining properties with the initial value and add
@@ -3087,7 +3087,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty()
return cssValuePool().createIdentifierValue(result);
if (equalIgnoringCase(value, "none"))
return cssValuePool().createIdentifierValue(CSSValueNone);
- return nullptr;
+ if (equalIgnoringCase(value, "inherit") || equalIgnoringCase(value, "initial"))
+ return nullptr;
+ return createPrimitiveStringValue(value);
}
bool CSSPropertyParser::parseWebkitTransformOriginShorthand(RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2, RefPtrWillBeRawPtr<CSSValue>& value3)
« no previous file with comments | « Source/core/css/StylePropertyShorthandCustom.cpp ('k') | Source/core/css/resolver/CSSToStyleMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698