Title: [204758] trunk/Source/WebInspectorUI
Revision
204758
Author
[email protected]
Date
2016-08-22 22:56:45 -0700 (Mon, 22 Aug 2016)

Log Message

Web Inspector: Visual styles sidebar should do something sane for SVG elements
https://bugs.webkit.org/show_bug.cgi?id=148269

Patch by Devin Rousso <[email protected]> on 2016-08-22
Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.get ownerSVGElement):
(WebInspector.DOMNode.prototype.isSVGElement):
Climbs ancestor tree to determine if node is an SVG node.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
(WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDimensionsSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateFillSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateStrokeSection):

* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container.inactive):
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):

* UserInterface/Views/VisualStyleRelativeNumberSlider.css:
(.visual-style-property-container.number-input-box.relative-number-slider > .relative-slider):

* UserInterface/Views/VisualStyleUnitSlider.css:
(.visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider):
(.visual-style-property-container.unit-slider.opacity > .visual-style-property-value-container > .slider): Deleted.

Modified Paths

Diff

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


--- trunk/Source/WebInspectorUI/ChangeLog	2016-08-23 05:34:42 UTC (rev 204757)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-08-23 05:56:45 UTC (rev 204758)
@@ -1,5 +1,39 @@
 2016-08-22  Devin Rousso  <[email protected]>
 
+        Web Inspector: Visual styles sidebar should do something sane for SVG elements
+        https://bugs.webkit.org/show_bug.cgi?id=148269
+
+        Reviewed by Joseph Pecoraro.
+
+        * Localizations/en.lproj/localizedStrings.js:
+
+        * UserInterface/Models/DOMNode.js:
+        (WebInspector.DOMNode.prototype.get ownerSVGElement):
+        (WebInspector.DOMNode.prototype.isSVGElement):
+        Climbs ancestor tree to determine if node is an SVG node.
+
+        * UserInterface/Views/VisualStyleDetailsPanel.js:
+        (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
+        (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateDimensionsSection):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateFillSection):
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateStrokeSection):
+
+        * UserInterface/Views/VisualStylePropertyEditor.css:
+        (.visual-style-property-container.inactive):
+        (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):
+
+        * UserInterface/Views/VisualStyleRelativeNumberSlider.css:
+        (.visual-style-property-container.number-input-box.relative-number-slider > .relative-slider):
+
+        * UserInterface/Views/VisualStyleUnitSlider.css:
+        (.visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider):
+        (.visual-style-property-container.unit-slider.opacity > .visual-style-property-value-container > .slider): Deleted.
+
+2016-08-22  Devin Rousso  <[email protected]>
+
         Web Inspector: Visual Styles: "Text -> Content" section should only be visible for pseudo-element
         https://bugs.webkit.org/show_bug.cgi?id=158272
 

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


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-08-23 05:34:42 UTC (rev 204757)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2016-08-23 05:56:45 UTC (rev 204758)
@@ -122,10 +122,13 @@
 localizedStrings["Calls"] = "Calls";
 localizedStrings["Cancel Automatic Continue"] = "Cancel Automatic Continue";
 localizedStrings["Cancel comparison"] = "Cancel comparison";
+localizedStrings["Cap"] = "Cap";
 localizedStrings["Caps"] = "Caps";
 localizedStrings["Capturing"] = "Capturing";
 localizedStrings["Catch Variables"] = "Catch Variables";
 localizedStrings["Categories"] = "Categories";
+localizedStrings["Center X"] = "Center X";
+localizedStrings["Center Y"] = "Center Y";
 localizedStrings["Character Data"] = "Character Data";
 localizedStrings["Charge  %s  to Callers"] = "Charge  %s  to Callers";
 localizedStrings["Checked"] = "Checked";
@@ -207,6 +210,7 @@
 localizedStrings["Cursor"] = "Cursor";
 localizedStrings["Custom"] = "Custom";
 localizedStrings["DOM Content Loaded \u2014 %s"] = "DOM Content Loaded \u2014 %s";
+localizedStrings["Dash Array"] = "Dash Array";
 localizedStrings["Data"] = "Data";
 localizedStrings["Data returned from the database is too large."] = "Data returned from the database is too large.";
 localizedStrings["Database no longer has expected version."] = "Database no longer has expected version.";
