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

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

Issue 11048052: Merge 130511 - Web Inspector: [Styles] Unable to edit properties in broken stylesheets (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 | « Source/WebCore/css/CSSParser.h ('k') | 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 131160)
+++ Source/WebCore/css/CSSParser.cpp (working copy)
@@ -9986,6 +9986,7 @@
return 0;
ASSERT(!m_currentRuleDataStack->isEmpty());
+ m_currentRuleData.clear();
RefPtr<CSSRuleSourceData> data = m_currentRuleDataStack->last();
m_currentRuleDataStack->removeLast();
return data.release();
@@ -10290,8 +10291,14 @@
{
if (!isExtractingSourceData())
return;
+
+ // Pop off data for a previous invalid rule.
+ if (m_currentRuleData)
+ m_currentRuleDataStack->removeLast();
+
RefPtr<CSSRuleSourceData> data = CSSRuleSourceData::create(ruleType);
data->ruleHeaderRange.start = tokenStartOffset();
+ m_currentRuleData = data;
m_currentRuleDataStack->append(data.release());
}
@@ -10325,6 +10332,7 @@
{
if (!isExtractingSourceData())
return;
+ m_currentRuleData.clear();
unsigned offset = tokenStartOffset();
if (tokenStartChar() == '{')
++offset; // Skip the rule body opening brace.
« no previous file with comments | « Source/WebCore/css/CSSParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698