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

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

Issue 23629018: DevTools: show styles for shadow dom elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix inspector-enabled test Created 7 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/core/css/InspectorCSSOMWrappers.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index 75a4b93b0206a9d50178f2e8871aab94623d78c6..8ae033bb045d2631f530de7126b151370f720eaa 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -878,15 +878,19 @@ void InspectorCSSAgent::wasEnabled(PassRefPtr<EnableCallback> callback)
return;
}
- // Re-read stylesheets, we know for sure we have content for all of them.
Vector<InspectorStyleSheet*> styleSheets;
collectAllStyleSheets(styleSheets);
for (size_t i = 0; i < styleSheets.size(); ++i)
m_frontend->styleSheetAdded(styleSheets.at(i)->buildObjectForStyleSheetInfo());
- if (callback)
- callback->sendSuccess();
+ // More styleSheetAdded events will be generated below.
m_instrumentingAgents->setInspectorCSSAgent(this);
+ Vector<Document*> documents = m_domAgent->documents();
+ for (Vector<Document*>::iterator it = documents.begin(); it != documents.end(); ++it)
+ (*it)->styleEngine()->updateActiveStyleSheets(FullStyleUpdate);
+
+ if (callback)
+ callback->sendSuccess();
}
void InspectorCSSAgent::disable(ErrorString*)
« no previous file with comments | « Source/core/css/InspectorCSSOMWrappers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698