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

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

Issue 1151893003: Properties labelled !important must be ignored in keyframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing comments Created 5 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/CSSParserImpl.cpp
diff --git a/Source/core/css/parser/CSSParserImpl.cpp b/Source/core/css/parser/CSSParserImpl.cpp
index 69977dcd316555a0c13d2afcebf9ec548d8d5a18..e27c341c4260b478dfabbd7880ed93a484c7c374 100644
--- a/Source/core/css/parser/CSSParserImpl.cpp
+++ b/Source/core/css/parser/CSSParserImpl.cpp
@@ -661,7 +661,6 @@ void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRule::Typ
if (range.consume().type() != ColonToken)
return; // Parse error
- // FIXME: We shouldn't allow !important in @keyframes or @font-face
bool important = false;
const CSSParserToken* declarationValueEnd = range.end();
const CSSParserToken* last = range.end() - 1;
@@ -677,6 +676,9 @@ void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRule::Typ
}
}
+ if (important && (ruleType == StyleRule::FontFace || ruleType == StyleRule::Keyframes))
+ return;
+
if (m_observerWrapper && ruleType == StyleRule::Style) {
size_t propertiesCount = m_parsedProperties.size();
if (unresolvedProperty != CSSPropertyInvalid)

Powered by Google App Engine
This is Rietveld 408576698