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

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: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSParserImpl.cpp
diff --git a/Source/core/css/parser/CSSParserImpl.cpp b/Source/core/css/parser/CSSParserImpl.cpp
index 86fcd3b63a83eec7420d2d24c3a79e591e96a551..b6664c6fb7a85523fba7ae090ba3307554cf8819 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,10 @@ void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRule::Typ
}
}
+ // Properties labelled !important in @keyframes or @font-face should be ignored
Timothy Loh 2015/05/28 04:47:03 I don't think this comment adds any value
patro 2015/05/28 08:20:52 Removed it Done.
+ if (important && (ruleType == StyleRule::FontFace || ruleType == StyleRule::Keyframes))
+ return;
+
if (m_observerWrapper && ruleType == StyleRule::Style) {
size_t propertiesCount = m_parsedProperties.size();
if (unresolvedProperty != CSSPropertyInvalid)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698