Web Inspector: Improve copy of console message containing Array and Map output
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Dec 2015 17:42:11 +0000 (17:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Dec 2015 17:42:11 +0000 (17:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152329

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

Introduce a real space in the content instead of style specific
margins so the existing copy/paste mechanism (innerText)
will have spaces between index/key and value.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name): Deleted.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement):
* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name): Deleted.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.titleFragment):
(WebInspector.ObjectTreeMapEntryTreeElement):
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeSetIndexTreeElement):

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.css
Source/WebInspectorUI/UserInterface/Views/ObjectTreeArrayIndexTreeElement.js
Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.css
Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js
Source/WebInspectorUI/UserInterface/Views/ObjectTreeSetIndexTreeElement.js

index 855a9c1..1c8ffb4 100644 (file)
@@ -1,5 +1,30 @@
 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Web Inspector: Improve copy of console message containing Array and Map output
+        https://bugs.webkit.org/show_bug.cgi?id=152329
+
+        Reviewed by Timothy Hatcher.
+
+        Introduce a real space in the content instead of style specific
+        margins so the existing copy/paste mechanism (innerText)
+        will have spaces between index/key and value.
+
+        * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
+        (.object-tree-array-index .index-name): Deleted.
+        * UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
+        (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
+        (WebInspector.ObjectTreeArrayIndexTreeElement):
+        * UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
+        (.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name): Deleted.
+        * UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
+        (WebInspector.ObjectTreeMapEntryTreeElement.prototype.titleFragment):
+        (WebInspector.ObjectTreeMapEntryTreeElement):
+        * UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
+        (WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
+        (WebInspector.ObjectTreeSetIndexTreeElement):
+
+2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
+
         Web Inspector: Typing object literal in the console causes a parse error
         https://bugs.webkit.org/show_bug.cgi?id=141737
 
index 0fd3d84..c36262b 100644 (file)
@@ -60,6 +60,9 @@ WebInspector.ObjectTreeArrayIndexTreeElement = class ObjectTreeArrayIndexTreeEle
         nameElement.textContent = this.property.name;
         nameElement.title = this.propertyPathString(this.thisPropertyPath());
 
+        // Space. For copy/paste to have space between the index and value.
+        container.append(" ");
+
         // Value.
         var valueElement = container.appendChild(document.createElement("span"));
         valueElement.className = "index-value";
index 268f91d..b8a821b 100644 (file)
@@ -26,7 +26,6 @@
 .object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name {
     width: 40px;
     text-align: right;
-    margin-right: 5px;
 }
 
 .object-tree-map-entry.key:not(:first-child) {
index 999e260..0333c58 100644 (file)
@@ -69,6 +69,9 @@ WebInspector.ObjectTreeMapEntryTreeElement = class ObjectTreeMapEntryTreeElement
         nameElement.textContent = this.displayPropertyName();
         nameElement.title = this.propertyPathString(propertyPath);
 
+        // Space. For copy/paste to have space between the key and value.
+        container.append(" ");
+
         // Value.
         var valueElement = container.appendChild(document.createElement("span"));
         valueElement.className = "index-value";
index 1e13230..7a5c8c7 100644 (file)
@@ -71,6 +71,9 @@ WebInspector.ObjectTreeSetIndexTreeElement = class ObjectTreeSetIndexTreeElement
         nameElement.textContent = "\u2022";
         nameElement.title = WebInspector.UIString("Unable to determine path to property from root");
 
+        // Space. For copy/paste to have space between the bullet and value.
+        container.append(" ");
+
         // Value.
         var valueElement = container.appendChild(document.createElement("span"));
         valueElement.className = "index-value";