Web Inspector: Remove support for CSS Regions
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Sep 2017 22:32:49 +0000 (22:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Sep 2017 22:32:49 +0000 (22:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177287

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-09-21
Reviewed by Matt Baker.

Source/JavaScriptCore:

* inspector/protocol/CSS.json:
* inspector/protocol/OverlayTypes.json:

Source/WebCore:

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getNamedFlowCollection): Deleted.
* inspector/InspectorCSSAgent.h:
* inspector/InspectorOverlay.cpp:
(WebCore::buildRendererHighlight):
(WebCore::buildNodeHighlight):
(WebCore::InspectorOverlay::getHighlight const):
(WebCore::buildArrayForRendererFragments):
(WebCore::buildQuadObjectForCSSRegionContentClip): Deleted.
* inspector/InspectorOverlayPage.js:
(_createElementTitle):
(_drawElementTitle):
(_drawFragmentHighlight):
(drawNodeHighlight):
(_drawRegionNumber): Deleted.
(_quadMidPoint): Deleted.
(_drawRegionLink): Deleted.
(_drawRegionsHighlight): Deleted.

Source/WebInspectorUI:

* UserInterface/Protocol/CSSObserver.js:
(WI.CSSObserver.prototype.namedFlowCreated):
(WI.CSSObserver.prototype.namedFlowRemoved):
(WI.CSSObserver.prototype.regionLayoutUpdated):
(WI.CSSObserver.prototype.regionOversetChanged):
(WI.CSSObserver.prototype.registeredNamedFlowContentElement):
(WI.CSSObserver.prototype.unregisteredNamedFlowContentElement):
Leave observer functions in for older backends that will send
these messages, but we just ignore them.

* UserInterface/Base/Main.js:
* UserInterface/Controllers/DOMTreeManager.js:
(WI.DOMTreeManager):
(WI.DOMTreeManager.prototype._unbind):
(WI.DOMTreeManager._flowPayloadHashKey): Deleted.
(WI.DOMTreeManager.prototype._createContentFlowFromPayload): Deleted.
(WI.DOMTreeManager.prototype._updateContentFlowFromPayload): Deleted.
(WI.DOMTreeManager.prototype.getNamedFlowCollection.onNamedFlowCollectionAvailable): Deleted.
(WI.DOMTreeManager.prototype.getNamedFlowCollection): Deleted.
(WI.DOMTreeManager.prototype.namedFlowCreated): Deleted.
(WI.DOMTreeManager.prototype.namedFlowRemoved): Deleted.
(WI.DOMTreeManager.prototype._sendNamedFlowUpdateEvents): Deleted.
(WI.DOMTreeManager.prototype.regionOversetChanged): Deleted.
(WI.DOMTreeManager.prototype.registeredNamedFlowContentElement): Deleted.
(WI.DOMTreeManager.prototype._removeContentNodeFromFlowIfNeeded): Deleted.
(WI.DOMTreeManager.prototype.unregisteredNamedFlowContentElement): Deleted.
(WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes.nodeRequested): Deleted.
(WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes): Deleted.
(WI.DOMTreeManager.prototype.getNodeContentFlowInfo.regionNodesAvailable): Deleted.
(WI.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable): Deleted.
(WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getComputedProperty): Deleted.
(WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getContentFlowName): Deleted.
(WI.DOMTreeManager.prototype.getNodeContentFlowInfo): Deleted.
* UserInterface/Images/ContentFlow.svg: Removed.
* UserInterface/Images/gtk/ContentFlow.svg: Removed.
* UserInterface/Main.html:
* UserInterface/Models/Collection.js:
* UserInterface/Models/ContentFlow.js: Removed.
* UserInterface/Models/DOMTree.js:
(WI.DOMTree):
(WI.DOMTree.prototype.get frame):
(WI.DOMTree.prototype._framePageExecutionContextChanged):
(WI.DOMTree.prototype.get contentFlowCollection): Deleted.
(WI.DOMTree.prototype.requestContentFlowList): Deleted.
(WI.DOMTree.prototype._isContentFlowInCurrentDocument): Deleted.
(WI.DOMTree.prototype._contentFlowListWasUpdated): Deleted.
(WI.DOMTree.prototype._contentFlowWasAdded): Deleted.
(WI.DOMTree.prototype._contentFlowWasRemoved): Deleted.
* UserInterface/Test.html:
* UserInterface/Views/CollectionContentView.js:
(WI.CollectionContentView):
* UserInterface/Views/ComputedStyleDetailsPanel.css:
(.details-section > .content > .group > .row.simple.content-flow-link > .value > span > .icon): Deleted.
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WI.ComputedStyleDetailsPanel.prototype.refresh):
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
(WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged):
(WI.ComputedStyleDetailsPanel):
(WI.ComputedStyleDetailsPanel.prototype.get regionFlow): Deleted.
(WI.ComputedStyleDetailsPanel.prototype.set regionFlow): Deleted.
(WI.ComputedStyleDetailsPanel.prototype.get contentFlow): Deleted.
(WI.ComputedStyleDetailsPanel.prototype.set contentFlow): Deleted.
(WI.ComputedStyleDetailsPanel.prototype.get containerRegions): Deleted.
(WI.ComputedStyleDetailsPanel.prototype.set containerRegions): Deleted.
(WI.ComputedStyleDetailsPanel.prototype.sizeDidChange): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._updateFlowNamesSectionVisibility): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._resetFlowDetails): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails.contentFlowInfoReady): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked): Deleted.
* UserInterface/Views/ContentFlowDOMTreeContentView.js: Removed.
* UserInterface/Views/ContentFlowIcon.css: Removed.
* UserInterface/Views/ContentFlowTreeElement.js: Removed.
* UserInterface/Views/ContentView.js:
(WI.ContentView.createFromRepresentedObject):
(WI.ContentView.isViewable):
* UserInterface/Views/FrameTreeElement.js:
(WI.FrameTreeElement.prototype.onpopulate):
(WI.FrameTreeElement.prototype.onexpand):
(WI.FrameTreeElement.prototype._childContentFlowWasAdded): Deleted.
(WI.FrameTreeElement.prototype._childContentFlowWasRemoved): Deleted.
(WI.FrameTreeElement.prototype._rootDOMNodeInvalidated): Deleted.
* UserInterface/Views/ResourceSidebarPanel.js:
(WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
* UserInterface/Views/ResourcesTabContentView.js:
(WI.ResourcesTabContentView):
(WI.ResourcesTabContentView.prototype.canShowRepresentedObject):

LayoutTests:

* inspector/dom/content-flow-content-nodes-expected.txt: Removed.
* inspector/dom/content-flow-content-nodes.html: Removed.
* inspector/dom/content-flow-content-removal-expected.txt: Removed.
* inspector/dom/content-flow-content-removal.html: Removed.
* inspector/dom/content-flow-list-expected.txt: Removed.
* inspector/dom/content-flow-list.html: Removed.
* inspector/dom/content-node-region-info-expected.txt: Removed.
* inspector/dom/content-node-region-info.html: Removed.
* inspector/dom/highlight-flow-with-no-region-expected.txt: Removed.
* inspector/dom/highlight-flow-with-no-region.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222356 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/inspector/dom/content-flow-content-nodes-expected.txt [deleted file]
LayoutTests/inspector/dom/content-flow-content-nodes.html [deleted file]
LayoutTests/inspector/dom/content-flow-content-removal-expected.txt [deleted file]
LayoutTests/inspector/dom/content-flow-content-removal.html [deleted file]
LayoutTests/inspector/dom/content-flow-list-expected.txt [deleted file]
LayoutTests/inspector/dom/content-flow-list.html [deleted file]
LayoutTests/inspector/dom/content-node-region-info-expected.txt [deleted file]
LayoutTests/inspector/dom/content-node-region-info.html [deleted file]
LayoutTests/inspector/dom/highlight-flow-with-no-region-expected.txt [deleted file]
LayoutTests/inspector/dom/highlight-flow-with-no-region.html [deleted file]
LayoutTests/platform/mac/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/CSS.json
Source/JavaScriptCore/inspector/protocol/OverlayTypes.json
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorCSSAgent.h
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/inspector/InspectorOverlayPage.js
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js
Source/WebInspectorUI/UserInterface/Images/ContentFlow.svg [deleted file]
Source/WebInspectorUI/UserInterface/Images/gtk/ContentFlow.svg [deleted file]
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Models/Collection.js
Source/WebInspectorUI/UserInterface/Models/ContentFlow.js [deleted file]
Source/WebInspectorUI/UserInterface/Models/DOMTree.js
Source/WebInspectorUI/UserInterface/Protocol/CSSObserver.js
Source/WebInspectorUI/UserInterface/Test.html
Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js
Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.css
Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js
Source/WebInspectorUI/UserInterface/Views/ContentFlowDOMTreeContentView.js [deleted file]
Source/WebInspectorUI/UserInterface/Views/ContentFlowIcon.css [deleted file]
Source/WebInspectorUI/UserInterface/Views/ContentFlowTreeElement.js [deleted file]
Source/WebInspectorUI/UserInterface/Views/ContentView.js
Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js
Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js

index bb9b7e5..11a8b39 100644 (file)
@@ -1,3 +1,21 @@
+2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove support for CSS Regions
+        https://bugs.webkit.org/show_bug.cgi?id=177287
+
+        Reviewed by Matt Baker.
+
+        * inspector/dom/content-flow-content-nodes-expected.txt: Removed.
+        * inspector/dom/content-flow-content-nodes.html: Removed.
+        * inspector/dom/content-flow-content-removal-expected.txt: Removed.
+        * inspector/dom/content-flow-content-removal.html: Removed.
+        * inspector/dom/content-flow-list-expected.txt: Removed.
+        * inspector/dom/content-flow-list.html: Removed.
+        * inspector/dom/content-node-region-info-expected.txt: Removed.
+        * inspector/dom/content-node-region-info.html: Removed.
+        * inspector/dom/highlight-flow-with-no-region-expected.txt: Removed.
+        * inspector/dom/highlight-flow-with-no-region.html: Removed.
+
 2017-09-21  Chris Dumez  <cdumez@apple.com>
 
         eventInitDict parameter to GamepadEvent constructor should be optional
index 907a2d7..c08e6ce 100644 (file)
@@ -1504,7 +1504,6 @@ webkit.org/b/175597 http/tests/xmlhttprequest/gzip-content-type-no-content-encod
 fast/regions [ Skip ]
 compositing/regions [ Skip ]
 fast/ruby/ruby-rt-with-region-crash.html [ Skip ]
-inspector/dom/content-node-region-info.html [ Skip ]
 fast/shapes/shape-outside-floats/shape-outside-floats-layout-after-initial-layout-pass.html [ Skip ]
 
 webkit.org/b/171945 perf/class-list-remove.html [ Pass Failure Timeout ]
diff --git a/LayoutTests/inspector/dom/content-flow-content-nodes-expected.txt b/LayoutTests/inspector/dom/content-flow-content-nodes-expected.txt
deleted file mode 100644 (file)
index c5d1c81..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Testing that the ContentFlows events are correctly dispatched when nodes are attached to/detached from a flow.
-
-PASS: ContentFlow was added.
-PASS: ContentFlow.contentNodes has a length of 2.
-PASS: ContentFlow.contentNodes[0].id is "#contentStatic".
-PASS: ContentFlow.contentNodes[1].id is "#contentRemoved".
-PASS: "#contentAddedAtTheTop" was added before "#contentStatic".
-PASS: "#contentAddedAtTheTop" is first in the contentNodes list.
-PASS: "#contentAddedAtTheBottom" was added last.
-PASS: "#contentAddedAtTheBottom" is last in the contentNodes list.
-PASS: "#contentRemoved" was removed.
-PASS: "#contentRemoved" cannot be found in the contentNodes list.
-
diff --git a/LayoutTests/inspector/dom/content-flow-content-nodes.html b/LayoutTests/inspector/dom/content-flow-content-nodes.html
deleted file mode 100644 (file)
index aec117c..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<style>
-.content
-{
-    -webkit-flow-into: flow;
-}
-.hidden
-{
-    -webkit-flow-into: none;
-}
-</style>
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function changeFlowContent()
-{
-    document.getElementById("contentAddedAtTheTop").classList.remove("hidden");
-    // Force a layout to make sure the events are always fired in the expected order.
-    document.body.offsetTop;
-    document.getElementById("contentAddedAtTheBottom").classList.remove("hidden");
-    document.body.offsetTop;
-    document.getElementById("contentRemoved").classList.add("hidden");
-}
-
-function test()
-{
-    var contentFlow;
-
-    function onRootDOMNodeInvalidated()
-    {
-        WI.frameResourceManager.mainFrame.domTree.requestContentFlowList();
-    }
-
-    function onContentFlowWasAdded(event)
-    {
-        contentFlow = event.data.flow;
-        InspectorTest.expectThat(contentFlow.name === "flow", "ContentFlow was added.");
-        InspectorTest.expectThat(contentFlow.contentNodes.length == 2, "ContentFlow.contentNodes has a length of 2.");
-        InspectorTest.expectThat(contentFlow.contentNodes[0].getAttribute("id") === "contentStatic", "ContentFlow.contentNodes[0].id is \"#contentStatic\".");
-        InspectorTest.expectThat(contentFlow.contentNodes[1].getAttribute("id") === "contentRemoved", "ContentFlow.contentNodes[1].id is \"#contentRemoved\".");
-
-        contentFlow.addEventListener(WI.ContentFlow.Event.ContentNodeWasAdded, onContentNodeWasAdded, null);
-        contentFlow.addEventListener(WI.ContentFlow.Event.ContentNodeWasRemoved, onContentNodeWasRemoved, null);
-
-        InspectorTest.evaluateInPage("changeFlowContent()");
-    }
-
-    function onContentNodeWasAdded(event)
-    {
-        switch (event.data.node.getAttribute("id")) {
-        case "contentAddedAtTheTop":
-            InspectorTest.expectThat(event.data.before.getAttribute("id") === "contentStatic", "\"#contentAddedAtTheTop\" was added before \"#contentStatic\".");
-            InspectorTest.expectThat(contentFlow.contentNodes[0] === event.data.node, "\"#contentAddedAtTheTop\" is first in the contentNodes list.");
-            break;
-        case "contentAddedAtTheBottom":
-            InspectorTest.expectThat(!event.data.before, "\"#contentAddedAtTheBottom\" was added last.");
-            InspectorTest.expectThat(contentFlow.contentNodes.lastValue === event.data.node, "\"#contentAddedAtTheBottom\" is last in the contentNodes list.");
-            break;
-        default:
-            InspectorTest.log("FAIL: Only two add events are expected.");
-        }
-    }
-
-    function onContentNodeWasRemoved(event)
-    {
-        InspectorTest.expectThat(event.data.node.getAttribute("id") === "contentRemoved", "\"#contentRemoved\" was removed.");
-        InspectorTest.expectThat(contentFlow.contentNodes.indexOf(event.data.node) === -1, "\"#contentRemoved\" cannot be found in the contentNodes list.");
-        InspectorTest.completeTest();
-    }
-
-    WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, function(event) {
-        var domTree = WI.frameResourceManager.mainFrame.domTree;
-        domTree.addEventListener(WI.DOMTree.Event.RootDOMNodeInvalidated, onRootDOMNodeInvalidated, null);
-        domTree.addEventListener(WI.DOMTree.Event.ContentFlowWasAdded, onContentFlowWasAdded, null);
-        domTree.requestContentFlowList();
-    });
-
-    InspectorTest.reloadPage();
-}
-</script>
-</head>
-<body onload="runTest()">
-    <p>Testing that the ContentFlows events are correctly dispatched when nodes are attached to/detached from a flow.</p>
-
-    <div id="contentAddedAtTheTop" class="content hidden"></div>
-    <div id="contentStatic" class="content"></div>
-    <div id="contentRemoved" class="content"></div>
-    <div id="contentAddedAtTheBottom" class="content hidden"></div>
-
-</body>
-</html>
diff --git a/LayoutTests/inspector/dom/content-flow-content-removal-expected.txt b/LayoutTests/inspector/dom/content-flow-content-removal-expected.txt
deleted file mode 100644 (file)
index f787a04..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Testing that the ContentFlows events are correctly dispatched when content nodes are detached from the DOM.
-
-PASS: ContentFlow was added.
-PASS: ContentFlow.contentNodes has a length of 2.
-PASS: ContentFlow.contentNodes[0].id is "#contentStatic".
-PASS: ContentFlow.contentNodes[1].id is "#contentRemoved".
-PASS: "#contentRemoved" was removed.
-PASS: "#contentRemoved" cannot be found in the contentNodes list.
-
diff --git a/LayoutTests/inspector/dom/content-flow-content-removal.html b/LayoutTests/inspector/dom/content-flow-content-removal.html
deleted file mode 100644 (file)
index 046c93a..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<style>
-.content
-{
-    -webkit-flow-into: flow;
-}
-</style>
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function changeFlowContent()
-{
-    document.getElementById("contentRemoved").remove();
-}
-
-function test()
-{
-    var contentFlow;
-
-    function onRootDOMNodeInvalidated()
-    {
-        WI.frameResourceManager.mainFrame.domTree.requestContentFlowList();
-    }
-
-    function onContentFlowWasAdded(event)
-    {
-        contentFlow = event.data.flow;
-        InspectorTest.expectThat(contentFlow.name === "flow", "ContentFlow was added.");
-        InspectorTest.expectThat(contentFlow.contentNodes.length === 2, "ContentFlow.contentNodes has a length of 2.");
-        InspectorTest.expectThat(contentFlow.contentNodes[0].getAttribute("id") === "contentStatic", "ContentFlow.contentNodes[0].id is \"#contentStatic\".");
-        InspectorTest.expectThat(contentFlow.contentNodes[1].getAttribute("id") === "contentRemoved", "ContentFlow.contentNodes[1].id is \"#contentRemoved\".");
-
-        contentFlow.addEventListener(WI.ContentFlow.Event.ContentNodeWasRemoved, onContentNodeWasRemoved, null);
-
-        InspectorTest.evaluateInPage("changeFlowContent()");
-    }
-
-    function onContentNodeWasRemoved(event)
-    {
-        InspectorTest.expectThat(event.data.node.getAttribute("id") === "contentRemoved", "\"#contentRemoved\" was removed.");
-        InspectorTest.expectThat(contentFlow.contentNodes.indexOf(event.data.node) === -1, "\"#contentRemoved\" cannot be found in the contentNodes list.");
-        InspectorTest.completeTest();
-    }
-
-    WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, function() {
-        var domTree = WI.frameResourceManager.mainFrame.domTree;
-        domTree.addEventListener(WI.DOMTree.Event.RootDOMNodeInvalidated, onRootDOMNodeInvalidated, null);
-        domTree.addEventListener(WI.DOMTree.Event.ContentFlowWasAdded, onContentFlowWasAdded, null);
-        domTree.requestContentFlowList();
-    });
-
-    InspectorTest.reloadPage();
-}
-</script>
-</head>
-<body onload="runTest()">
-    <p>Testing that the ContentFlows events are correctly dispatched when content nodes are detached from the DOM.</p>
-
-    <div id="contentStatic" class="content"></div>
-    <div id="contentRemoved" class="content"></div>
-
-</body>
-</html>
diff --git a/LayoutTests/inspector/dom/content-flow-list-expected.txt b/LayoutTests/inspector/dom/content-flow-list-expected.txt
deleted file mode 100644 (file)
index 5a150c2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Testing that the ContentFlows events are correctly dispatched when new flows are created/removed.
-
-PASS: ContentFlow was added
-PASS: Flow count is 1
-PASS: ContentFlow was removed
-PASS: Flow count is 0
-
diff --git a/LayoutTests/inspector/dom/content-flow-list.html b/LayoutTests/inspector/dom/content-flow-list.html
deleted file mode 100644 (file)
index db67343..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<style>
-#flow1
-{
-    -webkit-flow-into: flow1;
-}
-</style>
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function addFlow() {
-    let div = document.createElement("div");
-    div.id = "flow1";
-    document.body.appendChild(div);
-}
-
-function removeFlow() {
-    document.getElementById("flow1").remove();
-}
-
-function test()
-{
-    let domTree;
-
-    function onRootDOMNodeInvalidated()
-    {
-        domTree.requestContentFlowList();
-        InspectorTest.evaluateInPage("addFlow()");
-    }
-
-    function onContentFlowWasAdded(event)
-    {
-        InspectorTest.expectEqual(event.data.flow.name, "flow1", "ContentFlow was added");
-        InspectorTest.expectEqual(domTree.contentFlowCollection.items.size, 1, "Flow count is 1");
-        InspectorTest.evaluateInPage("removeFlow()");
-    }
-
-    function onContentFlowWasRemoved(event)
-    {
-        InspectorTest.expectEqual(event.data.flow.name, "flow1", "ContentFlow was removed");
-        InspectorTest.expectEqual(domTree.contentFlowCollection.items.size, 0, "Flow count is 0");
-        InspectorTest.completeTest();
-    }
-
-    WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, function() {
-        domTree = WI.frameResourceManager.mainFrame.domTree;
-        domTree.addEventListener(WI.DOMTree.Event.RootDOMNodeInvalidated, onRootDOMNodeInvalidated);
-        domTree.addEventListener(WI.DOMTree.Event.ContentFlowWasAdded, onContentFlowWasAdded);
-        domTree.addEventListener(WI.DOMTree.Event.ContentFlowWasRemoved, onContentFlowWasRemoved);
-        domTree.requestContentFlowList();
-    });
-
-    InspectorTest.reloadPage();
-}
-</script>
-</head>
-<body onload="runTest()">
-<p>Testing that the ContentFlows events are correctly dispatched when new flows are created/removed.</p>
-</body>
-</html>
diff --git a/LayoutTests/inspector/dom/content-node-region-info-expected.txt b/LayoutTests/inspector/dom/content-node-region-info-expected.txt
deleted file mode 100644 (file)
index b774ae6..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Testing that the DOMTreeManager.getNodeContentFlowInfo returns the containing regions.
-
-
-Selector: #flow
-Region flow name: none
-Content flow name: none
-Regions count: N/A
-Regions: N/A
-
-Selector: .contentNode1
-Region flow name: none
-Content flow name: none
-Regions count: N/A
-Regions: N/A
-
-Selector: .contentNode2
-Region flow name: none
-Content flow name: none
-Regions count: N/A
-Regions: N/A
-
-Selector: body
-Region flow name: none
-Content flow name: none
-Regions count: N/A
-Regions: N/A
-
-Selector: #region1
-Region flow name: none
-Content flow name: none
-Regions count: N/A
-Regions: N/A
-
-Selector: #region2
-Region flow name: none
-Content flow name: none
-Regions count: N/A
-Regions: N/A
-
diff --git a/LayoutTests/inspector/dom/content-node-region-info.html b/LayoutTests/inspector/dom/content-node-region-info.html
deleted file mode 100644 (file)
index 58a3dde..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<style>
-#flow
-{
-    -webkit-flow-into: flow;
-}
-.contentNode1
-{
-    width: 100%;
-    height: 50px;
-}
-.contentNode2
-{
-    width: 100%;
-    height: 150px;
-}
-.region
-{
-    -webkit-flow-from: flow;
-    width: 100px;
-    height: 100px;
-}
-</style>
-<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
-<script>
-function test()
-{
-    let displayNameGetter = Object.getOwnPropertyDescriptor(WI.DOMNode.prototype, "displayName").get;
-    let queryList = ["#flow", ".contentNode1", ".contentNode2", "body", "#region1", "#region2"];
-    let documentNodeId = null;
-
-    WI.domTreeManager.requestDocument(function(documentNode) {
-        documentNodeId = documentNode.id;
-        WI.domTreeManager.getNamedFlowCollection(documentNodeId);
-        next();
-    });
-
-    function regionMapFunction(region)
-    {
-        return displayNameGetter.call(region);
-    }
-
-    function query(selector, callback)
-    {
-        InspectorTest.log("\nSelector: " + selector);
-        WI.domTreeManager.querySelector(documentNodeId, selector, function(contentNodeId) {
-            if (!contentNodeId) {
-                InspectorTest.log("DOM node not found.");
-                callback();
-            }
-            let domNode = WI.domTreeManager.nodeForId(contentNodeId);
-            WI.domTreeManager.getNodeContentFlowInfo(domNode, function(error, result) {
-                console.assert(!error);
-                if (result) {
-                    InspectorTest.log("Region flow name: " + (result.regionFlow ? result.regionFlow.name : "none"));
-                    InspectorTest.log("Content flow name: " + (result.contentFlow ? result.contentFlow.name : "none"));
-                    InspectorTest.log("Regions count: " + (result.regions ? result.regions.length : "N/A"));
-                    InspectorTest.log("Regions: " + (result.regions ? result.regions.map(regionMapFunction).join(", ") : "N/A"));
-                } else
-                    InspectorTest.log("No region flow information.");
-                callback();
-            });
-        });
-    }
-
-    function next()
-    {
-        if (!queryList.length)
-            return InspectorTest.completeTest();
-        query(queryList.shift(), next);
-    }
-}
-</script>
-</head>
-<body onload="runTest()">
-    <p>Testing that the DOMTreeManager.getNodeContentFlowInfo returns the containing regions.</p>
-
-    <div id="flow">
-        <div class="contentNode1"></div>
-        <div class="contentNode2"></div>
-    </div>
-
-    <div id="region1" class="region"></div>
-    <div id="region2" class="region"></div>
-</body>
-</html>
diff --git a/LayoutTests/inspector/dom/highlight-flow-with-no-region-expected.txt b/LayoutTests/inspector/dom/highlight-flow-with-no-region-expected.txt
deleted file mode 100644 (file)
index 90cc6df..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Testing that the backend is not crashing when highlighting a node that has no associated region.
diff --git a/LayoutTests/inspector/dom/highlight-flow-with-no-region.html b/LayoutTests/inspector/dom/highlight-flow-with-no-region.html
deleted file mode 100644 (file)
index a0bcbe2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<html>
-<head>
-<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
-<style>
-#flow {
-    -webkit-flow-into: flow;
-}
-</style>
-<script>
-function test()
-{
-    InspectorProtocol.sendCommand("DOM.getDocument", {}, onGotDocument);
-
-    function onGotDocument(msg) {
-        InspectorProtocol.checkForError(msg);
-        var node = msg.result.root;
-        InspectorProtocol.sendCommand("DOM.querySelector", { "nodeId": node.nodeId, "selector": "#inspectedElement" }, onQuerySelector);
-    }
-
-    function onQuerySelector(msg) {
-        InspectorProtocol.checkForError(msg);
-        var node = msg.result;
-        var highlightConfig = {
-            showInfo: true,
-            contentColor: {r: 255, g: 255, b: 255},
-            paddingColor: {r: 255, g: 255, b: 255},
-            borderColor: {r: 255, g: 255, b: 255},
-            marginColor: {r: 255, g: 255, b: 255},
-        };
-        InspectorProtocol.sendCommand("DOM.highlightNode", { "highlightConfig": highlightConfig, "nodeId": node.nodeId }, onHighlightComplete);
-    }
-
-    function onHighlightComplete(msg) {
-        InspectorProtocol.checkForError(msg);
-        ProtocolTest.completeTest();
-    }
-}
-</script>
-</head>
-<body onload="runTest()">
-
-<div id="flow">
-    <div id="inspectedElement"></div>
-</div>
-
-<p>Testing that the backend is not crashing when highlighting a node that has no associated region.</p>
-
-</body>
-</html>
index 8190760..3df30ac 100644 (file)
@@ -1775,11 +1775,6 @@ webkit.org/b/176878 [ Debug ] fast/multicol/spanner-crash-when-adding-summary.ht
 # <rdar://problem/34507977>
 webkit.org/b/177119 webgl/1.0.2/conformance/textures/tex-image-and-sub-image-2d-with-video.html [ Pass Failure ]
 