@@ -300,6 +304,7 @@
 localizedStrings["Enter a Gradient"] = "Enter a Gradient";
 localizedStrings["Enter a URL"] = "Enter a URL";
 localizedStrings["Enter a name."] = "Enter a name.";
+localizedStrings["Enter an array value"] = "Enter an array value";
 localizedStrings["Enter the name of a Keyframe"] = "Enter the name of a Keyframe";
 localizedStrings["Enter value"] = "Enter value";
 localizedStrings["Entire Recording"] = "Entire Recording";
@@ -409,6 +414,7 @@
 localizedStrings["_javascript_"] = "_javascript_";
 localizedStrings["_javascript_ & Events"] = "_javascript_ & Events";
 localizedStrings["_javascript_ Allocations"] = "_javascript_ Allocations";
+localizedStrings["Join"] = "Join";
 localizedStrings["Jump to Definition"] = "Jump to Definition";
 localizedStrings["Keep Log on Navigation"] = "Keep Log on Navigation";
 localizedStrings["Key"] = "Key";
@@ -461,6 +467,7 @@
 localizedStrings["Microtask Dispatched"] = "Microtask Dispatched";
 localizedStrings["Min"] = "Min";
 localizedStrings["Missing Dependencies:%s"] = "Missing Dependencies:%s";
+localizedStrings["Miter"] = "Miter";
 localizedStrings["Mixed"] = "Mixed";
 localizedStrings["Module Code"] = "Module Code";
 localizedStrings["Name"] = "Name";
@@ -556,6 +563,8 @@
 localizedStrings["Query returned no results."] = "Query returned no results.";
 localizedStrings["Radial Gradient"] = "Radial Gradient";
 localizedStrings["Radius"] = "Radius";
+localizedStrings["Radius X"] = "Radius X";
+localizedStrings["Radius Y"] = "Radius Y";
 localizedStrings["Range Issue"] = "Range Issue";
 localizedStrings["Readonly"] = "Readonly";
 localizedStrings["Reasons for compositing:"] = "Reasons for compositing:";
@@ -595,6 +604,7 @@
 localizedStrings["Reveal in Original Resource"] = "Reveal in Original Resource";
 localizedStrings["Right"] = "Right";
 localizedStrings["Role"] = "Role";
+localizedStrings["Rule"] = "Rule";
 localizedStrings["Samples"] = "Samples";
 localizedStrings["Save configuration"] = "Save configuration";
 localizedStrings["Scheme"] = "Scheme";
@@ -680,6 +690,7 @@
 localizedStrings["Stop recording (%s)"] = "Stop recording (%s)";
 localizedStrings["Stop recording."] = "Stop recording.";
 localizedStrings["Storage"] = "Storage";
+localizedStrings["Stroke"] = "Stroke";
 localizedStrings["Style"] = "Style";
 localizedStrings["Style Attribute"] = "Style Attribute";
 localizedStrings["Style Rules"] = "Style Rules";
@@ -763,8 +774,14 @@
 localizedStrings["Word"] = "Word";
 localizedStrings["Working Copy"] = "Working Copy";
 localizedStrings["Wrap"] = "Wrap";
+localizedStrings["X"] = "X";
+localizedStrings["X1"] = "X1";
+localizedStrings["X2"] = "X2";
 localizedStrings["XHR"] = "XHR";
 localizedStrings["XHRs"] = "XHRs";
+localizedStrings["Y"] = "Y";
+localizedStrings["Y1"] = "Y1";
+localizedStrings["Y2"] = "Y2";
 localizedStrings["Yes"] = "Yes";
 localizedStrings["Z-Index"] = "Z-Index";
 localizedStrings["key"] = "key";

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js (204757 => 204758)


--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js	2016-08-23 05:34:42 UTC (rev 204757)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js	2016-08-23 05:56:45 UTC (rev 204758)
@@ -568,6 +568,22 @@
         return descendant !== null && descendant.isAncestor(this);
     }
 
