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

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

Issue 825063004: CSS Parser: Support CDO and CDC tokens (<!--, -->) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@lang
Patch Set: Created 5 years, 11 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/build/scripts/make_css_tokenizer_codepoints.py ('k') | Source/core/css/parser/CSSParserToken.h » ('j') | 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 3987786d64c1312acca2d4cc223e4d2ee47a4774..e25b2329de6aa69a2759c9ca6c7fb2a350e28472 100644
--- a/Source/core/css/parser/CSSParserImpl.cpp
+++ b/Source/core/css/parser/CSSParserImpl.cpp
@@ -159,8 +159,14 @@ WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>> CSSParserImpl::consumeRuleLi
if (PassRefPtrWillBeRawPtr<StyleRuleBase> rule = consumeAtRule(range, allowedRules))
result.append(rule);
break;
+ case CDOToken:
+ case CDCToken:
+ if (ruleListType == TopLevelRuleList) {
+ range.consume();
+ break;
+ }
+ // fallthrough
default:
- // FIXME: TopLevelRuleList should skip <CDO-token> and <CDC-token>
if (PassRefPtrWillBeRawPtr<StyleRuleBase> rule = consumeQualifiedRule(range, allowedRules))
result.append(rule);
break;
« no previous file with comments | « Source/build/scripts/make_css_tokenizer_codepoints.py ('k') | Source/core/css/parser/CSSParserToken.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698