-webkit.org/b/177249 inspector/dom/content-flow-content-nodes.html [ Skip ]
-webkit.org/b/177249 inspector/dom/content-flow-content-removal.html [ Skip ]
-webkit.org/b/177249 inspector/dom/content-flow-list.html [ Skip ]
-webkit.org/b/177249 inspector/dom/content-node-region-info.html [ Skip ]
-
 webkit.org/b/177319 imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-elements-filter.html [ Failure ]
 
 webkit.org/b/177322 [ Debug ] imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html [ Pass Failure ]
index 1b5ed01..a572c5d 100644 (file)
@@ -1,3 +1,13 @@
+2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove support for CSS Regions
+        https://bugs.webkit.org/show_bug.cgi?id=177287
+
+        Reviewed by Matt Baker.
+
+        * inspector/protocol/CSS.json:
+        * inspector/protocol/OverlayTypes.json:
+
 2017-09-21  Brian Burg  <bburg@apple.com>
 
         Web Inspector: keyboard shortcut for "Reload page from origin" doesn't match Safari, and doesn't work
index 60abb5e..9c8a441 100644 (file)
                 { "name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description." },
                 { "name": "sourceLine", "type": "integer", "optional": true, "description": "Line in the document containing the media query (not defined for the \"stylesheet\" source)." }
             ]
