Title: [107940] trunk
Revision
107940
Author
[email protected]
Date
2012-02-16 08:37:54 -0800 (Thu, 16 Feb 2012)

Log Message

Web Inspector: remove free flow DOM editing experiment.
https://bugs.webkit.org/show_bug.cgi?id=78813

Reviewed by Yury Semikhatsky.

* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype._markRevision):

Modified Paths

Removed Paths

Diff

Deleted: trunk/LayoutTests/inspector/elements/set-html-via-resource.html (107939 => 107940)


--- trunk/LayoutTests/inspector/elements/set-html-via-resource.html	2012-02-16 16:32:16 UTC (rev 107939)
+++ trunk/LayoutTests/inspector/elements/set-html-via-resource.html	2012-02-16 16:37:54 UTC (rev 107940)
@@ -1,60 +0,0 @@
-<html>
-<head>
-
-<script src=""
-<script src=""
-<script src=""
-
-<script>
-
-function test()
-{
-    WebInspector.experimentsSettings.freeFlowDOMEditing.enableForTest();
-    new WebInspector.DOMModelResourceBinding(WebInspector.domAgent);
-
-    InspectorTest.expandElementsTree(step0);
-    function step0()
-    {
-        InspectorTest.runAfterResourcesAreFinished(["set-html-via-resource.html", "set-html-via-resource-iframe.html"], step1);
-    }
-
-    function step1()
-    {
-        WebInspector.resourceTreeModel.forAllResources(formatter);
-
-        function formatter(resource)
-        {
-            if (resource.url.indexOf("set-html-via-resource-iframe.html") !== -1)
-                resource.setContent("<body>New iframe content</body>", false, step2.bind(this, resource.url));
-        }
-    }
-
-    function step2(url)
-    {
-        for (var id in WebInspector.domAgent._idToDOMNode) {
-            var node = WebInspector.domAgent._idToDOMNode[id];
-            if (node.documentURL === url) {
-                DOMAgent.getOuterHTML(parseInt(id), step3);
-                break;
-            }
-        }
-    }
-
-    function step3(error, text)
-    {
-        InspectorTest.addResult(text);
-        InspectorTest.completeTest();
-    }
-}
-</script>
-</head>
-
-<body>
-<p>
-Tests that the DOM content can be set via editing resource content.
-</p>
-
-<iframe src="" _onload_="runTest()"></iframe>
-
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (107939 => 107940)


--- trunk/Source/WebCore/ChangeLog	2012-02-16 16:32:16 UTC (rev 107939)
+++ trunk/Source/WebCore/ChangeLog	2012-02-16 16:37:54 UTC (rev 107940)
@@ -1,3 +1,13 @@
+2012-02-16  Pavel Feldman  <[email protected]>
+
+        Web Inspector: remove free flow DOM editing experiment.
+        https://bugs.webkit.org/show_bug.cgi?id=78813
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMAgent.prototype._markRevision):
+
 2012-02-16  Patrick Gansterer  <[email protected]>
 
         WinCE build fix after r107453.

Modified: trunk/Source/WebCore/inspector/front-end/DOMAgent.js (107939 => 107940)


--- trunk/Source/WebCore/inspector/front-end/DOMAgent.js	2012-02-16 16:32:16 UTC (rev 107939)
+++ trunk/Source/WebCore/inspector/front-end/DOMAgent.js	2012-02-16 16:37:54 UTC (rev 107940)
@@ -660,9 +660,6 @@
     this._document = null;
     this._attributeLoadNodeIds = {};
     InspectorBackend.registerDOMDispatcher(new WebInspector.DOMDispatcher(this));
-    if (WebInspector.experimentsSettings.freeFlowDOMEditing.isEnabled())
-        new WebInspector.DOMModelResourceBinding(this);
-
     if (WebInspector.settings.emulateTouchEvents.get())
         this._emulateTouchEventsChanged();
     WebInspector.settings.emulateTouchEvents.addChangeListener(this._emulateTouchEventsChanged, this);
@@ -1122,45 +1119,10 @@
 
             if (callback)
                 callback.apply(this, arguments);
-            if (error || !WebInspector.experimentsSettings.freeFlowDOMEditing.isEnabled())
-                return;
-            if (this._captureDOMTimer)
-               clearTimeout(this._captureDOMTimer);
-            this._captureDOMTimer = setTimeout(this._captureDOM.bind(this, node), 500);
         }
         return wrapperFunction.bind(this);
     },
 
-    /**
-     * @param {WebInspector.DOMNode} node
-     */
-    _captureDOM: function(node)
-    {
-        delete this._captureDOMTimer;
-        if (!node.ownerDocument)
-            return;
-
-        function callback(error, text)
-        {
-            if (error) {
-                console.error(error);
-                return;
-            }
-
-            var url = ""
-            if (!url)
-                return;
-
-            var resource = WebInspector.resourceForURL(url);
-            if (!resource)
-                return;
-
-            resource.addRevision(text);
-        }
-        DOMAgent.getOuterHTML(node.ownerDocument.id, callback);
-        
-    },
-
     _emulateTouchEventsChanged: function()
     {
         DOMAgent.setTouchEmulationEnabled(WebInspector.settings.emulateTouchEvents.get());
@@ -1298,39 +1260,3 @@
  * @type {?WebInspector.DOMAgent}
  */
 WebInspector.domAgent = null;
-
-/**
- * @constructor
- * @implements {WebInspector.ResourceDomainModelBinding}
- */
-WebInspector.DOMModelResourceBinding = function(domAgent)
-{
-    this._domAgent = domAgent;
-    WebInspector.Resource.registerDomainModelBinding(WebInspector.Resource.Type.Document, this);
-}
-
-WebInspector.DOMModelResourceBinding.prototype = {
-    setContent: function(resource, content, majorChange, userCallback)
-    {
-        var frameId = resource.frameId;
-        if (!frameId)
-            return;
-
-        PageAgent.setDocumentContent(frameId, content, callbackWrapper);
-
-        function callbackWrapper(error)
-        {
-            if (majorChange)
-                resource.addRevision(content);
-            if (userCallback)
-                userCallback(error);
-        }
-    },
-
-    canSetContent: function()
-    {
-        return true;
-    }
-}
-
-WebInspector.DOMModelResourceBinding.prototype.__proto__ = WebInspector.ResourceDomainModelBinding.prototype;

Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (107939 => 107940)


--- trunk/Source/WebCore/inspector/front-end/Settings.js	2012-02-16 16:32:16 UTC (rev 107939)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js	2012-02-16 16:37:54 UTC (rev 107940)
@@ -170,7 +170,6 @@
     
     // Add currently running experiments here.
     this.sourceFrameAlwaysEditable = this._createExperiment("sourceFrameAlwaysEditable", "Make resources always editable");
-    this.freeFlowDOMEditing = this._createExperiment("freeFlowDOMEditing", "Enable free flow DOM editing");
     this.showMemoryCounters = this._createExperiment("showMemoryCounters", "Show memory counters in Timeline panel");
     this.singleClickEditing = this._createExperiment("singleClickEditing", "Single click CSS editing");
     // FIXME: Enable http/tests/inspector/indexeddb/resources-panel.html when removed from experiments.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to