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

Unified Diff: trunk/Source/core/inspector/InspectorCSSAgent.cpp

Issue 196743008: Revert 169371 "DevTools: defer styles delta calculation to until..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | « trunk/Source/core/inspector/InspectorCSSAgent.h ('k') | trunk/Source/core/inspector/InspectorController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/inspector/InspectorCSSAgent.cpp
===================================================================
--- trunk/Source/core/inspector/InspectorCSSAgent.cpp (revision 169387)
+++ trunk/Source/core/inspector/InspectorCSSAgent.cpp (working copy)
@@ -431,22 +431,11 @@
wasEnabled(nullptr);
}
-void InspectorCSSAgent::flushPendingFrontendMessages()
-{
- if (!m_invalidatedDocuments.size())
- return;
- HashSet<Document*> invalidatedDocuments;
- m_invalidatedDocuments.swap(&invalidatedDocuments);
- for (HashSet<Document*>::iterator it = invalidatedDocuments.begin(); it != invalidatedDocuments.end(); ++it)
- updateActiveStyleSheets(*it, ExistingFrontendRefresh);
-}
-
void InspectorCSSAgent::reset()
{
m_idToInspectorStyleSheet.clear();
m_cssStyleSheetToInspectorStyleSheet.clear();
m_documentToCSSStyleSheets.clear();
- m_invalidatedDocuments.clear();
m_nodeToInspectorStyleSheet.clear();
m_documentToViaInspectorStyleSheet.clear();
resetNonPersistentData();
@@ -530,8 +519,8 @@
void InspectorCSSAgent::mediaQueryResultChanged()
{
- flushPendingFrontendMessages();
- m_frontend->mediaQueryResultChanged();
+ if (m_frontend)
+ m_frontend->mediaQueryResultChanged();
}
void InspectorCSSAgent::willMutateRules()
@@ -572,9 +561,7 @@
{
if (styleSheetEditInProgress())
return;
- m_invalidatedDocuments.add(document);
- if (m_creatingViaInspectorStyleSheet)
- flushPendingFrontendMessages();
+ updateActiveStyleSheets(document, ExistingFrontendRefresh);
}
void InspectorCSSAgent::updateActiveStyleSheets(Document* document, StyleSheetsUpdateType styleSheetsUpdateType)
@@ -641,7 +628,6 @@
void InspectorCSSAgent::documentDisposed(Document* document)
{
- m_invalidatedDocuments.remove(document);
setActiveStyleSheets(document, Vector<CSSStyleSheet*>(), ExistingFrontendRefresh);
}
@@ -910,8 +896,6 @@
return;
}
- updateActiveStyleSheets(document, ExistingFrontendRefresh);
-
*outStyleSheetId = inspectorStyleSheet->id();
}
@@ -1332,8 +1316,8 @@
void InspectorCSSAgent::styleSheetChanged(InspectorStyleSheet* styleSheet)
{
- flushPendingFrontendMessages();
- m_frontend->styleSheetChanged(styleSheet->id());
+ if (m_frontend)
+ m_frontend->styleSheetChanged(styleSheet->id());
}
void InspectorCSSAgent::willReparseStyleSheet()
« no previous file with comments | « trunk/Source/core/inspector/InspectorCSSAgent.h ('k') | trunk/Source/core/inspector/InspectorController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698