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

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

Issue 14916006: Merge 149874 "DevTools: Do not unbind stylesheets in multiframe ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1500/
Patch Set: Created 7 years, 7 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/inspector/InspectorCSSAgent.h ('k') | Source/core/inspector/InspectorInstrumentation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCSSAgent.cpp
===================================================================
--- Source/core/inspector/InspectorCSSAgent.cpp (revision 150193)
+++ Source/core/inspector/InspectorCSSAgent.cpp (working copy)
@@ -736,11 +736,11 @@
m_frontend->regionLayoutUpdated(buildObjectForNamedFlow(&errorString, namedFlow, documentNodeId));
}
-void InspectorCSSAgent::activeStyleSheetsUpdated(const Vector<RefPtr<StyleSheet> >& newSheets)
+void InspectorCSSAgent::activeStyleSheetsUpdated(Document* document, const Vector<RefPtr<StyleSheet> >& newSheets)
{
HashSet<CSSStyleSheet*> removedSheets;
for (CSSStyleSheetToInspectorStyleSheet::iterator it = m_cssStyleSheetToInspectorStyleSheet.begin(); it != m_cssStyleSheetToInspectorStyleSheet.end(); ++it) {
- if (it->value->canBind())
+ if (it->value->canBind() && (!it->key->ownerDocument() || it->key->ownerDocument() == document))
removedSheets.add(it->key);
}
@@ -782,6 +782,15 @@
}
}
+void InspectorCSSAgent::frameDetachedFromParent(Frame* frame)
+{
+ Document* document = frame->document();
+ if (!document)
+ return;
+ Vector<RefPtr<StyleSheet> > newSheets;
+ activeStyleSheetsUpdated(document, newSheets);
+}
+
bool InspectorCSSAgent::forcePseudoState(Element* element, CSSSelector::PseudoType pseudoType)
{
if (m_nodeIdToForcedPseudoState.isEmpty())
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.h ('k') | Source/core/inspector/InspectorInstrumentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698