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

Unified Diff: Source/WebCore/css/CSSParser.cpp

Issue 11183028: Merge 130883 - Web Inspector: Semantically incorrect CSS rules result in broken source code data (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 2 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/WebCore/css/CSSParser.cpp
===================================================================
--- Source/WebCore/css/CSSParser.cpp (revision 131562)
+++ Source/WebCore/css/CSSParser.cpp (working copy)
@@ -9566,8 +9566,10 @@
StyleRuleBase* CSSParser::createImportRule(const CSSParserString& url, MediaQuerySet* media)
{
- if (!media || !m_allowImportRules)
+ if (!media || !m_allowImportRules) {
+ popRuleData();
return 0;
+ }
RefPtr<StyleRuleImport> rule = StyleRuleImport::create(url, media);
StyleRuleImport* result = rule.get();
m_parsedRules.append(rule.release());
@@ -9679,6 +9681,7 @@
// have 'initial' value and cannot 'inherit' from parent.
// See http://dev.w3.org/csswg/css3-fonts/#font-family-desc
clearProperties();
+ popRuleData();
return 0;
}
}
@@ -9768,7 +9771,8 @@
pageRule = rule.get();
m_parsedRules.append(rule.release());
processAndAddNewRuleToSourceTreeIfNeeded();
- }
+ } else
+ popRuleData();
clearProperties();
return pageRule;
}
@@ -9781,8 +9785,10 @@
StyleRuleBase* CSSParser::createRegionRule(Vector<OwnPtr<CSSParserSelector> >* regionSelector, RuleList* rules)
{
- if (!cssRegionsEnabled() || !regionSelector || !rules)
+ if (!cssRegionsEnabled() || !regionSelector || !rules) {
+ popRuleData();
return 0;
+ }
m_allowImportRules = m_allowNamespaceDeclarations = false;
« 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