-        },
-        {
-            "id": "Region",
-            "type": "object",
-            "description": "This object represents a region that flows from a Named Flow.",
-            "properties": [
-                { "name": "regionOverset", "type": "string", "enum": ["overset", "fit", "empty"], "description": "The \"overset\" attribute of a Named Flow." },
-                { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The corresponding DOM node id." }
-            ]
-        },
-        {
-            "id": "NamedFlow",
-            "type": "object",
-            "description": "This object represents a Named Flow.",
-            "properties": [
-                { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
-                { "name": "name", "type": "string", "description": "Named Flow identifier." },
-                { "name": "overset", "type": "boolean", "description": "The \"overset\" attribute of a Named Flow." },
-                { "name": "content", "type": "array", "items": { "$ref": "DOM.NodeId" }, "description": "An array of nodes that flow into the Named Flow." },
-                { "name": "regions", "type": "array", "items": { "$ref": "Region" }, "description": "An array of regions associated with the Named Flow." }
-            ]
         }
     ],
     "commands": [
                 { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." },
                 { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." }
             ]
-        },
-        {
-            "name": "getNamedFlowCollection",
-            "description": "Returns the Named Flows from the document.",
-            "parameters": [
-                { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id for which to get the Named Flow Collection." }
-            ],
-            "returns": [
-                { "name": "namedFlows", "type": "array", "items": { "$ref": "NamedFlow" }, "description": "An array containing the Named Flows in the document." }
-            ]
         }
     ],
     "events": [
             "parameters": [
                 { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the removed stylesheet." }
             ]
-        },
-        {
-            "name": "namedFlowCreated",
-            "description": "Fires when a Named Flow is created.",
-            "parameters": [
-                { "name": "namedFlow", "$ref": "NamedFlow", "description": "The new Named Flow." }
-            ]
-        },
-        {
-            "name": "namedFlowRemoved",
-            "description": "Fires when a Named Flow is removed: has no associated content nodes and regions.",
-            "parameters": [
-                { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
-                { "name": "flowName", "type": "string", "description": "Identifier of the removed Named Flow." }
-            ]
-        },
-        {
-            "name": "regionOversetChanged",
-            "description": "Fires if any of the regionOverset values changed in a Named Flow's region chain.",
-            "parameters": [
-                { "name": "namedFlow", "$ref": "NamedFlow", "description": "The Named Flow containing the regions whose regionOverset values changed." }
-            ]
-        },
-        {
-            "name": "registeredNamedFlowContentElement",
-            "description": "Fires when a Named Flow's has been registered with a new content node.",
-            "parameters": [
-                { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
-                { "name": "flowName", "type": "string", "description": "Named Flow identifier for which the new content element was registered." },
-                { "name": "contentNodeId", "$ref": "DOM.NodeId", "description": "The node id of the registered content node." },
-                { "name": "nextContentNodeId", "$ref": "DOM.NodeId", "description": "The node id of the element following the registered content node." }
-            ]
-        },
-        {
-            "name": "unregisteredNamedFlowContentElement",
-            "description": "Fires when a Named Flow's has been registered with a new content node.",
-            "parameters": [
-                { "name": "documentNodeId", "$ref": "DOM.NodeId", "description": "The document node id." },
-                { "name": "flowName", "type": "string", "description": "Named Flow identifier for which the new content element was unregistered." },
-                { "name": "contentNodeId", "$ref": "DOM.NodeId", "description": "The node id of the unregistered content node." }
-            ]
         }
     ]
 }
index 3a4b015..9bb70dc 100644 (file)
             ]
         },
         {
-            "id": "Region",
-            "description": "A single region in a flow thread.",
-            "type": "object",
-            "properties": [
-                { "name": "borderQuad", "$ref": "Quad" },
-                { "name": "incomingQuad", "$ref": "Quad" },
-                { "name": "outgoingQuad", "$ref": "Quad" },
-                { "name": "isHighlighted", "type": "boolean", "optional": true }
-            ]
-        },
-        {
             "id": "DisplayPath",
             "description": "A vector path described using SVG path syntax.",
             "type": "array",
             "items": { "type": "any" }
         },
         {
-            "id": "RegionFlowData",
-            "type": "object",
-            "properties": [
-                { "name": "regions", "type": "array", "items": { "$ref": "Region"} },
-                { "name": "name", "type": "string" }
-            ]
-        },
-        {
-            "id": "ContentFlowData",
-            "type": "object",
-            "properties": [
-                { "name": "name", "type": "string" }
-            ]
-        },
-        {
             "id": "ShapeOutsideData",
             "type": "object",
             "properties": [
@@ -87,8 +61,6 @@
                 { "name": "size", "$ref": "Size", "optional": true },
                 { "name": "role", "type": "string", "description": "Computed accessibility role for the element.", "optional": true },
                 { "name": "pseudoElement", "type": "string", "optional": true },
-                { "name": "regionFlowData", "$ref": "RegionFlowData", "optional": true },
-                { "name": "contentFlowData", "$ref": "ContentFlowData", "optional": true },
                 { "name": "shapeOutsideData", "$ref": "ShapeOutsideData", "optional": true }
             ]
         },
                 { "name": "contentOutlineColor", "type": "string" },
                 { "name": "paddingColor", "type": "string" },
                 { "name": "borderColor", "type": "string" },
-                { "name": "marginColor", "type": "string" },
-                { "name": "regionClippingArea", "$ref": "Quad", "optional": true }
+                { "name": "marginColor", "type": "string" }
             ]
         },
         {
index d4cb7df..13deb21 100644 (file)
@@ -1,3 +1,29 @@
+2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove support for CSS Regions
+        https://bugs.webkit.org/show_bug.cgi?id=177287
+
+        Reviewed by Matt Baker.
+
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::getNamedFlowCollection): Deleted.
+        * inspector/InspectorCSSAgent.h:
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::buildRendererHighlight):
+        (WebCore::buildNodeHighlight):
+        (WebCore::InspectorOverlay::getHighlight const):
+        (WebCore::buildArrayForRendererFragments):
+        (WebCore::buildQuadObjectForCSSRegionContentClip): Deleted.
+        * inspector/InspectorOverlayPage.js:
+        (_createElementTitle):
+        (_drawElementTitle):
+        (_drawFragmentHighlight):
+        (drawNodeHighlight):
+        (_drawRegionNumber): Deleted.
+        (_quadMidPoint): Deleted.
+        (_drawRegionLink): Deleted.
+        (_drawRegionsHighlight): Deleted.
+
 2017-09-21  Antti Koivisto  <antti@apple.com>
 
         Remove some more code from RenderFlowThread
index d1d685c..c6837e1 100644 (file)
@@ -777,17 +777,6 @@ void InspectorCSSAgent::forcePseudoState(ErrorString& errorString, int nodeId, c
     element->document().styleScope().didChangeStyleSheetEnvironment();
 }
 