+    get ownerSVGElement()
+    {
+        if (this._nodeName === "svg")
+            return this;
+
+        if (!this.parentNode)
+            return null;
+
+        return this.parentNode.ownerSVGElement;
+    }
+
+    isSVGElement()
+    {
+        return !!this.ownerSVGElement;
+    }
+
     _setAttributesPayload(attrs)
     {
         this._attributes = [];

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


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2016-08-23 05:34:42 UTC (rev 204757)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js	2016-08-23 05:56:45 UTC (rev 204758)
@@ -102,6 +102,8 @@
         this.element.appendChild(this._sections.text.element);
 
         // Background Section
+        this._generateSection("fill", WebInspector.UIString("Fill"));
+        this._generateSection("stroke", WebInspector.UIString("Stroke"));
         this._generateSection("background-style", WebInspector.UIString("Style"));
         this._generateSection("border", WebInspector.UIString("Border"));
         this._generateSection("outline", WebInspector.UIString("Outline"));
@@ -108,7 +110,7 @@
         this._generateSection("box-shadow", WebInspector.UIString("Box Shadow"));
         this._generateSection("list-style", WebInspector.UIString("List Styles"));
 
-        this._sections.background = "" WebInspector.DetailsSection("background", WebInspector.UIString("Background"), [this._groups.backgroundStyle.section, this._groups.border.section, this._groups.outline.section, this._groups.boxShadow.section, this._groups.listStyle.section]);
+        this._sections.background = "" WebInspector.DetailsSection("background", WebInspector.UIString("Background"), [this._groups.fill.section, this._groups.stroke.section, this._groups.backgroundStyle.section, this._groups.border.section, this._groups.outline.section, this._groups.boxShadow.section, this._groups.listStyle.section]);
         this.element.appendChild(this._sections.background.element);
 
         // Effects Section
@@ -192,6 +194,57 @@
         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);
+
+        let node = this._nodeStyles.node;
+        let isSVGElement = node.isSVGElement();
+
+        this._groups.float.section.element.classList.toggle("inactive", isSVGElement);
+        this._groups.border.section.element.classList.toggle("inactive", isSVGElement);
+        this._groups.boxShadow.section.element.classList.toggle("inactive", isSVGElement);
+        this._groups.listStyle.section.element.classList.toggle("inactive", isSVGElement);
+
+        this._groups.fill.section.element.classList.toggle("inactive", !isSVGElement);
+        this._groups.stroke.section.element.classList.toggle("inactive", !isSVGElement);
+
+        let isSVGCircle = node.nodeName() === "circle";
+        let isSVGEllipse = node.nodeName() === "ellipse";
+        let isSVGRadialGradient = node.nodeName() === "radialGradient";
+        let isSVGRect = node.nodeName() === "rect";
+        let isSVGLine = node.nodeName() === "line";
+        let isSVGLinearGradient = node.nodeName() === "linearGradient";
+
+        // Only show the dimensions section if the current element is not an SVG element or is <ellipse>, <rect>, <circle>, or <radialGradient>.
+        this._groups.dimensions.section.element.classList.toggle("inactive", !(!isSVGElement || isSVGEllipse || isSVGRect || isSVGCircle || isSVGRadialGradient));
+
+        // Only show the non-SVG dimensions group if the current element is not an SVG element or is <rect>.
+        this._groups.dimensions.defaultGroup.element.classList.toggle("inactive", !(!isSVGElement || isSVGRect));
+
+        // Only show the SVG dimensions group if the current element is an SVG element, <rect>, <circle>, or <radialGradient>.
+        this._groups.dimensions.svgGroup.element.classList.toggle("inactive", !(isSVGEllipse || isSVGRect || isSVGCircle || isSVGRadialGradient));
+
+        // Only show editor for "r" if the current element is <circle> or <radialGradient>.
+        this._groups.dimensions.properties.r.element.classList.toggle("inactive", !(isSVGCircle || isSVGRadialGradient));
+
+        // Only show editors for "rx" and "ry" if the current element is <ellipse> or <rect>.
+        this._groups.dimensions.properties.rx.element.classList.toggle("inactive", !(isSVGEllipse || isSVGRect));
+        this._groups.dimensions.properties.ry.element.classList.toggle("inactive", !(isSVGEllipse || isSVGRect));
+
+        // Only show the SVG position group if the current element is <rect>, <circle>, <ellipse>, <line>, <radialGradient>, or <linearGradient>.
+        this._groups.position.svgGroup.element.classList.toggle("inactive", !(isSVGRect || isSVGCircle || isSVGEllipse || isSVGLine || isSVGRadialGradient || isSVGLinearGradient));
+
+        // Only show editors for "x" and "y" if the current element is <rect>.
+        this._groups.position.properties.x.element.classList.toggle("inactive", !isSVGRect);
+        this._groups.position.properties.y.element.classList.toggle("inactive", !isSVGRect);
+
+        // Only show editors for "x1", "y1", "x2", and "y2" if the current element is <line> or <linearGradient>.
+        this._groups.position.properties.x1.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
+        this._groups.position.properties.y1.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
+        this._groups.position.properties.x2.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
+        this._groups.position.properties.y2.element.classList.toggle("inactive", !(isSVGLine || isSVGLinearGradient));
+
+        // Only show editors for "cx" and "cy" if the current element is <circle>, <ellipse>, or <radialGradient>.
+        this._groups.position.properties.cx.element.classList.toggle("inactive", !(isSVGCircle || isSVGEllipse || isSVGRadialGradient));
+        this._groups.position.properties.cy.element.classList.toggle("inactive", !(isSVGCircle || isSVGEllipse || isSVGRadialGradient));
     }
 
     _updateProperties(group, forceStyleUpdate)
