Title: [201965] trunk/Source/WebInspectorUI
Revision
201965
Author
[email protected]
Date
2016-06-10 22:32:44 -0700 (Fri, 10 Jun 2016)

Log Message

Web Inspector: <template> content should not be hidden as Shadow Content
https://bugs.webkit.org/show_bug.cgi?id=158654

Patch by Joseph Pecoraro <[email protected]> on 2016-06-10
Reviewed by Ryosuke Niwa.

* Localizations/en.lproj/localizedStrings.js:
New "Template Content" string.

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
Don't treat template content as shadow content.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
Custom string for template content fragment.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (201964 => 201965)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-06-11 05:31:48 UTC (rev 201964)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-06-11 05:32:44 UTC (rev 201965)
@@ -1,3 +1,21 @@
+2016-06-10  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: <template> content should not be hidden as Shadow Content
+        https://bugs.webkit.org/show_bug.cgi?id=158654
+
+        Reviewed by Ryosuke Niwa.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        New "Template Content" string.
+
+        * UserInterface/Models/DOMNode.js:
+        (WebInspector.DOMNode):
+        Don't treat template content as shadow content.
+
+        * UserInterface/Views/DOMTreeElement.js:
+        (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
+        Custom string for template content fragment.
+
 2016-06-10  Matt Baker  <[email protected]>
 
         Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (201964 => 201965)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-06-11 05:31:48 UTC (rev 201964)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-06-11 05:32:44 UTC (rev 201965)
@@ -99,7 +99,6 @@
 localizedStrings["Back (%s)"] = "Back (%s)";
 localizedStrings["Background"] = "Background";
 localizedStrings["Basis"] = "Basis";
-localizedStrings["Begin Capturing"] = "Begin Capturing";
 localizedStrings["Blend"] = "Blend";
 localizedStrings["Block Variables"] = "Block Variables";
 localizedStrings["Blur"] = "Blur";
@@ -290,7 +289,6 @@
 localizedStrings["Enable paint flashing"] = "Enable paint flashing";
 localizedStrings["Encoded"] = "Encoded";
 localizedStrings["Encoding"] = "Encoding";
-localizedStrings["End Capturing"] = "End Capturing";
 localizedStrings["Enter Class Name"] = "Enter Class Name";
 localizedStrings["Enter Tag"] = "Enter Tag";
 localizedStrings["Enter Value"] = "Enter Value";
@@ -320,7 +318,6 @@
 localizedStrings["Filename"] = "Filename";
 localizedStrings["Fill"] = "Fill";
 localizedStrings["Fill Mode"] = "Fill Mode";
-localizedStrings["Filter %s"] = "Filter %s";
 localizedStrings["Filter Console Log"] = "Filter Console Log";
 localizedStrings["Filter List"] = "Filter List";
 localizedStrings["Filter Records"] = "Filter Records";
@@ -352,11 +349,8 @@
 localizedStrings["Fragment"] = "Fragment";
 localizedStrings["Frame %d"] = "Frame %d";
 localizedStrings["Frame URL"] = "Frame URL";
-localizedStrings["Frame: %d (%s \u2013 %s)"] = "Frame: %d (%s \u2013 %s)";
 localizedStrings["Frames"] = "Frames";
 localizedStrings["Frames %d \u2013 %d"] = "Frames %d \u2013 %d";
-localizedStrings["Frames: %d \u2013 %d (%s \u2013 %s)"] = "Frames: %d \u2013 %d (%s \u2013 %s)";
-localizedStrings["Frames: None Selected"] = "Frames: None Selected";
 localizedStrings["Full Garbage Collection"] = "Full Garbage Collection";
 localizedStrings["Full URL"] = "Full URL";
 localizedStrings["Function"] = "Function";
@@ -373,7 +367,6 @@
 localizedStrings["HTTP"] = "HTTP";
 localizedStrings["Heap Snapshot Object (@%d)"] = "Heap Snapshot Object (@%d)";
 localizedStrings["Height"] = "Height";
-localizedStrings["Hide Replay Controls"] = "Hide Replay Controls";
 localizedStrings["Hide compositing borders"] = "Hide compositing borders";
 localizedStrings["Hide shadow DOM nodes"] = "Hide shadow DOM nodes";
 localizedStrings["Hide the details sidebar (%s)"] = "Hide the details sidebar (%s)";
@@ -558,7 +551,6 @@
 localizedStrings["Range Issue"] = "Range Issue";
 localizedStrings["Readonly"] = "Readonly";
 localizedStrings["Reasons for compositing:"] = "Reasons for compositing:";
-localizedStrings["Recording"] = "Recording";
 localizedStrings["Recording Timeline Data"] = "Recording Timeline Data";
 localizedStrings["Reference Issue"] = "Reference Issue";
 localizedStrings["Reflection"] = "Reflection";
@@ -614,7 +606,6 @@
 localizedStrings["Select comparison snapshot"] = "Select comparison snapshot";
 localizedStrings["Selected"] = "Selected";
 localizedStrings["Selected Element"] = "Selected Element";
-localizedStrings["Selected Frames"] = "Selected Frames";
 localizedStrings["Selected Item"] = "Selected Item";
 localizedStrings["Selected Items"] = "Selected Items";
 localizedStrings["Selected Symbol"] = "Selected Symbol";
@@ -636,7 +627,6 @@
 localizedStrings["Show All"] = "Show All";
 localizedStrings["Show All Nodes (%d More)"] = "Show All Nodes (%d More)";
 localizedStrings["Show Remaining (%d)"] = "Show Remaining (%d)";
-localizedStrings["Show Replay Controls"] = "Show Replay Controls";
 localizedStrings["Show Source"] = "Show Source";
 localizedStrings["Show all resources"] = "Show all resources";
 localizedStrings["Show compositing borders"] = "Show compositing borders";
@@ -693,6 +683,7 @@
 localizedStrings["Stylesheet"] = "Stylesheet";
 localizedStrings["Stylesheets"] = "Stylesheets";
 localizedStrings["Take snapshot"] = "Take snapshot";
+localizedStrings["Template Content"] = "Template Content";
 localizedStrings["Text"] = "Text";
 localizedStrings["Text Node"] = "Text Node";
 localizedStrings["Text Only"] = "Text Only";
@@ -710,7 +701,6 @@
 localizedStrings["This property needs a value.\nClick to open autocomplete."] = "This property needs a value.\nClick to open autocomplete.";
 localizedStrings["Time"] = "Time";
 localizedStrings["Time until the load event fired, click to show the Network Requests timeline"] = "Time until the load event fired, click to show the Network Requests timeline";
-localizedStrings["Timeline Events"] = "Timeline Events";
 localizedStrings["Timeline Recording %d"] = "Timeline Recording %d";
 localizedStrings["Timelines"] = "Timelines";
 localizedStrings["Timer %s Fired"] = "Timer %s Fired";

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js (201964 => 201965)


--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js	2016-06-11 05:31:48 UTC (rev 201964)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js	2016-06-11 05:32:44 UTC (rev 201965)
@@ -83,7 +83,7 @@
         }
 
         if (payload.templateContent) {
-            this._templateContent = new WebInspector.DOMNode(this._domTreeManager, this.ownerDocument, true, payload.templateContent);
+            this._templateContent = new WebInspector.DOMNode(this._domTreeManager, this.ownerDocument, false, payload.templateContent);
             this._templateContent.parentNode = this;
         }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (201964 => 201965)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js	2016-06-11 05:31:48 UTC (rev 201964)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js	2016-06-11 05:32:44 UTC (rev 201965)
@@ -1198,7 +1198,9 @@
                 if (node.isInShadowTree()) {
                     fragmentElement.textContent = WebInspector.UIString("Shadow Content");
                     fragmentElement.classList.add("shadow");
-                } else
+                } else if (node.parentNode && node.parentNode.templateContent() === node)
+                    fragmentElement.textContent = WebInspector.UIString("Template Content");
+                else
                     fragmentElement.textContent = WebInspector.UIString("Document Fragment");
                 break;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to