-void InspectorCSSAgent::getNamedFlowCollection(ErrorString& errorString, int documentNodeId, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::CSS::NamedFlow>>& result)
-{
-    Document* document = m_domAgent->assertDocument(errorString, documentNodeId);
-    if (!document)
-        return;
-
-    auto namedFlows = Inspector::Protocol::Array<Inspector::Protocol::CSS::NamedFlow>::create();
-
-    result = WTFMove(namedFlows);
-}
-
 InspectorStyleSheetForInlineStyle& InspectorCSSAgent::asInspectorStyleSheet(StyledElement& element)
 {
     auto it = m_nodeToInspectorStyleSheet.find(&element);
index 496fa41..3829a1d 100644 (file)
@@ -111,7 +111,6 @@ public:
     void getSupportedCSSProperties(ErrorString&, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::CSS::CSSPropertyInfo>>& result) override;
     void getSupportedSystemFontFamilyNames(ErrorString&, RefPtr<Inspector::Protocol::Array<String>>& result) override;
     void forcePseudoState(ErrorString&, int nodeId, const Inspector::InspectorArray& forcedPseudoClasses) override;
-    void getNamedFlowCollection(ErrorString&, int documentNodeId, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::CSS::NamedFlow>>& result) override;
 
 private:
     class StyleSheetAction;
index 807d022..c8de4b1 100644 (file)
@@ -49,9 +49,7 @@
 #include "RectangleShape.h"
 #include "RenderBoxModelObject.h"
 #include "RenderElement.h"
-#include "RenderFlowThread.h"
 #include "RenderInline.h"
-#include "RenderRegion.h"
 #include "RenderView.h"
 #include "ScriptController.h"
 #include "ScriptSourceCode.h"
@@ -82,7 +80,7 @@ static void contentsQuadToPage(const FrameView* mainView, const FrameView* view,
     contentsQuadToCoordinateSystem(mainView, view, quad, InspectorOverlay::CoordinateSystem::View);
 }
 
-static void buildRendererHighlight(RenderObject* renderer, RenderRegion* region, const HighlightConfig& highlightConfig, Highlight& highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
+static void buildRendererHighlight(RenderObject* renderer, const HighlightConfig& highlightConfig, Highlight& highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
 {
     Frame* containingFrame = renderer->document().frame();
     if (!containingFrame)
@@ -110,14 +108,6 @@ static void buildRendererHighlight(RenderObject* renderer, RenderRegion* region,
             auto& renderBox = downcast<RenderBox>(*renderer);
 
             LayoutBoxExtent margins(renderBox.marginTop(), renderBox.marginRight(), renderBox.marginBottom(), renderBox.marginLeft());
-
-            if (!renderBox.isOutOfFlowPositioned() && region) {
-                RenderBox::LogicalExtentComputedValues computedValues;
-                renderBox.computeLogicalWidthInRegion(computedValues, region);
-                margins.start(renderBox.style().writingMode()) = computedValues.m_margins.m_start;
-                margins.end(renderBox.style().writingMode()) = computedValues.m_margins.m_end;
-            }
-
             paddingBox = renderBox.clientBoxRect();
             contentBox = LayoutRect(paddingBox.x() + renderBox.paddingLeft(), paddingBox.y() + renderBox.paddingTop(),
                 paddingBox.width() - renderBox.paddingLeft() - renderBox.paddingRight(), paddingBox.height() - renderBox.paddingTop() - renderBox.paddingBottom());
@@ -139,41 +129,10 @@ static void buildRendererHighlight(RenderObject* renderer, RenderRegion* region,
                 borderBox.width() + renderInline.horizontalMarginExtent(), borderBox.height());
         }
 
-        FloatQuad absContentQuad;
-        FloatQuad absPaddingQuad;
-        FloatQuad absBorderQuad;
-        FloatQuad absMarginQuad;
-
-        if (region) {
-            RenderFlowThread* flowThread = region->flowThread();
-
-            // Figure out the quads in the space of the RenderFlowThread.
-            absContentQuad = renderer->localToContainerQuad(FloatRect(contentBox), flowThread);
-            absPaddingQuad = renderer->localToContainerQuad(FloatRect(paddingBox), flowThread);
-            absBorderQuad = renderer->localToContainerQuad(FloatRect(borderBox), flowThread);
-            absMarginQuad = renderer->localToContainerQuad(FloatRect(marginBox), flowThread);
-
-            // Move the quad relative to the space of the current region.
-            LayoutRect flippedRegionRect(region->flowThreadPortionRect());
-            flowThread->flipForWritingMode(flippedRegionRect);
-
-            FloatSize delta = region->contentBoxRect().location() - flippedRegionRect.location();
-            absContentQuad.move(delta);
-            absPaddingQuad.move(delta);
-            absBorderQuad.move(delta);
-            absMarginQuad.move(delta);
-
-            // Resolve the absolute quads starting from the current region.
-            absContentQuad = region->localToAbsoluteQuad(absContentQuad);
-            absPaddingQuad = region->localToAbsoluteQuad(absPaddingQuad);
-            absBorderQuad = region->localToAbsoluteQuad(absBorderQuad);
-            absMarginQuad = region->localToAbsoluteQuad(absMarginQuad);
-        } else {
-            absContentQuad = renderer->localToAbsoluteQuad(FloatRect(contentBox));
-            absPaddingQuad = renderer->localToAbsoluteQuad(FloatRect(paddingBox));
-            absBorderQuad = renderer->localToAbsoluteQuad(FloatRect(borderBox));
-            absMarginQuad = renderer->localToAbsoluteQuad(FloatRect(marginBox));
-        }
+        FloatQuad absContentQuad = renderer->localToAbsoluteQuad(FloatRect(contentBox));
+        FloatQuad absPaddingQuad = renderer->localToAbsoluteQuad(FloatRect(paddingBox));
+        FloatQuad absBorderQuad = renderer->localToAbsoluteQuad(FloatRect(borderBox));
+        FloatQuad absMarginQuad = renderer->localToAbsoluteQuad(FloatRect(marginBox));
 
         contentsQuadToCoordinateSystem(mainView, containingView, absContentQuad, coordinateSystem);
         contentsQuadToCoordinateSystem(mainView, containingView, absPaddingQuad, coordinateSystem);
@@ -188,13 +147,13 @@ static void buildRendererHighlight(RenderObject* renderer, RenderRegion* region,
     }
 }
 
-static void buildNodeHighlight(Node& node, RenderRegion* region, const HighlightConfig& highlightConfig, Highlight& highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
+static void buildNodeHighlight(Node& node, const HighlightConfig& highlightConfig, Highlight& highlight, InspectorOverlay::CoordinateSystem coordinateSystem)
 {
     RenderObject* renderer = node.renderer();
     if (!renderer)
         return;
 
-    buildRendererHighlight(renderer, region, highlightConfig, highlight, coordinateSystem);
+    buildRendererHighlight(renderer, highlightConfig, highlight, coordinateSystem);
 }
 
 static void buildQuadHighlight(const FloatQuad& quad, const HighlightConfig& highlightConfig, Highlight& highlight)
@@ -233,12 +192,12 @@ void InspectorOverlay::getHighlight(Highlight& highlight, InspectorOverlay::Coor
 
     highlight.type = HighlightType::Rects;
     if (m_highlightNode)
-        buildNodeHighlight(*m_highlightNode, nullptr, m_nodeHighlightConfig, highlight, coordinateSystem);
+        buildNodeHighlight(*m_highlightNode, m_nodeHighlightConfig, highlight, coordinateSystem);
     else if (m_highlightNodeList) {
         highlight.setDataFromConfig(m_nodeHighlightConfig);
         for (unsigned i = 0; i < m_highlightNodeList->length(); ++i) {
             Highlight nodeHighlight;
-            buildNodeHighlight(*(m_highlightNodeList->item(i)), nullptr, m_nodeHighlightConfig, nodeHighlight, coordinateSystem);
+            buildNodeHighlight(*(m_highlightNodeList->item(i)), m_nodeHighlightConfig, nodeHighlight, coordinateSystem);
             if (nodeHighlight.type == HighlightType::Node)
                 highlight.quads.appendVector(nodeHighlight.quads);
         }
@@ -401,29 +360,6 @@ static Ref<Inspector::Protocol::OverlayTypes::Size> buildObjectForSize(const Int
         .release();
 }
 
-static RefPtr<Inspector::Protocol::OverlayTypes::Quad> buildQuadObjectForCSSRegionContentClip(RenderRegion* region)
-{
-    Frame* containingFrame = region->document().frame();
-    if (!containingFrame)
-        return nullptr;
-
-    FrameView* containingView = containingFrame->view();
-    FrameView* mainView = containingFrame->page()->mainFrame().view();
-    RenderFlowThread* flowThread = region->flowThread();
-
-    // Get the clip box of the current region and covert it into an absolute quad.
-    LayoutRect flippedRegionRect(region->flowThreadPortionOverflowRect());
-    flowThread->flipForWritingMode(flippedRegionRect);
-
-    // Apply any border or padding of the region.
-    flippedRegionRect.setLocation(region->contentBoxRect().location());
-    
-    FloatQuad clipQuad = region->localToAbsoluteQuad(FloatRect(flippedRegionRect));
-    contentsQuadToPage(mainView, containingView, clipQuad);
-
-    return buildArrayForQuad(clipQuad);
-}
-
 void InspectorOverlay::setShowingPaintRects(bool showingPaintRects)
 {
     if (m_showingPaintRects == showingPaintRects)
@@ -495,36 +431,9 @@ static RefPtr<Inspector::Protocol::Array<Inspector::Protocol::OverlayTypes::Frag
 {
     auto arrayOfFragments = Inspector::Protocol::Array<Inspector::Protocol::OverlayTypes::FragmentHighlightData>::create();
 
-    RenderFlowThread* containingFlowThread = renderer->flowThreadContainingBlock();
-    if (!containingFlowThread) {
-        Highlight highlight;
-        buildRendererHighlight(renderer, nullptr, config, highlight, InspectorOverlay::CoordinateSystem::View);
-        arrayOfFragments->addItem(buildObjectForHighlight(highlight));
-    } else {
-        RenderRegion* startRegion = nullptr;
-        RenderRegion* endRegion = nullptr;
-        if (!containingFlowThread->getRegionRangeForBox(&renderer->enclosingBox(), startRegion, endRegion)) {
-            // The flow has no visible regions. The renderer is not visible on screen.
-            return nullptr;
-        }
-
-        const RenderRegionList& regionList = containingFlowThread->renderRegionList();
-        for (RenderRegionList::const_iterator iter = regionList.find(startRegion); iter != regionList.end(); ++iter) {
-            RenderRegion* region = *iter;
-            if (region->isValid()) {
-                // Compute the highlight of the fragment inside the current region.
-                Highlight highlight;
-                buildRendererHighlight(renderer, region, config, highlight, InspectorOverlay::CoordinateSystem::View);
-                Ref<Inspector::Protocol::OverlayTypes::FragmentHighlightData> fragmentHighlight = buildObjectForHighlight(highlight);
-
-                // Compute the clipping area of the region.
-                fragmentHighlight->setRegionClippingArea(buildQuadObjectForCSSRegionContentClip(region));
-                arrayOfFragments->addItem(WTFMove(fragmentHighlight));
-            }
-            if (region == endRegion)
-                break;
-        }
-    }
+    Highlight highlight;
+    buildRendererHighlight(renderer, config, highlight, InspectorOverlay::CoordinateSystem::View);
+    arrayOfFragments->addItem(buildObjectForHighlight(highlight));
 
     return WTFMove(arrayOfFragments);
 }
index 352996f..fa71989 100644 (file)
@@ -3,21 +3,6 @@ const darkGridColor = "rgba(0,0,0,0.5)";
 const transparentColor = "rgba(0, 0, 0, 0)";
 const gridBackgroundColor = "rgba(255, 255, 255, 0.6)";
 
-// CSS Regions highlight colors.
-const highlightedRegionBackgroundColor = "rgba(127, 211, 248, 0.1)";
-const regionBackgroundColor = "rgba(127, 211, 248, 0.45)";
-const regionStrokeColor = "rgba(98, 207, 255, 0.85)";
-
-// CSS Regions chain highlight colors.
-const regionLinkBoxBackgroundColor = "rgba(255, 255, 255, 0.71)";
-const regionLinkBoxStrokeColor = "rgba(98, 207, 255, 0.85)";
-const regionChainStrokeColor = "rgba(98, 207, 255, 0.85)";
-
-// CSS Region number style.
-const regionNumberFont = "bold 40pt sans-serif";
-const regionNumberFillColor = "rgba(255, 255, 255, 0.9)";
-const regionNumberStrokeColor = "rgb(61, 127, 204)";
-
 // CSS Shapes highlight colors
 const shapeHighlightColor = "rgba(96, 82, 127, 0.8)";
 const shapeMarginHighlightColor = "rgba(96, 82, 127, 0.6)";
@@ -32,21 +17,6 @@ function drawPausedInDebuggerMessage(message)
     document.body.classList.add("dimmed");
 }
 
-function _drawRegionNumber(quad, number)
-{
-    context.save();
-    var midPoint = _quadMidPoint(quad);
-    context.font = regionNumberFont;
-    context.textAlign = "center";
-    context.textBaseline = "middle";
-    context.fillStyle = regionNumberFillColor;
-    context.fillText(number, midPoint.x, midPoint.y);
-    context.strokeWidth = 4;
-    context.strokeStyle = regionNumberStrokeColor;
-    context.strokeText(number, midPoint.x, midPoint.y);
-    context.restore();
-}
-
 function quadToPath(quad)
 {
     context.beginPath();
@@ -281,8 +251,6 @@ function _createElementTitle(elementData)
     builder.appendSpan("px", "px");
 
     builder.appendPropertyIfNotNull("role-name", "Role", elementData.role);
-    builder.appendPropertyIfNotNull("region-flow-name", "Region Flow", elementData.regionFlowData ? elementData.regionFlowData.name : null);
-    builder.appendPropertyIfNotNull("content-flow-name", "Content Flow", elementData.contentFlowData ? elementData.contentFlowData.name : null);
 
     document.getElementById("element-title-container").appendChild(builder.element);
 
@@ -310,15 +278,6 @@ function _drawElementTitle(elementData, fragmentHighlight, scroll)
 
     var boxX = marginQuad[0].x;
 
-    var clipQuad = fragmentHighlight.regionClippingArea;
-    if (clipQuad) {
-        // Restrict the position of the title box to the area of the containing region.
-        anchorTop = Math.max(anchorTop, Math.min(clipQuad[0].y, clipQuad[1].y, clipQuad[2].y, clipQuad[3].y));
-        anchorBottom = Math.min(anchorBottom, Math.max(clipQuad[0].y, clipQuad[1].y, clipQuad[2].y, clipQuad[3].y));
-        boxX = Math.max(boxX, Math.min(clipQuad[0].x, clipQuad[1].x, clipQuad[2].x, clipQuad[3].x));
-        boxX = Math.min(boxX, Math.max(clipQuad[0].x, clipQuad[1].x, clipQuad[2].x, clipQuad[3].x));
-    }
-
     boxX = Math.max(2, boxX - scroll.x);
     anchorTop -= scroll.y;
     anchorBottom -= scroll.y;
@@ -371,49 +330,6 @@ function _drawElementTitle(elementData, fragmentHighlight, scroll)
     elementTitle.style.left = (boxX + 3) + "px";
 }
 
-function _quadMidPoint(quad)
-{
-    return {
-        x: (quad[0].x + quad[1].x + quad[2].x + quad[3].x) / 4,
-        y: (quad[0].y + quad[1].y + quad[2].y + quad[3].y) / 4,
-    };
-}
-
-function _drawRegionLink(pointA, pointB)
-{
-    context.save();
-    context.lineWidth = 2;
-    context.strokeStyle = regionChainStrokeColor;
-    context.beginPath();
-    context.moveTo(pointA.x, pointA.y);
-    context.lineTo(pointB.x, pointB.y);
-    context.stroke();
-    context.restore();
-}
-
-function _drawRegionsHighlight(regions)
-{
-    for (var i = 0; i < regions.length; ++i) {
-        var region = regions[i];
-        drawOutlinedQuad(region.borderQuad, region.isHighlighted ? highlightedRegionBackgroundColor : regionBackgroundColor, regionStrokeColor);
-        _drawRegionNumber(region.borderQuad, i + 1);
-    }
-
-    for (var i = 1; i < regions.length; ++i) {
-        var regionA = regions[i - 1],
-            regionB = regions[i];
-        _drawRegionLink(_quadMidPoint(regionA.outgoingQuad), _quadMidPoint(regionB.incomingQuad));
-    }
-
-    for (var i = 0; i < regions.length; ++i) {
-        var region = regions[i];
-        if (i > 0)
-            drawOutlinedQuad(region.incomingQuad, regionLinkBoxBackgroundColor, regionLinkBoxStrokeColor);
-        if (i !== regions.length - 1)
-            drawOutlinedQuad(region.outgoingQuad, regionLinkBoxBackgroundColor, regionLinkBoxStrokeColor);
-    }
-}
-
 function _drawShapeHighlight(shapeInfo)
 {
     if (shapeInfo.marginShape)
@@ -433,11 +349,6 @@ function _drawFragmentHighlight(highlight)
 
     context.save();
 
-    if (highlight.regionClippingArea) {
-        // Clip to the containing region to avoid showing fragments that are not rendered by this region.
-        quadToPath(highlight.regionClippingArea).clip();
-    }
-
     var quads = highlight.quads.slice();
     var contentQuad = quads.pop();
     var paddingQuad = quads.pop();
@@ -504,9 +415,6 @@ function drawNodeHighlight(allHighlights)
         for (var fragment of highlight.fragments)
             _drawFragmentHighlight(fragment);
 
-        if (highlight.elementData && highlight.elementData.regionFlowData)
-            _drawRegionsHighlight(highlight.elementData.regionFlowData.regions);
-
         if (highlight.elementData && highlight.elementData.shapeOutsideData)
             _drawShapeHighlight(highlight.elementData.shapeOutsideData);
 
index 71e18ae..61b637f 100644 (file)
@@ -1,3 +1,99 @@
+2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Remove support for CSS Regions
+        https://bugs.webkit.org/show_bug.cgi?id=177287
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Protocol/CSSObserver.js:
+        (WI.CSSObserver.prototype.namedFlowCreated):
+        (WI.CSSObserver.prototype.namedFlowRemoved):
+        (WI.CSSObserver.prototype.regionLayoutUpdated):
+        (WI.CSSObserver.prototype.regionOversetChanged):
+        (WI.CSSObserver.prototype.registeredNamedFlowContentElement):
+        (WI.CSSObserver.prototype.unregisteredNamedFlowContentElement):
+        Leave observer functions in for older backends that will send
+        these messages, but we just ignore them.
+
+        * UserInterface/Base/Main.js:
+        * UserInterface/Controllers/DOMTreeManager.js:
+        (WI.DOMTreeManager):
+        (WI.DOMTreeManager.prototype._unbind):
+        (WI.DOMTreeManager._flowPayloadHashKey): Deleted.
+        (WI.DOMTreeManager.prototype._createContentFlowFromPayload): Deleted.
+        (WI.DOMTreeManager.prototype._updateContentFlowFromPayload): Deleted.
+        (WI.DOMTreeManager.prototype.getNamedFlowCollection.onNamedFlowCollectionAvailable): Deleted.
+        (WI.DOMTreeManager.prototype.getNamedFlowCollection): Deleted.
+        (WI.DOMTreeManager.prototype.namedFlowCreated): Deleted.
+        (WI.DOMTreeManager.prototype.namedFlowRemoved): Deleted.
+        (WI.DOMTreeManager.prototype._sendNamedFlowUpdateEvents): Deleted.
+        (WI.DOMTreeManager.prototype.regionOversetChanged): Deleted.
+        (WI.DOMTreeManager.prototype.registeredNamedFlowContentElement): Deleted.
+        (WI.DOMTreeManager.prototype._removeContentNodeFromFlowIfNeeded): Deleted.
+        (WI.DOMTreeManager.prototype.unregisteredNamedFlowContentElement): Deleted.
+        (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes.nodeRequested): Deleted.
+        (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes): Deleted.
+        (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.regionNodesAvailable): Deleted.
+        (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable): Deleted.
+        (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getComputedProperty): Deleted.
+        (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getContentFlowName): Deleted.
+        (WI.DOMTreeManager.prototype.getNodeContentFlowInfo): Deleted.
+        * UserInterface/Images/ContentFlow.svg: Removed.
+        * UserInterface/Images/gtk/ContentFlow.svg: Removed.
+        * UserInterface/Main.html:
+        * UserInterface/Models/Collection.js:
+        * UserInterface/Models/ContentFlow.js: Removed.
+        * UserInterface/Models/DOMTree.js:
+        (WI.DOMTree):
+        (WI.DOMTree.prototype.get frame):
+        (WI.DOMTree.prototype._framePageExecutionContextChanged):
+        (WI.DOMTree.prototype.get contentFlowCollection): Deleted.
+        (WI.DOMTree.prototype.requestContentFlowList): Deleted.
+        (WI.DOMTree.prototype._isContentFlowInCurrentDocument): Deleted.
+        (WI.DOMTree.prototype._contentFlowListWasUpdated): Deleted.
+        (WI.DOMTree.prototype._contentFlowWasAdded): Deleted.
+        (WI.DOMTree.prototype._contentFlowWasRemoved): Deleted.
+        * UserInterface/Test.html:
+        * UserInterface/Views/CollectionContentView.js:
+        (WI.CollectionContentView):
+        * UserInterface/Views/ComputedStyleDetailsPanel.css:
+        (.details-section > .content > .group > .row.simple.content-flow-link > .value > span > .icon): Deleted.
+        * UserInterface/Views/ComputedStyleDetailsPanel.js:
+        (WI.ComputedStyleDetailsPanel.prototype.refresh):
+        (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
+        (WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged):
+        (WI.ComputedStyleDetailsPanel):
+        (WI.ComputedStyleDetailsPanel.prototype.get regionFlow): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype.set regionFlow): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype.get contentFlow): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype.set contentFlow): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype.get containerRegions): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype.set containerRegions): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype.sizeDidChange): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype._updateFlowNamesSectionVisibility): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype._resetFlowDetails): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails.contentFlowInfoReady): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked): Deleted.
+        (WI.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked): Deleted.
+        * UserInterface/Views/ContentFlowDOMTreeContentView.js: Removed.
+        * UserInterface/Views/ContentFlowIcon.css: Removed.
+        * UserInterface/Views/ContentFlowTreeElement.js: Removed.
+        * UserInterface/Views/ContentView.js:
+        (WI.ContentView.createFromRepresentedObject):
+        (WI.ContentView.isViewable):
+        * UserInterface/Views/FrameTreeElement.js:
+        (WI.FrameTreeElement.prototype.onpopulate):
+        (WI.FrameTreeElement.prototype.onexpand):
+        (WI.FrameTreeElement.prototype._childContentFlowWasAdded): Deleted.
+        (WI.FrameTreeElement.prototype._childContentFlowWasRemoved): Deleted.
+        (WI.FrameTreeElement.prototype._rootDOMNodeInvalidated): Deleted.
+        * UserInterface/Views/ResourceSidebarPanel.js:
+        (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
+        * UserInterface/Views/ResourcesTabContentView.js:
+        (WI.ResourcesTabContentView):
+        (WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
+
 2017-09-21  Ross Kirsling  <ross.kirsling@sony.com>
 
         Web Inspector: Add details sidebar to Layers tab.
index aac6824..7be968b 100644 (file)
@@ -1099,10 +1099,6 @@ WI.tabContentViewClassForRepresentedObject = function(representedObject)
         || representedObject instanceof WI.ShaderProgram)
         return WI.ResourcesTabContentView;
 
-    // FIXME: Move Content Flows to the Elements tab?
-    if (representedObject instanceof WI.ContentFlow)
-        return WI.ResourcesTabContentView;
-
     // FIXME: Move these to a Storage tab.
     if (representedObject instanceof WI.DOMStorageObject || representedObject instanceof WI.CookieStorageObject ||
         representedObject instanceof WI.DatabaseTableObject || representedObject instanceof WI.DatabaseObject ||
index 547d8ea..f01a9c3 100644 (file)
@@ -39,22 +39,12 @@ WI.DOMTreeManager = class DOMTreeManager extends WI.Object
         this._idToDOMNode = {};
         this._document = null;
         this._attributeLoadNodeIds = {};
-        this._flows = new Map;
-        this._contentNodesToFlowsMap = new Map;
         this._restoreSelectedNodeIsAllowed = true;
         this._loadNodeAttributesTimeout = 0;
 
         WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, this._mainResourceDidChange, this);
     }
 