@@ -459,11 +512,46 @@
         positionType.element.appendChild(properties.zIndex.element);
         positionType.element.classList.add("visual-style-separated-row");
 
-        rows.unshift(positionType)
+        rows.unshift(positionType);
 
-        let positionGroup = new WebInspector.DetailsSectionGroup(rows);
-        this._populateSection(group, [positionGroup]);
+        group.defaultGroup = new WebInspector.DetailsSectionGroup(rows);
 
+        let xyRow = new WebInspector.DetailsSectionRow;
+
+        properties.x = new WebInspector.VisualStyleNumberInputBox("x", WebInspector.UIString("X"), this._keywords.boxModel, this._units.defaults, true);
+        properties.y = new WebInspector.VisualStyleNumberInputBox("y", WebInspector.UIString("Y"), this._keywords.boxModel, this._units.defaults, true);
+
+        xyRow.element.appendChild(properties.x.element);
+        xyRow.element.appendChild(properties.y.element);
+
+        let x1y1Row = new WebInspector.DetailsSectionRow;
+
+        properties.x1 = new WebInspector.VisualStyleNumberInputBox("x1", WebInspector.UIString("X1"), this._keywords.boxModel, this._units.defaults, true);
+        properties.y1 = new WebInspector.VisualStyleNumberInputBox("y1", WebInspector.UIString("Y1"), this._keywords.boxModel, this._units.defaults, true);
+
+        x1y1Row.element.appendChild(properties.x1.element);
+        x1y1Row.element.appendChild(properties.y1.element);
+
+        let x2y2Row = new WebInspector.DetailsSectionRow;
+
+        properties.x2 = new WebInspector.VisualStyleNumberInputBox("x2", WebInspector.UIString("X2"), this._keywords.boxModel, this._units.defaults, true);
+        properties.y2 = new WebInspector.VisualStyleNumberInputBox("y2", WebInspector.UIString("Y2"), this._keywords.boxModel, this._units.defaults, true);
+
+        x2y2Row.element.appendChild(properties.x2.element);
+        x2y2Row.element.appendChild(properties.y2.element);
+
+        let cxcyRow = new WebInspector.DetailsSectionRow;
+
+        properties.cx = new WebInspector.VisualStyleNumberInputBox("cx", WebInspector.UIString("Center X"), this._keywords.boxModel, this._units.defaults, true);
+        properties.cy = new WebInspector.VisualStyleNumberInputBox("cy", WebInspector.UIString("Center Y"), this._keywords.boxModel, this._units.defaults, true);
+
+        cxcyRow.element.appendChild(properties.cx.element);
+        cxcyRow.element.appendChild(properties.cy.element);
+
+        group.svgGroup = new WebInspector.DetailsSectionGroup([xyRow, x1y1Row, x2y2Row, cxcyRow]);
+
+        this._populateSection(group, [group.defaultGroup, group.svgGroup]);
+
         let allowedPositionValues = ["relative", "absolute", "fixed", "-webkit-sticky"];
         properties.zIndex.addDependency("position", allowedPositionValues);
         properties.top.addDependency("position", allowedPositionValues);
