Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM...
authorachicu@adobe.com <achicu@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Nov 2013 18:05:55 +0000 (18:05 +0000)
committerachicu@adobe.com <achicu@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Nov 2013 18:05:55 +0000 (18:05 +0000)
commitbbab800935a252955ca2844029f1a672e17fbfd9
treea85d8a6d3668b192047eb580360ad4704990502a
parent25e14e9344faf14edecc9ee8115b1af93a4d95c0
Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
https://bugs.webkit.org/show_bug.cgi?id=123577

Source/WebCore:

Reviewed by Timothy Hatcher.

Test: inspector-protocol/model/content-flow-content-removal.html

Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
anymore. We already send an unbind event, so the inspector is already notified that the node was removed.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):

Source/WebInspectorUI:

Reviewed by  Timothy Hatcher.

Fixed the content node removal from the content flow.

* UserInterface/ContentFlowTreeContentView.js:
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager):
(WebInspector.DOMTreeManager.prototype._createContentFlowFromPayload): Registered all the content nodes
in the _contentNodesToFlowsMap.
(WebInspector.DOMTreeManager.prototype._unbind): Added call to _removeContentNodeFromFlowIfNeeded.
(WebInspector.DOMTreeManager.prototype._removeContentNodeFromFlowIfNeeded): Called from _unbind to check
and remove a node from it's parent content flow if needed.
(WebInspector.DOMTreeManager.prototype.unregisteredNamedFlowContentElement):

LayoutTests:

Reviewed by Timothy Hatcher.

Added test to check that the notification that an element was removed from the ContentFlow is handled
correctly in the WebInspector even if the element is not part of the DOM anymore.

* inspector-protocol/model/content-flow-content-removal-expected.txt: Added.
* inspector-protocol/model/content-flow-content-removal.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector-protocol/model/content-flow-content-removal-expected.txt [new file with mode: 0644]
LayoutTests/inspector-protocol/model/content-flow-content-removal.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/ContentFlowTreeContentView.js
Source/WebInspectorUI/UserInterface/DOMTreeManager.js