-    // Static
-
-    static _flowPayloadHashKey(flowPayload)
-    {
-        // Use the flow node id, to avoid collisions when we change main document id.
-        return flowPayload.documentNodeId + ":" + flowPayload.name;
-    }
-
     // Public
 
     requestDocument(callback)
@@ -321,8 +311,6 @@ WI.DOMTreeManager = class DOMTreeManager extends WI.Object
 
     _unbind(node)
     {
-        this._removeContentNodeFromFlowIfNeeded(node);
-
         delete this._idToDOMNode[node.id];
 
         for (let i = 0; node.children && i < node.children.length; ++i)
@@ -533,282 +521,6 @@ WI.DOMTreeManager = class DOMTreeManager extends WI.Object
         return highlightConfig;
     }
 
-    _createContentFlowFromPayload(flowPayload)
-    {
-        // FIXME: Collect the regions from the payload.
-        var flow = new WI.ContentFlow(flowPayload.documentNodeId, flowPayload.name, flowPayload.overset, flowPayload.content.map(this.nodeForId.bind(this)));
-
-        for (var contentNode of flow.contentNodes) {
-            console.assert(!this._contentNodesToFlowsMap.has(contentNode.id));
-            this._contentNodesToFlowsMap.set(contentNode.id, flow);
-        }
-
-        return flow;
-    }
-
-    _updateContentFlowFromPayload(contentFlow, flowPayload)
-    {
-        console.assert(contentFlow.contentNodes.length === flowPayload.content.length);
-        console.assert(contentFlow.contentNodes.every((node, i) => node.id === flowPayload.content[i]));
-
-        // FIXME: Collect the regions from the payload.
-        contentFlow.overset = flowPayload.overset;
-    }
-
-    getNamedFlowCollection(documentNodeIdentifier)
-    {
-        function onNamedFlowCollectionAvailable(error, flows)
-        {
-            if (error)
-                return;
-            this._contentNodesToFlowsMap.clear();
-            var contentFlows = [];
-            for (var i = 0; i < flows.length; ++i) {
-                var flowPayload = flows[i];
-                var flowKey = WI.DOMTreeManager._flowPayloadHashKey(flowPayload);
-                var contentFlow = this._flows.get(flowKey);
-                if (contentFlow)
-                    this._updateContentFlowFromPayload(contentFlow, flowPayload);
-                else {
-                    contentFlow = this._createContentFlowFromPayload(flowPayload);
-                    this._flows.set(flowKey, contentFlow);
-                }
-                contentFlows.push(contentFlow);
-            }
-            this.dispatchEventToListeners(WI.DOMTreeManager.Event.ContentFlowListWasUpdated, {documentNodeIdentifier, flows: contentFlows});
-        }
-
-        if (window.CSSAgent)
-            CSSAgent.getNamedFlowCollection(documentNodeIdentifier, onNamedFlowCollectionAvailable.bind(this));
-    }
-
-    namedFlowCreated(flowPayload)
-    {
-        var flowKey = WI.DOMTreeManager._flowPayloadHashKey(flowPayload);
-        console.assert(!this._flows.has(flowKey));
-        var contentFlow = this._createContentFlowFromPayload(flowPayload);
-        this._flows.set(flowKey, contentFlow);
-        this.dispatchEventToListeners(WI.DOMTreeManager.Event.ContentFlowWasAdded, {flow: contentFlow});
-    }
-
-    namedFlowRemoved(documentNodeIdentifier, flowName)
-    {
-        var flowKey = WI.DOMTreeManager._flowPayloadHashKey({documentNodeId: documentNodeIdentifier, name: flowName});
-        var contentFlow = this._flows.get(flowKey);
-        console.assert(contentFlow);
-        this._flows.delete(flowKey);
-
-        // Remove any back links to this flow from the content nodes.
-        for (var contentNode of contentFlow.contentNodes)
-            this._contentNodesToFlowsMap.delete(contentNode.id);
-
-        this.dispatchEventToListeners(WI.DOMTreeManager.Event.ContentFlowWasRemoved, {flow: contentFlow});
-    }
-
-    _sendNamedFlowUpdateEvents(flowPayload)
-    {
-        var flowKey = WI.DOMTreeManager._flowPayloadHashKey(flowPayload);
-        console.assert(this._flows.has(flowKey));
-        this._updateContentFlowFromPayload(this._flows.get(flowKey), flowPayload);
-    }
-
-    regionOversetChanged(flowPayload)
-    {
-        this._sendNamedFlowUpdateEvents(flowPayload);
-    }
-
-    registeredNamedFlowContentElement(documentNodeIdentifier, flowName, contentNodeId, nextContentElementNodeId)
-    {
-        var flowKey = WI.DOMTreeManager._flowPayloadHashKey({documentNodeId: documentNodeIdentifier, name: flowName});
-        console.assert(this._flows.has(flowKey));
-        console.assert(!this._contentNodesToFlowsMap.has(contentNodeId));
-
-        var flow = this._flows.get(flowKey);
-        var contentNode = this.nodeForId(contentNodeId);
-
-        this._contentNodesToFlowsMap.set(contentNode.id, flow);
-
-        if (nextContentElementNodeId)
-            flow.insertContentNodeBefore(contentNode, this.nodeForId(nextContentElementNodeId));
-        else
-            flow.appendContentNode(contentNode);
-    }
-
-    _removeContentNodeFromFlowIfNeeded(node)
-    {
-        if (!this._contentNodesToFlowsMap.has(node.id))
-            return;
-        var flow = this._contentNodesToFlowsMap.get(node.id);
-        this._contentNodesToFlowsMap.delete(node.id);
-        flow.removeContentNode(node);
-    }
-
-    unregisteredNamedFlowContentElement(documentNodeIdentifier, flowName, contentNodeId)
-    {
-        console.assert(this._contentNodesToFlowsMap.has(contentNodeId));
-
-        var flow = this._contentNodesToFlowsMap.get(contentNodeId);
-        console.assert(flow.id === WI.DOMTreeManager._flowPayloadHashKey({documentNodeId: documentNodeIdentifier, name: flowName}));
-
-        this._contentNodesToFlowsMap.delete(contentNodeId);
-        flow.removeContentNode(this.nodeForId(contentNodeId));
-    }
-
-    _coerceRemoteArrayOfDOMNodes(remoteObject, callback)
-    {
-        console.assert(remoteObject.type === "object");
-        console.assert(remoteObject.subtype === "array");
-
-        let length = remoteObject.size;
-        if (!length) {
-            callback(null, []);
-            return;
-        }
-
-        let nodes;
-        let received = 0;
-        let lastError = null;
-        let domTreeManager = this;
-
-        function nodeRequested(index, error, nodeId)
-        {
-            if (error)
-                lastError = error;
-            else
-                nodes[index] = domTreeManager._idToDOMNode[nodeId];
-            if (++received === length)
-                callback(lastError, nodes);
-        }
-
-        WI.runtimeManager.getPropertiesForRemoteObject(remoteObject.objectId, function(error, properties) {
-            if (error) {
-                callback(error);
-                return;
-            }
-
-            nodes = new Array(length);
-            for (let i = 0; i < length; ++i) {
-                let nodeProperty = properties.get(String(i));
-                console.assert(nodeProperty.value.type === "object");
-                console.assert(nodeProperty.value.subtype === "node");
-                DOMAgent.requestNode(nodeProperty.value.objectId, nodeRequested.bind(null, i));
-            }
-        });
-    }
-
-    getNodeContentFlowInfo(domNode, resultReadyCallback)
-    {
-        WI.RemoteObject.resolveNode(domNode).then((remoteObject) => {
-            let evalParameters = {
-                objectId: remoteObject.objectId,
-                functionDeclaration: appendWebInspectorSourceURL(inspectedPage_node_getFlowInfo.toString()),
-                doNotPauseOnExceptionsAndMuteConsole: true,
-                returnByValue: false,
-                generatePreview: false
-            };
-            RuntimeAgent.callFunctionOn.invoke(evalParameters, regionNodesAvailable.bind(this));
-        }).catch(resultReadyCallback);
-
-        function regionNodesAvailable(error, remoteObject, wasThrown)
-        {
-            if (error) {
-                resultReadyCallback(error);
-                return;
-            }
-
-            if (wasThrown) {
-                // We should never get here, but having the error is useful for debugging.
-                console.error("Error while executing backend function:", JSON.stringify(remoteObject));
-                resultReadyCallback(null);
-                return;
-            }
-
-            // The backend function can never return null.
-            console.assert(remoteObject.type === "object");
-            console.assert(remoteObject.objectId);
-            WI.runtimeManager.getPropertiesForRemoteObject(remoteObject.objectId, remoteObjectPropertiesAvailable.bind(this));
-        }
-
-        function remoteObjectPropertiesAvailable(error, properties) {
-            if (error) {
-                resultReadyCallback(error);
-                return;
-            }
-
-            var result = {
-                regionFlow: null,
-                contentFlow: null,
-                regions: null
-            };
-
-            var regionFlowNameProperty = properties.get("regionFlowName");
-            if (regionFlowNameProperty && regionFlowNameProperty.value && regionFlowNameProperty.value.value) {
-                console.assert(regionFlowNameProperty.value.type === "string");
-                var regionFlowKey = WI.DOMTreeManager._flowPayloadHashKey({documentNodeId: domNode.ownerDocument.id, name: regionFlowNameProperty.value.value});
-                result.regionFlow = this._flows.get(regionFlowKey);
-            }
-
-            var contentFlowNameProperty = properties.get("contentFlowName");
-            if (contentFlowNameProperty && contentFlowNameProperty.value && contentFlowNameProperty.value.value) {
-                console.assert(contentFlowNameProperty.value.type === "string");
-                var contentFlowKey = WI.DOMTreeManager._flowPayloadHashKey({documentNodeId: domNode.ownerDocument.id, name: contentFlowNameProperty.value.value});
-                result.contentFlow = this._flows.get(contentFlowKey);
-            }
-
-            var regionsProperty = properties.get("regions");
-            if (!regionsProperty || !regionsProperty.value.objectId) {
-                // The list of regions is null.
-                resultReadyCallback(null, result);
-                return;
-            }
-
-            this._coerceRemoteArrayOfDOMNodes(regionsProperty.value, function(error, nodes) {
-                result.regions = nodes;
-                resultReadyCallback(error, result);
-            });
-        }
-
-        function inspectedPage_node_getFlowInfo()
-        {
-            function getComputedProperty(node, propertyName)
-            {
-                if (!node.ownerDocument || !node.ownerDocument.defaultView)
-                    return null;
-                var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
-                return computedStyle ? computedStyle[propertyName] : null;
-            }
-
-            function getContentFlowName(node)
-            {
-                for (; node; node = node.parentNode) {
-                    var flowName = getComputedProperty(node, "webkitFlowInto");
-                    if (flowName && flowName !== "none")
-                        return flowName;
-                }
-                return null;
-            }
-
-            var node = this;
-
-            // Even detached nodes have an ownerDocument.
-            console.assert(node.ownerDocument);
-
-            var result = {
-                regionFlowName: getComputedProperty(node, "webkitFlowFrom"),
-                contentFlowName: getContentFlowName(node),
-                regions: null
-            };
-
-            if (result.contentFlowName) {
-                var flowThread = node.ownerDocument.webkitGetNamedFlows().namedItem(result.contentFlowName);
-                if (flowThread)
-                    result.regions = Array.from(flowThread.getRegionsByContent(node));
-            }
-
-            return result;
-        }
-    }
-
     // Private
 
     _mainResourceDidChange(event)