@@ -556,8 +644,29 @@
         this._addMetricsMouseListeners(group.properties.maxWidth, highlightMode);
         this._addMetricsMouseListeners(group.properties.maxHeight, highlightMode);
 
-        let dimensionsGroup = new WebInspector.DetailsSectionGroup([dimensionsTabController, dimensionsRegularGroup, dimensionsMinGroup, dimensionsMaxGroup]);
-        this._populateSection(group, [dimensionsGroup]);
+        group.defaultGroup = new WebInspector.DetailsSectionGroup([dimensionsTabController, dimensionsRegularGroup, dimensionsMinGroup, dimensionsMaxGroup]);
+
+        let rRow = new WebInspector.DetailsSectionRow;
+
+        properties.r = new WebInspector.VisualStyleRelativeNumberSlider("r", WebInspector.UIString("Radius"), this._keywords.boxModel, this._units.defaults);
+
+        rRow.element.appendChild(properties.r.element);
+
+        let rxRow = new WebInspector.DetailsSectionRow;
+
+        properties.rx = new WebInspector.VisualStyleRelativeNumberSlider("rx", WebInspector.UIString("Radius X"), this._keywords.boxModel, this._units.defaults);
+
+        rxRow.element.appendChild(properties.rx.element);
+
+        let ryRow = new WebInspector.DetailsSectionRow;
+
+        properties.ry = new WebInspector.VisualStyleRelativeNumberSlider("ry", WebInspector.UIString("Radius Y"), this._keywords.boxModel, this._units.defaults);
+
+        ryRow.element.appendChild(properties.ry.element);
+
+        group.svgGroup = new WebInspector.DetailsSectionGroup([rRow, rxRow, ryRow]);
+
+        this._populateSection(group, [group.defaultGroup, group.svgGroup]);
     }
 
     _populateMarginSection()
@@ -847,6 +956,78 @@
         this._populateSection(group, [textShadowGroup]);
     }
 
