Web Inspector: DOMTree / Node Details Sidebar do not update as <input> content changes
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Feb 2015 15:39:02 +0000 (15:39 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Feb 2015 15:39:02 +0000 (15:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141790

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-19
Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._characterDataModified):
Update Node "Value" details if character data changes.

* UserInterface/Views/DOMTreeUpdater.js:
(WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
Update the title of the parent. If the parent had a single text node child
and now doesn't, it will need to update its display.

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/DOMTreeUpdater.js

index f805987..31ae44e 100644 (file)
@@ -1,5 +1,22 @@
 2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Web Inspector: DOMTree / Node Details Sidebar do not update as <input> content changes
+        https://bugs.webkit.org/show_bug.cgi?id=141790
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
+        (WebInspector.DOMNodeDetailsSidebarPanel):
+        (WebInspector.DOMNodeDetailsSidebarPanel.prototype._characterDataModified):
+        Update Node "Value" details if character data changes.
+
+        * UserInterface/Views/DOMTreeUpdater.js:
+        (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
+        Update the title of the parent. If the parent had a single text node child
+        and now doesn't, it will need to update its display.
+
+2015-02-19  Joseph Pecoraro  <pecoraro@apple.com>
+
         Web Inspector: Disable DOM Tree Editing / Styles Editing of Shadow DOM Nodes
         https://bugs.webkit.org/show_bug.cgi?id=141793
 
index 759c2e0..2317d46 100644 (file)
@@ -29,6 +29,7 @@ WebInspector.DOMNodeDetailsSidebarPanel = function()
 
     WebInspector.domTreeManager.addEventListener(WebInspector.DOMTreeManager.Event.AttributeModified, this._attributesChanged, this);
     WebInspector.domTreeManager.addEventListener(WebInspector.DOMTreeManager.Event.AttributeRemoved, this._attributesChanged, this);
+    WebInspector.domTreeManager.addEventListener(WebInspector.DOMTreeManager.Event.CharacterDataModified, this._characterDataModified, this);
 
     this.element.classList.add(WebInspector.DOMNodeDetailsSidebarPanel.StyleClassName);
 
@@ -544,6 +545,13 @@ WebInspector.DOMNodeDetailsSidebarPanel.prototype = {
         this._refreshAccessibility();
     },
 
+    _characterDataModified: function(event)
+    {
+        if (event.data.node !== this.domNode)
+            return;
+        this._identityNodeValueRow.value = this.domNode.nodeValue();
+    },
+
     _nodeTypeDisplayName: function()
     {
         switch (this.domNode.nodeType()) {
index cd2500f..ad26841 100644 (file)
@@ -120,6 +120,7 @@ WebInspector.DOMTreeUpdater.prototype = {
 
             var parentNodeItem = this._treeOutline.findTreeElement(parent);
             if (parentNodeItem && !parentNodeItem.alreadyUpdatedChildren) {
+                parentNodeItem.updateTitle();
                 parentNodeItem.updateChildren();
                 parentNodeItem.alreadyUpdatedChildren = true;
                 updatedParentTreeElements.push(parentNodeItem);