@@ -829,8 +541,4 @@ WI.DOMTreeManager.Event = {
     ChildNodeCountUpdated: "dom-tree-manager-child-node-count-updated",
     DOMNodeWasInspected: "dom-tree-manager-dom-node-was-inspected",
     InspectModeStateChanged: "dom-tree-manager-inspect-mode-state-changed",
-    ContentFlowListWasUpdated: "dom-tree-manager-content-flow-list-was-updated",
-    ContentFlowWasAdded: "dom-tree-manager-content-flow-was-added",
-    ContentFlowWasRemoved: "dom-tree-manager-content-flow-was-removed",
-    RegionOversetChanged: "dom-tree-manager-region-overset-changed"
 };
diff --git a/Source/WebInspectorUI/UserInterface/Images/ContentFlow.svg b/Source/WebInspectorUI/UserInterface/Images/ContentFlow.svg
deleted file mode 100644 (file)
index 8d123cf..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright © 2013 Adobe Systems Inc. All rights reserved. -->
-<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
-    <path fill="rgb(112, 112, 112)" d="M 13.179 0.75 H 2.821 c -1.141 0 -2.071 0.931 -2.071 2.071 v 10.357 c 0 1.141 0.931 2.071 2.071 2.071 h 10.357 c 1.141 0 2.071 -0.931 2.071 -2.071 V 2.821 C 15.25 1.681 14.319 0.75 13.179 0.75 M 13.179 1.785 c 0.57 0 1.035 0.466 1.035 1.036 v 10.357 c 0 0.57 -0.465 1.035 -1.035 1.035 H 2.821 c -0.57 0 -1.036 -0.465 -1.036 -1.035 V 2.821 c 0 -0.57 0.465 -1.036 1.036 -1.036 H 13.179"/>
-    <rect fill="rgb(112, 112, 112)" x="2.676" y="2.967" width="4.854" height="4.094"/>
-    <rect fill="rgb(112, 112, 112)" x="2.676" y="8.497" width="2.755" height="4.35"/>
-    <rect fill="rgb(112, 112, 112)" x="8.891" y="2.967" width="4.412" height="10.108"/>
-</svg>
diff --git a/Source/WebInspectorUI/UserInterface/Images/gtk/ContentFlow.svg b/Source/WebInspectorUI/UserInterface/Images/gtk/ContentFlow.svg
deleted file mode 100644 (file)
index 0f16fc1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Licensed under the Creative Commons Attribution-Share Alike 3.0 United States License (http://creativecommons.org/licenses/by-sa/3.0/) -->
-<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
- <path fill="#bebebe" d="m2.8124 0.50055a1.0001 1.0001 0 0 0 -0.8125 1v13a1.0001 1.0001 0 0 0 1 1h10a1.0001 1.0001 0 0 0 1 -1v-9.4375a1.0001 1.0001 0 0 0 -0.28125 -0.71875l-3.563-3.563a1.0001 1.0001 0 0 0 -0.71875 -0.28125h-6.4375a1.0001 1.0001 0 0 0 -0.0937 0 1.0001 1.0001 0 0 0 -0.0937 0zm1.1875 2h5v3h3v8h-8v-11z"/>
- <path fill="#bebebe" d="m9.4173 6.111c-0.86023 0-1.5563 0.72246-1.5563 1.5827s0.69608 1.5563 1.5563 1.5563c0.86024 0 1.5827-0.69608 1.5827-1.5563 0-0.86023-0.72246-1.5827-1.5827-1.5827zm0 1.0024c0.3198 0 0.58032 0.26053 0.58032 0.58032 0 0.3198-0.26052 0.55395-0.58032 0.55395s-0.55394-0.23415-0.55394-0.55395c0-0.31979 0.23414-0.58032 0.55394-0.58032z"/>
- <rect width="2.1" height="5.5" x="5" y="3.5589" fill="#bebebe"/>
- <rect width="6" height="2.4" x="5" y="10.1" fill="#bebebe"/>
-</svg>
index 7fc6012..12a295b 100644 (file)
@@ -62,7 +62,6 @@
     <link rel="stylesheet" href="Views/ConsolePrompt.css">
     <link rel="stylesheet" href="Views/ContentBrowser.css">
     <link rel="stylesheet" href="Views/ContentBrowserTabContentView.css">
-    <link rel="stylesheet" href="Views/ContentFlowIcon.css">
     <link rel="stylesheet" href="Views/ContentView.css">
     <link rel="stylesheet" href="Views/ContentViewContainer.css">
     <link rel="stylesheet" href="Views/ControlToolbarItem.css">
     <script src="Models/CollectionEntryPreview.js"></script>
     <script src="Models/Color.js"></script>
     <script src="Models/ConsoleCommandResultMessage.js"></script>
-    <script src="Models/ContentFlow.js"></script>
     <script src="Models/CookieStorageObject.js"></script>
     <script src="Models/DOMBreakpoint.js"></script>
     <script src="Models/DOMNode.js"></script>
     <script src="Views/ConsoleGroup.js"></script>
     <script src="Views/ConsolePrompt.js"></script>
     <script src="Views/ConsoleSession.js"></script>
-    <script src="Views/ContentFlowDOMTreeContentView.js"></script>
-    <script src="Views/ContentFlowTreeElement.js"></script>
     <script src="Views/ContentViewContainer.js"></script>
     <script src="Views/ContextMenu.js"></script>
     <script src="Views/ContextMenuUtilities.js"></script>
index 53943b1..c54f92b 100644 (file)
@@ -112,7 +112,6 @@ WI.Collection = class Collection extends WI.Object
 
  WI.Collection.TypeVerifier = {
     Any: (object) => true,
-    ContentFlow: (object) => object instanceof WI.ContentFlow,
     Frame: (object) => object instanceof WI.Frame,
     Resource: (object) => object instanceof WI.Resource,
     Script: (object) => object instanceof WI.Script,
diff --git a/Source/WebInspectorUI/UserInterface/Models/ContentFlow.js b/Source/WebInspectorUI/UserInterface/Models/ContentFlow.js
deleted file mode 100644 (file)
index 32bef02..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer in the documentation and/or other materials
- *    provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-WI.ContentFlow = class ContentFlow extends WI.Object
-{
-    constructor(documentNodeIdentifier, name, overset, contentNodes)
-    {
-        super();
-
-        this._documentNodeIdentifier = documentNodeIdentifier;
-        this._name = name;
-        this._overset = overset;
-        this._contentNodes = contentNodes;
-    }
-
-    // Public
-
-    get id()
-    {
-        // Use the flow node id, to avoid collisions when we change main document id.
-        return this._documentNodeIdentifier + ":" + this._name;
-    }
-
-    get documentNodeIdentifier()
-    {
-        return this._documentNodeIdentifier;
-    }
-
-    get name()
-    {
-        return this._name;
-    }
-
-    get overset()
-    {
-        return this._overset;
-    }
-
-    set overset(overset)
-    {
-        if (this._overset === overset)
-            return;
-        this._overset = overset;
-        this.dispatchEventToListeners(WI.ContentFlow.Event.FlowOversetWasChanged);
-    }
-
-    get contentNodes()
-    {
-        return this._contentNodes;
-    }
-
-    insertContentNodeBefore(contentNode, referenceNode)
-    {
-        var index = this._contentNodes.indexOf(referenceNode);
-        console.assert(index !== -1);
-        this._contentNodes.splice(index, 0, contentNode);
-        this.dispatchEventToListeners(WI.ContentFlow.Event.ContentNodeWasAdded, {node: contentNode, before: referenceNode});
-    }
-
-    appendContentNode(contentNode)
-    {
-        this._contentNodes.push(contentNode);
-        this.dispatchEventToListeners(WI.ContentFlow.Event.ContentNodeWasAdded, {node: contentNode});
-    }
-
-    removeContentNode(contentNode)
-    {
-        var index = this._contentNodes.indexOf(contentNode);
-        console.assert(index !== -1);
-        this._contentNodes.splice(index, 1);
-        this.dispatchEventToListeners(WI.ContentFlow.Event.ContentNodeWasRemoved, {node: contentNode});
-    }
-};
-
-WI.ContentFlow.Event = {
-    OversetWasChanged: "content-flow-overset-was-changed",
-    ContentNodeWasAdded: "content-flow-content-node-was-added",
-    ContentNodeWasRemoved: "content-flow-content-node-was-removed"
-};
index 3f79372..84a639e 100644 (file)
@@ -33,7 +33,6 @@ WI.DOMTree = class DOMTree extends WI.Object
 
         this._rootDOMNode = null;
         this._requestIdentifier = 0;
-        this._contentFlowCollection = new WI.Collection(WI.Collection.TypeVerifier.ContentFlow);
 
         this._frame.addEventListener(WI.Frame.Event.PageExecutionContextChanged, this._framePageExecutionContextChanged, this);
 
@@ -44,16 +43,11 @@ WI.DOMTree = class DOMTree extends WI.Object
             WI.domTreeManager.addEventListener(WI.DOMTreeManager.Event.NodeRemoved, this._nodeRemoved, this);
             this._frame.addEventListener(WI.Frame.Event.MainResourceDidChange, this._frameMainResourceDidChange, this);
         }
-
-        WI.domTreeManager.addEventListener(WI.DOMTreeManager.Event.ContentFlowListWasUpdated, this._contentFlowListWasUpdated, this);
-        WI.domTreeManager.addEventListener(WI.DOMTreeManager.Event.ContentFlowWasAdded, this._contentFlowWasAdded, this);
-        WI.domTreeManager.addEventListener(WI.DOMTreeManager.Event.ContentFlowWasRemoved, this._contentFlowWasRemoved, this);
     }
 
     // Public
 
     get frame() { return this._frame; }