+    _populateFillSection()
+    {
+        let group = this._groups.fill;
+        let properties = group.properties;
+
+        let fillRow = new WebInspector.DetailsSectionRow;
+
+        properties.fill = new WebInspector.VisualStyleColorPicker("fill", WebInspector.UIString("Color"));
+        properties.fillRule = new WebInspector.VisualStyleKeywordPicker("fill-rule", WebInspector.UIString("Rule"), this._keywords.defaults.concat(["Nonzero", "Evenodd"]));
+
+        fillRow.element.appendChild(properties.fill.element);
+        fillRow.element.appendChild(properties.fillRule.element);
+
+        let fillOpacityRow = new WebInspector.DetailsSectionRow;
+
+        properties.fillOpacity = new WebInspector.VisualStyleUnitSlider("fill-opacity", WebInspector.UIString("Opacity"));
+
+        fillOpacityRow.element.appendChild(properties.fillOpacity.element);
+
+        group.specifiedWidthProperties = [properties.fillOpacity];
+
+        let fillGroup = new WebInspector.DetailsSectionGroup([fillRow, fillOpacityRow]);
+        this._populateSection(group, [fillGroup]);
+    }
+
+    _populateStrokeSection()
+    {
+        let group = this._groups.stroke;
+        let properties = group.properties;
+
+        let strokeRow = new WebInspector.DetailsSectionRow;
+
+        properties.stroke = new WebInspector.VisualStyleColorPicker("stroke", WebInspector.UIString("Color"));
+        properties.strokeWidth = new WebInspector.VisualStyleNumberInputBox("stroke-width", WebInspector.UIString("Width"), this._keywords.defaults, this._units.defaults);
+
+        strokeRow.element.appendChild(properties.stroke.element);
+        strokeRow.element.appendChild(properties.strokeWidth.element);
+
+        let strokeOpacity = new WebInspector.DetailsSectionRow;
+
+        properties.strokeOpacity = new WebInspector.VisualStyleUnitSlider("stroke-opacity", WebInspector.UIString("Opacity"));
+
+        strokeOpacity.element.appendChild(properties.strokeOpacity.element);
+
+        let strokeDasharrayRow = new WebInspector.DetailsSectionRow;
+
+        properties.strokeDasharray = new WebInspector.VisualStyleBasicInput("stroke-dasharray", WebInspector.UIString("Dash Array"), WebInspector.UIString("Enter an array value"));
+
+        strokeDasharrayRow.element.appendChild(properties.strokeDasharray.element);
+
+        let strokeDasharrayOptionsRow = new WebInspector.DetailsSectionRow;
+
+        properties.strokeDashoffset = new WebInspector.VisualStyleNumberInputBox("stroke-dashoffset", WebInspector.UIString("Offset"), this._keywords.defaults, this._units.defaults);
+        properties.strokeMiterlimit = new WebInspector.VisualStyleNumberInputBox("stroke-miterlimit", WebInspector.UIString("Miter"), this._keywords.defaults);
+
+        strokeDasharrayOptionsRow.element.appendChild(properties.strokeDashoffset.element);
+        strokeDasharrayOptionsRow.element.appendChild(properties.strokeMiterlimit.element);
+
+        let strokeLineOptionsRow = new WebInspector.DetailsSectionRow;
+
+        properties.strokeLinecap = new WebInspector.VisualStyleKeywordPicker("stroke-linecap", WebInspector.UIString("Cap"), this._keywords.defaults.concat(["Butt", "Round", "Square"]));
+        properties.strokeLinejoin = new WebInspector.VisualStyleKeywordPicker("stroke-linejoin", WebInspector.UIString("Join"), this._keywords.defaults.concat(["Miter", "Round", "Bevel"]));
+
+        strokeLineOptionsRow.element.appendChild(properties.strokeLinecap.element);
+        strokeLineOptionsRow.element.appendChild(properties.strokeLinejoin.element);
+
+        group.specifiedWidthProperties = [properties.strokeOpacity];
+
+        let strokeGroup = new WebInspector.DetailsSectionGroup([strokeRow, strokeOpacity, strokeDasharrayRow, strokeDasharrayOptionsRow, strokeLineOptionsRow]);
+        this._populateSection(group, [strokeGroup]);
+    }
+
     _populateBackgroundStyleSection()
     {
         let group = this._groups.backgroundStyle;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css (204757 => 204758)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css	2016-08-23 05:34:42 UTC (rev 204757)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css	2016-08-23 05:56:45 UTC (rev 204758)
@@ -32,6 +32,10 @@
     flex-grow: 1;
 }
 
+.visual-style-property-container.inactive {
+    display: none;
+}
+
 .visual-style-property-container > .visual-style-property-title {
     margin: 4px;
     text-align: right;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleRelativeNumberSlider.css (204757 => 204758)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleRelativeNumberSlider.css	2016-08-23 05:34:42 UTC (rev 204757)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleRelativeNumberSlider.css	2016-08-23 05:56:45 UTC (rev 204758)
@@ -43,5 +43,6 @@
 
 .visual-style-property-container.number-input-box.relative-number-slider > .relative-slider {
     width: 47%;
+    margin-top: 0;
     margin-right: 7px;
 }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleUnitSlider.css (204757 => 204758)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleUnitSlider.css	2016-08-23 05:34:42 UTC (rev 204757)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleUnitSlider.css	2016-08-23 05:56:45 UTC (rev 204758)
@@ -26,12 +26,9 @@
 .visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider {
     position: relative;
     margin: 5px 1px 0;
+    background-image: linear-gradient(90deg, transparent, black), url(../Images/Checkers.svg);
 }
 
 .visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider > img {
     top: -1px;
 }
-
-.visual-style-property-container.unit-slider.opacity > .visual-style-property-value-container > .slider {
-    background-image: linear-gradient(90deg, hsla(0, 0%, 0%, 0), #000), url(../Images/Checkers.svg);
-}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to