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

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

Issue 11171004: 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/1271/
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 131428)
+++ Source/WebCore/css/CSSParser.cpp (working copy)
@@ -9925,8 +9925,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());
@@ -10038,6 +10040,7 @@
// have 'initial' value and cannot 'inherit' from parent.
// See http://dev.w3.org/csswg/css3-fonts/#font-family-desc
clearProperties();
+ popRuleData();
return 0;
}
}
@@ -10127,7 +10130,8 @@
pageRule = rule.get();
m_parsedRules.append(rule.release());
processAndAddNewRuleToSourceTreeIfNeeded();
- }
+ } else
+ popRuleData();
clearProperties();
return pageRule;
}
@@ -10140,8 +10144,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