-    get contentFlowCollection() { return this._contentFlowCollection; }
 
     disconnect()
     {
@@ -112,14 +106,6 @@ WI.DOMTree = class DOMTree extends WI.Object
         this._requestRootDOMNode();
     }
 
-    requestContentFlowList()
-    {
-        this.requestRootDOMNode(function(rootNode) {
-            // Let the backend know we are interested about the named flow events for this document.
-            WI.domTreeManager.getNamedFlowCollection(rootNode.id);
-        });
-    }
-
     // Private
 
     _requestRootDOMNode()
@@ -239,71 +225,8 @@ WI.DOMTree = class DOMTree extends WI.Object
             this._requestRootDOMNode();
         }
     }
-
-    _isContentFlowInCurrentDocument(flow)
-    {
-        return this._rootDOMNode && this._rootDOMNode.id === flow.documentNodeIdentifier;
-    }
-
-    _contentFlowListWasUpdated(event)
-    {
-        if (!this._rootDOMNode || this._rootDOMNode.id !== event.data.documentNodeIdentifier)
-            return;
-
-        // Assume that all the flows have been removed.
-        let deletedFlows = new Set(this._contentFlowCollection.items);
-        let newFlows = new Set;
-        for (let flow of event.data.flows) {
-            // All the flows received from WebKit are part of the same document.
-            console.assert(this._isContentFlowInCurrentDocument(flow));
-
-            if (this._contentFlowCollection.items.has(flow)) {
-                // Remove the flow name from the deleted list.
-                console.assert(deletedFlows.has(flow));
-                deletedFlows.delete(flow);
-            } else {
-                this._contentFlowCollection.add(flow);
-                newFlows.add(flow);
-            }
-        }
-
-        for (let flow of deletedFlows)
-            this._contentFlowCollection.remove(flow);
-
-        // Send update events to listeners.
-
-        for (let flow of deletedFlows)
-            this.dispatchEventToListeners(WI.DOMTree.Event.ContentFlowWasRemoved, {flow});
-
-        for (let flow of newFlows)
-            this.dispatchEventToListeners(WI.DOMTree.Event.ContentFlowWasAdded, {flow});
-    }
-
-    _contentFlowWasAdded(event)
-    {
-        let flow = event.data.flow;
-        if (!this._isContentFlowInCurrentDocument(flow))
-            return;
-
-        this._contentFlowCollection.add(flow);
-
-        this.dispatchEventToListeners(WI.DOMTree.Event.ContentFlowWasAdded, {flow});
-    }
-
-    _contentFlowWasRemoved(event)
-    {
-        let flow = event.data.flow;
-        if (!this._isContentFlowInCurrentDocument(flow))
-            return;
-
-        this._contentFlowCollection.remove(flow);
-
-        this.dispatchEventToListeners(WI.DOMTree.Event.ContentFlowWasRemoved, {flow});
-    }
 };
 
 WI.DOMTree.Event = {
     RootDOMNodeInvalidated: "dom-tree-root-dom-node-invalidated",
-    ContentFlowWasAdded: "dom-tree-content-flow-was-added",
-    ContentFlowWasRemoved: "dom-tree-content-flow-was-removed"
 };
index ed9e636..474cbb8 100644 (file)
@@ -49,32 +49,31 @@ WI.CSSObserver = class CSSObserver
 
     namedFlowCreated(namedFlow)
     {
-        WI.domTreeManager.namedFlowCreated(namedFlow);
+        // COMPATIBILITY (iOS 10): Removed after iOS 10. Ignore for iOS 10 and earlier.
     }
 
     namedFlowRemoved(documentNodeId, flowName)
     {
-        WI.domTreeManager.namedFlowRemoved(documentNodeId, flowName);
+        // COMPATIBILITY (iOS 10): Removed after iOS 10. Ignore for iOS 10 and earlier.
     }
 
-    // COMPATIBILITY (iOS 7): regionLayoutUpdated was removed and replaced by regionOversetChanged.
     regionLayoutUpdated(namedFlow)
     {
-        this.regionOversetChanged(namedFlow);
+        // COMPATIBILITY (iOS 7): regionLayoutUpdated was removed and replaced by regionOversetChanged. Ignore.
     }
 
     regionOversetChanged(namedFlow)
     {
-        WI.domTreeManager.regionOversetChanged(namedFlow);
+        // COMPATIBILITY (iOS 10): Removed after iOS 10. Ignore for iOS 10 and earlier.
     }
 
     registeredNamedFlowContentElement(documentNodeId, flowName, contentNodeId, nextContentElementNodeId)
     {
-        WI.domTreeManager.registeredNamedFlowContentElement(documentNodeId, flowName, contentNodeId, nextContentElementNodeId);
+        // COMPATIBILITY (iOS 10): Removed after iOS 10. Ignore for iOS 10 and earlier.
     }
 
     unregisteredNamedFlowContentElement(documentNodeId, flowName, contentNodeId)
     {
-        WI.domTreeManager.unregisteredNamedFlowContentElement(documentNodeId, flowName, contentNodeId);
+        // COMPATIBILITY (iOS 10): Removed after iOS 10. Ignore for iOS 10 and earlier.
     }
 };
index d0cfb07..c4471f9 100644 (file)
     <script src="Models/CollectionEntryPreview.js"></script>
     <script src="Models/Color.js"></script>
     <script src="Models/ConsoleCommandResultMessage.js"></script>
-    <script src="Models/ContentFlow.js"></script>
     <script src="Models/CookieStorageObject.js"></script>
     <script src="Models/DOMBreakpoint.js"></script>
     <script src="Models/DOMNode.js"></script>
index 2baa60d..0372d13 100644 (file)
@@ -44,10 +44,6 @@ WI.CollectionContentView = class CollectionContentView extends WI.ContentView
             title = WI.UIString("Frames");
             break;
 
-        case WI.Collection.TypeVerifier.ContentFlow:
-            title = WI.UIString("Flows");
-            break;
-
         case WI.Collection.TypeVerifier.Script:
             title = WI.UIString("Extra Scripts");
             break;
index 92ef392..f7aec09 100644 (file)
     background-color: white;
 }
 
