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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp

Issue 1386733003: Do not accept CSS-wide keywords for descriptors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V7 Created 4 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: third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
index c378fc45ba617776492f9f5bd49246676a20e223..e8c8a824d4d7345a5f6a0d9ab9a92534d70c9479 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
@@ -844,6 +844,10 @@ static CSSValue* parseKeywordValue(CSSPropertyID propertyId, const String& strin
// Parse initial/inherit shorthands using the CSSPropertyParser.
if (shorthandForProperty(propertyId).length())
return nullptr;
+
+ // Descriptors do not support css wide keywords.
+ if (CSSPropertyMetadata::isDescriptor(propertyId))
Timothy Loh 2016/05/19 05:44:42 Maybe this check should just be at the top of the
rwlbuis 2016/05/20 00:51:11 This was placed here to minimize calls to isDescri
+ return nullptr;
}
CSSParserString cssString;

Powered by Google App Engine
This is Rietveld 408576698