Title: [204757] trunk/Source/WebInspectorUI
Revision
204757
Author
commit-qu...@webkit.org
Date
2016-08-22 22:34:42 -0700 (Mon, 22 Aug 2016)

Log Message

Web Inspector: Visual Styles: "Text -> Content" section should only be visible for pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=158272

Patch by Devin Rousso <dcrousso+web...@gmail.com> on 2016-08-22
Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive):
(.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > *):
(.visual-style-property-container.transition): Deleted.
(.visual-style-property-container.animation): Deleted.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (204756 => 204757)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-08-23 05:12:51 UTC (rev 204756)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-08-23 05:34:42 UTC (rev 204757)
@@ -1,5 +1,25 @@
 2016-08-22  Devin Rousso  <dcrousso+web...@gmail.com>
 
+        Web Inspector: Visual Styles: "Text -> Content" section should only be visible for pseudo-element
+        https://bugs.webkit.org/show_bug.cgi?id=158272
+
+        Reviewed by Joseph Pecoraro.
+
+        * Localizations/en.lproj/localizedStrings.js:
+
+        * UserInterface/Views/VisualStyleDetailsPanel.css:
+        (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive):
+        (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > *):
+        (.visual-style-property-container.transition): Deleted.
+        (.visual-style-property-container.animation): Deleted.
+
+        * UserInterface/Views/VisualStyleDetailsPanel.js:
+        (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
+        (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
+
+2016-08-22  Devin Rousso  <dcrousso+web...@gmail.com>
+
         Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line
         https://bugs.webkit.org/show_bug.cgi?id=160840
 

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


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-08-23 05:12:51 UTC (rev 204756)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-08-23 05:34:42 UTC (rev 204757)
@@ -301,6 +301,7 @@
 localizedStrings["Enter a URL"] = "Enter a URL";
 localizedStrings["Enter a name."] = "Enter a name.";
 localizedStrings["Enter the name of a Keyframe"] = "Enter the name of a Keyframe";
+localizedStrings["Enter value"] = "Enter value";
 localizedStrings["Entire Recording"] = "Entire Recording";
 localizedStrings["Error: "] = "Error: ";
 localizedStrings["Errors"] = "Errors";

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css (204756 => 204757)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css	2016-08-23 05:12:51 UTC (rev 204756)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css	2016-08-23 05:34:42 UTC (rev 204757)
@@ -23,6 +23,14 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive {
+    border-bottom: none;
+}
+
+.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > * {
+    display: none;
+}
+
 .sidebar > .panel.details.css-style .visual > .details-section .details-section > .header {
     font-weight: normal;
 }
@@ -94,11 +102,6 @@
     width: 55px;
 }
 
-.visual-style-property-container.transition,
-.visual-style-property-container.animation {
-    margin-left: 11px;
-}
-
 .sidebar > .panel.details.css-style .visual.disabled > .details-section:not(.visual-style-selector-section) {
     opacity: 0.5;
     pointer-events: none;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (204756 => 204757)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2016-08-23 05:12:51 UTC (rev 204756)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2016-08-23 05:34:42 UTC (rev 204757)
@@ -91,6 +91,7 @@
         this.element.appendChild(this._sections.layout.element);
 
         // Text Section
+        this._generateSection("content", WebInspector.UIString("Content"));
         this._generateSection("text-style", WebInspector.UIString("Style"));
         this._generateSection("font", WebInspector.UIString("Font"));
         this._generateSection("font-variants", WebInspector.UIString("Variants"));
@@ -97,7 +98,7 @@
         this._generateSection("text-spacing", WebInspector.UIString("Spacing"));
         this._generateSection("text-shadow", WebInspector.UIString("Shadow"));
 
-        this._sections.text = new WebInspector.DetailsSection("text", WebInspector.UIString("Text"), [this._groups.textStyle.section, this._groups.font.section, this._groups.fontVariants.section, this._groups.textSpacing.section, this._groups.textShadow.section]);
+        this._sections.text = new WebInspector.DetailsSection("text", WebInspector.UIString("Text"), [this._groups.content.section, this._groups.textStyle.section, this._groups.font.section, this._groups.fontVariants.section, this._groups.textSpacing.section, this._groups.textShadow.section]);
         this.element.appendChild(this._sections.text.element);
 
         // Background Section
@@ -187,6 +188,10 @@
                     section.collapsed = false;
             }
         }
+
+        let hasMatchedElementPseudoSelector = this._currentStyle.ownerRule && this._currentStyle.ownerRule.hasMatchedPseudoElementSelector();
+        this._groups.content.section.element.classList.toggle("inactive", !hasMatchedElementPseudoSelector);
+        this._groups.listStyle.section.element.classList.toggle("inactive", hasMatchedElementPseudoSelector);
     }
 
     _updateProperties(group, forceStyleUpdate)
@@ -653,6 +658,21 @@
         properties.alignSelf.addDependency("display", allowedDisplayValues);
     }
 
+    _populateContentSection()
+    {
+        let group = this._groups.content;
+        let properties = group.properties;
+
+        let contentRow = new WebInspector.DetailsSectionRow;
+
+        properties.content = new WebInspector.VisualStyleBasicInput("content", null, WebInspector.UIString("Enter value"));
+
+        contentRow.element.appendChild(properties.content.element);
+
+        let contentGroup = new WebInspector.DetailsSectionGroup([contentRow]);
+        this._populateSection(group, [contentGroup]);
+    }
+
     _populateTextStyleSection()
     {
         let group = this._groups.textStyle;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js (204756 => 204757)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js	2016-08-23 05:12:51 UTC (rev 204756)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js	2016-08-23 05:34:42 UTC (rev 204757)
@@ -207,7 +207,7 @@
     currentStyle()
     {
         if (!this._nodeStyles || !this._selectors.selectedTreeElement)
-            return;
+            return null;
 
         return this._selectors.selectedTreeElement.representedObject;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to