-.details-section > .content > .group > .row.simple.content-flow-link > .value > span > .icon {
-    width: 12px;
-    height: 12px;
-    content: url(../Images/ContentFlow.svg);
-    margin-right: 4px;
-    -webkit-user-select: none;
-}
-
-.details-section > .content > .group > .row.simple.content-flow-link span
-{
-    vertical-align: top;
-}
-
 .details-section > .content > .group > .row .CodeMirror-code pre .go-to-arrow {
     display: none;
     position: absolute;
index d2ad0b7..ff96476 100644 (file)
@@ -36,43 +36,6 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD
 
     // Public
 
-    get regionFlow() { return this._regionFlow; }
-    set regionFlow(regionFlow)
-    {
-        this._regionFlow = regionFlow;
-        this._regionFlowNameLabelValue.textContent = regionFlow ? regionFlow.name : "";
-        this._regionFlowNameRow.value = regionFlow ? this._regionFlowFragment : null;
-        this._updateFlowNamesSectionVisibility();
-    }
-
-    get contentFlow() { return this._contentFlow; }
-    set contentFlow(contentFlow)
-    {
-        this._contentFlow = contentFlow;
-        this._contentFlowNameLabelValue.textContent = contentFlow ? contentFlow.name : "";
-        this._contentFlowNameRow.value = contentFlow ? this._contentFlowFragment : null;
-        this._updateFlowNamesSectionVisibility();
-    }
-
-    get containerRegions() { return this._containerRegions; }
-    set containerRegions(regions)
-    {
-        this._containerRegions = regions;
-
-        if (!regions || !regions.length) {
-            this._containerRegionsFlowSection.element.classList.add("hidden");
-            return;
-        }
-
-        this._containerRegionsDataGrid.removeChildren();
-        for (var regionNode of regions)
-            this._containerRegionsDataGrid.appendChild(new WI.DOMTreeDataGridNode(regionNode));
-
-        this._containerRegionsFlowSection.element.classList.remove("hidden");
-
-        this._containerRegionsDataGrid.updateLayoutIfNeeded();
-    }
-
     cssStyleDeclarationTextEditorShowProperty(property, showSource)
     {
         function delegateShowProperty() {
@@ -121,7 +84,6 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD
 
         this._propertiesTextEditor.style = this.nodeStyles.computedStyle;
         this._variablesTextEditor.style = this.nodeStyles.computedStyle;
-        this._refreshFlowDetails(this.nodeStyles.node);
         this._boxModelDiagramRow.nodeStyles = this.nodeStyles;
 
         super.refresh();
@@ -177,44 +139,8 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD
 
         variablesRow.element.appendChild(this._variablesTextEditor.element);
 
-        // Region flow name is used to display the "flow-from" property of the Region Containers.
-        this._regionFlowFragment = document.createElement("span");
-        this._regionFlowFragment.appendChild(document.createElement("img")).className = "icon";
-        this._regionFlowNameLabelValue = this._regionFlowFragment.appendChild(document.createElement("span"));
-
-        let goToRegionFlowButton = this._regionFlowFragment.appendChild(WI.createGoToArrowButton());
-        goToRegionFlowButton.addEventListener("click", this._goToRegionFlowArrowWasClicked.bind(this));
-
-        this._regionFlowNameRow = new WI.DetailsSectionSimpleRow(WI.UIString("Region Flow"));
-        this._regionFlowNameRow.element.classList.add("content-flow-link");
-
-        // Content flow name is used to display the "flow-into" property of the Content nodes.
-        this._contentFlowFragment = document.createElement("span");
-        this._contentFlowFragment.appendChild(document.createElement("img")).className = "icon";
-        this._contentFlowNameLabelValue = this._contentFlowFragment.appendChild(document.createElement("span"));
-
-        let goToContentFlowButton = this._contentFlowFragment.appendChild(WI.createGoToArrowButton());
-        goToContentFlowButton.addEventListener("click", this._goToContentFlowArrowWasClicked.bind(this));
-
-        this._contentFlowNameRow = new WI.DetailsSectionSimpleRow(WI.UIString("Content Flow"));
-        this._contentFlowNameRow.element.classList.add("content-flow-link");
-
-        let flowNamesGroup = new WI.DetailsSectionGroup([this._regionFlowNameRow, this._contentFlowNameRow]);
-        this._flowNamesSection = new WI.DetailsSection("content-flow", WI.UIString("Flows"), [flowNamesGroup]);
-
-        this._containerRegionsDataGrid = new WI.DOMTreeDataGrid;
-        this._containerRegionsDataGrid.headerVisible = false;
-
-        this._containerRegionsRow = new WI.DetailsSectionDataGridRow(this._containerRegionsDataGrid);
-        let containerRegionsGroup = new WI.DetailsSectionGroup([this._containerRegionsRow]);
-        this._containerRegionsFlowSection = new WI.DetailsSection("container-regions", WI.UIString("Container Regions"), [containerRegionsGroup]);
-
         this.element.appendChild(propertiesSection.element);
         this.element.appendChild(this._variablesSection.element);
-        this.element.appendChild(this._flowNamesSection.element);
-        this.element.appendChild(this._containerRegionsFlowSection.element);
-
-        this._resetFlowDetails();
 
         this._boxModelDiagramRow = new WI.BoxModelDetailsSectionRow;
 
@@ -224,14 +150,6 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD
         this.element.appendChild(boxModelSection.element);
     }
 
-    sizeDidChange()
-    {
-        super.sizeDidChange();
-
-        // FIXME: <https://webkit.org/b/152269> Web Inspector: Convert DetailsSection classes to use View
-        this._containerRegionsRow.sizeDidChange();
-    }
-
     // Private
 
     _computedStyleShowAllCheckboxValueChanged(event)
@@ -253,50 +171,6 @@ WI.ComputedStyleDetailsPanel = class ComputedStyleDetailsPanel extends WI.StyleD
         if (event && event.data && !event.data.collapsed)
             this._variablesTextEditor.refresh();
     }
-
-    _updateFlowNamesSectionVisibility()
-    {
-        this._flowNamesSection.element.classList.toggle("hidden", !this._contentFlow && !this._regionFlow);
-    }
-
-    _resetFlowDetails ()
-    {
-        this.regionFlow = null;
-        this.contentFlow = null;
-        this.containerRegions = null;
-    }
-
-    _refreshFlowDetails(domNode)
-    {
-        this._resetFlowDetails();
-        if (!domNode)
-            return;
-
-        function contentFlowInfoReady(error, flowData)
-        {
-            // Element is not part of any flow.
-            if (error || !flowData) {
-                this._resetFlowDetails();
-                return;
-            }
-
-            this.regionFlow = flowData.regionFlow;
-            this.contentFlow = flowData.contentFlow;
-            this.containerRegions = flowData.regions;
-        }
-
-        WI.domTreeManager.getNodeContentFlowInfo(domNode, contentFlowInfoReady.bind(this));
-    }
-
-    _goToRegionFlowArrowWasClicked()
-    {
-        WI.showRepresentedObject(this._regionFlow);
-    }
-
-    _goToContentFlowArrowWasClicked()
-    {
-        WI.showRepresentedObject(this._contentFlow, {nodeToSelect: this.nodeStyles.node});
-    }
 };
 
 WI.ComputedStyleDetailsPanel.StyleClassName = "computed";
diff --git a/Source/WebInspectorUI/UserInterface/Views/ContentFlowDOMTreeContentView.js b/Source/WebInspectorUI/UserInterface/Views/ContentFlowDOMTreeContentView.js
deleted file mode 100644 (file)
index b91bdfc..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer in the documentation and/or other materials
- *    provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-WI.ContentFlowDOMTreeContentView = class ContentFlowDOMTreeContentView extends WI.DOMTreeContentView
-{
-    constructor(contentFlow)
-    {
-        console.assert(contentFlow instanceof WI.ContentFlow, contentFlow);
-
-        super(contentFlow);
-
-        contentFlow.addEventListener(WI.ContentFlow.Event.ContentNodeWasAdded, this._contentNodeWasAdded, this);
-        contentFlow.addEventListener(WI.ContentFlow.Event.ContentNodeWasRemoved, this._contentNodeWasRemoved, this);
-
-        this._createContentTrees();
-    }
-
-    // Public
-
-    closed()
-    {
-        this.representedObject.removeEventListener(null, null, this);
-
-        super.closed();
-    }
-
-    getSearchContextNodes(callback)
-    {
-        callback(this.domTreeOutline.children.map(function(treeOutline) {
-            return treeOutline.representedObject.id;
-        }));
-    }
-
-    // Private
-
-    _createContentTrees()
-    {
-        var contentNodes = this.representedObject.contentNodes;
-        for (var contentNode of contentNodes)
-            this.domTreeOutline.appendChild(new WI.DOMTreeElement(contentNode));
-
-        var documentURL = contentNodes.length ? contentNodes[0].ownerDocument.documentURL : null;
-        this._restoreSelectedNodeAfterUpdate(documentURL, contentNodes[0]);
-    }
-
-    _contentNodeWasAdded(event)
-    {
-        var treeElement = new WI.DOMTreeElement(event.data.node);
-        if (!event.data.before) {
-            this.domTreeOutline.appendChild(treeElement);
-            return;
-        }
-
-        var beforeElement = this.domTreeOutline.findTreeElement(event.data.before);
-        console.assert(beforeElement);
-
-        var index = this.domTreeOutline.children.indexOf(beforeElement);
-        console.assert(index !== -1);
-
-        this.domTreeOutline.insertChild(treeElement, index);
-    }
-
-    _contentNodeWasRemoved(event)
-    {
-        var treeElement = this.domTreeOutline.findTreeElement(event.data.node);
-        console.assert(treeElement);
-        this.domTreeOutline.removeChild(treeElement);
-    }
-};
diff --git a/Source/WebInspectorUI/UserInterface/Views/ContentFlowIcon.css b/Source/WebInspectorUI/UserInterface/Views/ContentFlowIcon.css
deleted file mode 100644 (file)
index 402e2b3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer in the documentation and/or other materials
- *    provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-.content-flow-icon .icon {
-    content: url(../Images/ContentFlow.svg);
-}
diff --git a/Source/WebInspectorUI/UserInterface/Views/ContentFlowTreeElement.js b/Source/WebInspectorUI/UserInterface/Views/ContentFlowTreeElement.js
deleted file mode 100644 (file)
index b16fddb..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer in the documentation and/or other materials
- *    provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
- * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-WI.ContentFlowTreeElement = class ContentFlowTreeElement extends WI.GeneralTreeElement
-{
-    constructor(representedObject)
-    {
-        console.assert(representedObject instanceof WI.ContentFlow);
-
-        const subtitle = null;
-        super("content-flow-icon", representedObject.name, subtitle, representedObject);
-    }
-};
index 2246213..5027384 100644 (file)
@@ -152,9 +152,6 @@ WI.ContentView = class ContentView extends WI.View
         if (representedObject instanceof WI.LogObject)
             return new WI.LogContentView(representedObject, extraArguments);
 
-        if (representedObject instanceof WI.ContentFlow)
-            return new WI.ContentFlowDOMTreeContentView(representedObject, extraArguments);
-
         if (representedObject instanceof WI.CallingContextTree)
             return new WI.ProfileView(representedObject, extraArguments);
 
@@ -282,8 +279,6 @@ WI.ContentView = class ContentView extends WI.View
             return true;
         if (representedObject instanceof WI.LogObject)
             return true;
-        if (representedObject instanceof WI.ContentFlow)
-            return true;
         if (representedObject instanceof WI.CallingContextTree)
             return true;
         if (representedObject instanceof WI.HeapSnapshotProxy || representedObject instanceof WI.HeapSnapshotDiffProxy)
index b4951f3..9c9e051 100644 (file)
@@ -42,15 +42,10 @@ WI.FrameTreeElement = class FrameTreeElement extends WI.ResourceTreeElement
         frame.addEventListener(WI.Frame.Event.ChildFrameWasAdded, this._childFrameWasAdded, this);
         frame.addEventListener(WI.Frame.Event.ChildFrameWasRemoved, this._childFrameWasRemoved, this);
 
-        frame.domTree.addEventListener(WI.DOMTree.Event.ContentFlowWasAdded, this._childContentFlowWasAdded, this);
-        frame.domTree.addEventListener(WI.DOMTree.Event.ContentFlowWasRemoved, this._childContentFlowWasRemoved, this);
-        frame.domTree.addEventListener(WI.DOMTree.Event.RootDOMNodeInvalidated, this._rootDOMNodeInvalidated, this);
-
         this.shouldRefreshChildren = true;
         this.folderSettingsKey = this._frame.url.hash;
 
         this.registerFolderizeSettings("frames", WI.UIString("Frames"), this._frame.childFrameCollection, WI.FrameTreeElement);
-        this.registerFolderizeSettings("flows", WI.UIString("Flows"), this._frame.domTree.contentFlowCollection, WI.ContentFlowTreeElement);
         this.registerFolderizeSettings("extra-scripts", WI.UIString("Extra Scripts"), this._frame.extraScriptCollection, WI.ScriptTreeElement);
 
         if (window.CanvasAgent && WI.settings.experimentalShowCanvasContextsInResources.value)
@@ -191,9 +186,6 @@ WI.FrameTreeElement = class FrameTreeElement extends WI.ResourceTreeElement
                 this.addChildForRepresentedObject(sourceMap.resources[j]);
         }
 
-        for (let contentFlow of this._frame.domTree.contentFlowCollection.items)
-            this.addChildForRepresentedObject(contentFlow);
-
         for (let extraScript of this._frame.extraScriptCollection.items) {
             if (extraScript.sourceURL || extraScript.sourceMappingURL)
                 this.addChildForRepresentedObject(extraScript);
@@ -211,7 +203,6 @@ WI.FrameTreeElement = class FrameTreeElement extends WI.ResourceTreeElement
     onexpand()
     {
         this._expandedSetting.value = true;
-        this._frame.domTree.requestContentFlowList();
     }
 
     oncollapse()
@@ -274,22 +265,6 @@ WI.FrameTreeElement = class FrameTreeElement extends WI.ResourceTreeElement
         this.removeChildForRepresentedObject(event.data.childFrame);
     }
 
-    _childContentFlowWasAdded(event)
-    {
-        this.addRepresentedObjectToNewChildQueue(event.data.flow);
-    }
-
-    _childContentFlowWasRemoved(event)
-    {
-        this.removeChildForRepresentedObject(event.data.flow);
-    }
-
-    _rootDOMNodeInvalidated()
-    {
-        if (this.expanded)
-            this._frame.domTree.requestContentFlowList();
-    }
-
     _styleSheetAdded(event)
     {
         if (!event.data.styleSheet.isInspectorStyleSheet())
index 108ddb5..f4e659d 100644 (file)
@@ -465,7 +465,6 @@ WI.ResourceSidebarPanel = class ResourceSidebarPanel extends WI.NavigationSideba
             || treeElement instanceof WI.ResourceTreeElement
             || treeElement instanceof WI.ScriptTreeElement
             || treeElement instanceof WI.CSSStyleSheetTreeElement
-            || treeElement instanceof WI.ContentFlowTreeElement
             || treeElement instanceof WI.CanvasTreeElement
             || treeElement instanceof WI.ShaderProgramTreeElement) {
             const cookie = null;
index 6857124..eec0763 100644 (file)
@@ -34,11 +34,6 @@ WI.ResourcesTabContentView = class ResourcesTabContentView extends WI.ContentBro
         if (window.CanvasAgent && WI.settings.experimentalShowCanvasContextsInResources.value)
             detailsSidebarPanelConstructors.push(WI.CanvasDetailsSidebarPanel);
 
-        // FIXME: Until ContentFlows are moved to the Elements tab, these details sidebar panels need to be included.
-        detailsSidebarPanelConstructors = detailsSidebarPanelConstructors.concat([WI.DOMNodeDetailsSidebarPanel, WI.CSSStyleDetailsSidebarPanel]);
-        if (window.LayerTreeAgent)
-            detailsSidebarPanelConstructors.push(WI.LayerTreeDetailsSidebarPanel);
-
         super(identifier || "resources", "resources", tabBarItem, WI.ResourceSidebarPanel, detailsSidebarPanelConstructors);
     }
 
@@ -68,7 +63,6 @@ WI.ResourcesTabContentView = class ResourcesTabContentView extends WI.ContentBro
             || representedObject instanceof WI.Resource
             || representedObject instanceof WI.Script
             || representedObject instanceof WI.CSSStyleSheet
-            || representedObject instanceof WI.ContentFlow
             || representedObject instanceof WI.Canvas
             || representedObject instanceof WI.ShaderProgram
             || representedObject instanceof WI.Collection;