Title: [128427] trunk/Source/WebCore
- Revision
- 128427
- Author
- [email protected]
- Date
- 2012-09-13 01:41:26 -0700 (Thu, 13 Sep 2012)
Log Message
Web Inspector: CSS domain sends events while it is not enabled
https://bugs.webkit.org/show_bug.cgi?id=96615
Reviewed by Yury Semikhatsky.
The CSS agent is put into and removed from the instrumenting agents set upon enable() and disable(), respectively.
Tests will be shortly landed as a part of the new pure protocol testing harness.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::setFrontend):
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::reset):
(WebCore):
(WebCore::InspectorCSSAgent::resetNonPersistentData):
(WebCore::InspectorCSSAgent::enable):
(WebCore::InspectorCSSAgent::disable):
* inspector/InspectorCSSAgent.h:
(InspectorCSSAgent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (128426 => 128427)
--- trunk/Source/WebCore/ChangeLog 2012-09-13 08:41:21 UTC (rev 128426)
+++ trunk/Source/WebCore/ChangeLog 2012-09-13 08:41:26 UTC (rev 128427)
@@ -1,3 +1,25 @@
+2012-09-13 Alexander Pavlov <[email protected]>
+
+ Web Inspector: CSS domain sends events while it is not enabled
+ https://bugs.webkit.org/show_bug.cgi?id=96615
+
+ Reviewed by Yury Semikhatsky.
+
+ The CSS agent is put into and removed from the instrumenting agents set upon enable() and disable(), respectively.
+
+ Tests will be shortly landed as a part of the new pure protocol testing harness.
+
+ * inspector/InspectorCSSAgent.cpp:
+ (WebCore::InspectorCSSAgent::setFrontend):
+ (WebCore::InspectorCSSAgent::clearFrontend):
+ (WebCore::InspectorCSSAgent::reset):
+ (WebCore):
+ (WebCore::InspectorCSSAgent::resetNonPersistentData):
+ (WebCore::InspectorCSSAgent::enable):
+ (WebCore::InspectorCSSAgent::disable):
+ * inspector/InspectorCSSAgent.h:
+ (InspectorCSSAgent):
+
2012-09-12 Ilya Tikhonovsky <[email protected]>
Web Inspector: NMI: migrate core instrumentation code to WTF namespace
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (128426 => 128427)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2012-09-13 08:41:21 UTC (rev 128426)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2012-09-13 08:41:26 UTC (rev 128427)
@@ -541,15 +541,13 @@
{
ASSERT(!m_frontend);
m_frontend = frontend->css();
- m_instrumentingAgents->setInspectorCSSAgent(this);
}
void InspectorCSSAgent::clearFrontend()
{
ASSERT(m_frontend);
m_frontend = 0;
- m_instrumentingAgents->setInspectorCSSAgent(0);
- resetPseudoStates();
+ resetNonPersistentData();
String errorString;
stopSelectorProfilerImpl(&errorString, false);
}
@@ -578,6 +576,11 @@
m_cssStyleSheetToInspectorStyleSheet.clear();
m_nodeToInspectorStyleSheet.clear();
m_documentToInspectorStyleSheet.clear();
+ resetNonPersistentData();
+}
+
+void InspectorCSSAgent::resetNonPersistentData()
+{
m_namedFlowCollectionsRequested.clear();
if (m_updateRegionLayoutTask)
m_updateRegionLayoutTask->reset();
@@ -587,10 +590,12 @@
void InspectorCSSAgent::enable(ErrorString*)
{
m_state->setBoolean(CSSAgentState::cssAgentEnabled, true);
+ m_instrumentingAgents->setInspectorCSSAgent(this);
}
void InspectorCSSAgent::disable(ErrorString*)
{
+ m_instrumentingAgents->setInspectorCSSAgent(0);
m_state->setBoolean(CSSAgentState::cssAgentEnabled, false);
}
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.h (128426 => 128427)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2012-09-13 08:41:21 UTC (rev 128426)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2012-09-13 08:41:26 UTC (rev 128427)
@@ -145,6 +145,7 @@
typedef HashMap<RefPtr<Document>, RefPtr<InspectorStyleSheet> > DocumentToViaInspectorStyleSheet; // "via inspector" stylesheets
typedef HashMap<int, unsigned> NodeIdToForcedPseudoState;
+ void resetNonPersistentData();
InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element);
Element* elementForId(ErrorString*, int nodeId);
int documentNodeWithRequestedFlowsId(Document*);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes