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

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: Created 6 years, 7 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
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 4c4a35831317a2a576e69bd69131b7fd358b34af..705111449d31c69b42fecf1f2710c7e007e5b7b5 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1893,7 +1893,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);
@@ -1934,8 +1934,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
@@ -3080,7 +3080,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty()
return cssValuePool().createIdentifierValue(CSSValueAll);
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)

Powered by Google App Engine
This is Rietveld 408576698