<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[194728] trunk/Source/WebInspectorUI</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/194728">194728</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-07 14:36:51 -0800 (Thu, 07 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Add border-image properties to Visual sidebar
https://bugs.webkit.org/show_bug.cgi?id=152755

Patch by Devin Rousso &lt;dcrousso+webkit@gmail.com&gt; on 2016-01-07
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Switched the order of VisualStyleURLInput and VisualStyleUnitSlider
to be ordered alphabetically.

* UserInterface/Views/VisualStyleBackgroundPicker.js:
(WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):

* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar &gt; .panel.details.css-style .visual &gt; .details-section .details-section &gt; .content &gt; .group + .group &gt; .row:first-child):
(.sidebar &gt; .panel.details.css-style .visual &gt; .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice):
Since the checkbox is so small, give it less room.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection.generateBorderImagePropertyEditors):
The three properties &quot;border-image-width&quot;, &quot;border-image-outset&quot;, and
&quot;border-image-slice&quot; all have the same syntax, so one function to generate
the layout for all three is much simpler.

(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
Added the border image properties to a seperate group under Background &gt; Border.

* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype._keywordSelectMouseDown):

* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.set units):
Reordered logic to allow a value of &quot;&quot;/null to set the units to the &quot;Number&quot;
value if it is allowed for that editor.

(WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
Instead of relying upon whether the editor has any units, just check to see if
the selected units are &quot;Number&quot; and, if not, add them to the value.

(WebInspector.VisualStyleNumberInputBox.prototype._unitsElementTextContent):

* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner):
Now has another argument that, when true, assumes the combiner has at least 4
numerical values and is of the form (can have units):
    property-name: value1 [value2 [value3 [value4 [...]]]];

(WebInspector.VisualStylePropertyCombiner.prototype.get synthesizedValue):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
If the new argument is true, assigns the existing values in the following way:
 - If there is 1 value, assign it to all of the editors.
 - If there are 2 values, assign the 1st one to editors 1 and 3 and the 2nd one
    to editors 2 and 4.
 - If there are 3 values, assign the 1st one to editor 1, the 2nd one to editors
    2 and 4, and the 3rd one to editor 3.
 - If there are 4 or more values, assign them normally.

* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedKeyword):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedKeyword):
Removed call to this.value to prevent recursion from VisualStyleNumberInputBox.

(WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedUnit):
(WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedUnit):
Removed call to this.units to prevent recursion from VisualStyleNumberInputBox.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleBackgroundPickerjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleBackgroundPicker.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleDetailsPanelcss">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleDetailsPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleKeywordPickerjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleNumberInputBoxjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStylePropertyCombinerjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStylePropertyEditorjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -1,5 +1,76 @@
</span><span class="cx"> 2016-01-07  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Add border-image properties to Visual sidebar
+        https://bugs.webkit.org/show_bug.cgi?id=152755
+
+        Reviewed by Timothy Hatcher.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Main.html:
+        Switched the order of VisualStyleURLInput and VisualStyleUnitSlider
+        to be ordered alphabetically.
+
+        * UserInterface/Views/VisualStyleBackgroundPicker.js:
+        (WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):
+
+        * UserInterface/Views/VisualStyleDetailsPanel.css:
+        (.sidebar &gt; .panel.details.css-style .visual &gt; .details-section .details-section &gt; .content &gt; .group + .group &gt; .row:first-child):
+        (.sidebar &gt; .panel.details.css-style .visual &gt; .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice):
+        Since the checkbox is so small, give it less room.
+
+        * UserInterface/Views/VisualStyleDetailsPanel.js:
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection.generateBorderImagePropertyEditors):
+        The three properties &quot;border-image-width&quot;, &quot;border-image-outset&quot;, and
+        &quot;border-image-slice&quot; all have the same syntax, so one function to generate
+        the layout for all three is much simpler.
+
+        (WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
+        Added the border image properties to a seperate group under Background &gt; Border.
+
+        * UserInterface/Views/VisualStyleKeywordPicker.js:
+        (WebInspector.VisualStyleKeywordPicker.prototype._keywordSelectMouseDown):
+
+        * UserInterface/Views/VisualStyleNumberInputBox.js:
+        (WebInspector.VisualStyleNumberInputBox):
+        (WebInspector.VisualStyleNumberInputBox.prototype.set units):
+        Reordered logic to allow a value of &quot;&quot;/null to set the units to the &quot;Number&quot;
+        value if it is allowed for that editor.
+
+        (WebInspector.VisualStyleNumberInputBox.prototype.get synthesizedValue):
+        Instead of relying upon whether the editor has any units, just check to see if
+        the selected units are &quot;Number&quot; and, if not, add them to the value.
+
+        (WebInspector.VisualStyleNumberInputBox.prototype._unitsElementTextContent):
+
+        * UserInterface/Views/VisualStylePropertyCombiner.js:
+        (WebInspector.VisualStylePropertyCombiner):
+        Now has another argument that, when true, assumes the combiner has at least 4
+        numerical values and is of the form (can have units):
+            property-name: value1 [value2 [value3 [value4 [...]]]];
+
+        (WebInspector.VisualStylePropertyCombiner.prototype.get synthesizedValue):
+        (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateEditor):
+        (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
+        (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
+        If the new argument is true, assigns the existing values in the following way:
+         - If there is 1 value, assign it to all of the editors.
+         - If there are 2 values, assign the 1st one to editors 1 and 3 and the 2nd one
+            to editors 2 and 4.
+         - If there are 3 values, assign the 1st one to editor 1, the 2nd one to editors
+            2 and 4, and the 3rd one to editor 3.
+         - If there are 4 or more values, assign them normally.
+
+        * UserInterface/Views/VisualStylePropertyEditor.js:
+        (WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedKeyword):
+        (WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedKeyword):
+        Removed call to this.value to prevent recursion from VisualStyleNumberInputBox.
+
+        (WebInspector.VisualStylePropertyEditor.prototype.valueIsSupportedUnit):
+        (WebInspector.VisualStylePropertyEditor.prototype._valueIsSupportedAdvancedUnit):
+        Removed call to this.units to prevent recursion from VisualStyleNumberInputBox.
+
+2016-01-07  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
+
</ins><span class="cx">         Web Inspector: Add indicator that element has pseudo-class in DOM tree
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=152680
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -287,6 +287,7 @@
</span><span class="cx"> localizedStrings[&quot;Extra Scripts&quot;] = &quot;Extra Scripts&quot;;
</span><span class="cx"> localizedStrings[&quot;Family&quot;] = &quot;Family&quot;;
</span><span class="cx"> localizedStrings[&quot;Filename&quot;] = &quot;Filename&quot;;
</span><ins>+localizedStrings[&quot;Fill&quot;] = &quot;Fill&quot;;
</ins><span class="cx"> localizedStrings[&quot;Fill Mode&quot;] = &quot;Fill Mode&quot;;
</span><span class="cx"> localizedStrings[&quot;Filter %s&quot;] = &quot;Filter %s&quot;;
</span><span class="cx"> localizedStrings[&quot;Filter Breakpoint List&quot;] = &quot;Filter Breakpoint List&quot;;
</span><span class="lines">@@ -467,6 +468,7 @@
</span><span class="cx"> localizedStrings[&quot;Other Issue&quot;] = &quot;Other Issue&quot;;
</span><span class="cx"> localizedStrings[&quot;Outline&quot;] = &quot;Outline&quot;;
</span><span class="cx"> localizedStrings[&quot;Output: &quot;] = &quot;Output: &quot;;
</span><ins>+localizedStrings[&quot;Outset&quot;] = &quot;Outset&quot;;
</ins><span class="cx"> localizedStrings[&quot;Over 1 ms&quot;] = &quot;Over 1 ms&quot;;
</span><span class="cx"> localizedStrings[&quot;Over 15 ms&quot;] = &quot;Over 15 ms&quot;;
</span><span class="cx"> localizedStrings[&quot;Overflow&quot;] = &quot;Overflow&quot;;
</span><span class="lines">@@ -586,6 +588,7 @@
</span><span class="cx"> localizedStrings[&quot;Shrink&quot;] = &quot;Shrink&quot;;
</span><span class="cx"> localizedStrings[&quot;Size&quot;] = &quot;Size&quot;;
</span><span class="cx"> localizedStrings[&quot;Sizing&quot;] = &quot;Sizing&quot;;
</span><ins>+localizedStrings[&quot;Slice&quot;] = &quot;Slice&quot;;
</ins><span class="cx"> localizedStrings[&quot;Small Icons&quot;] = &quot;Small Icons&quot;;
</span><span class="cx"> localizedStrings[&quot;Socket&quot;] = &quot;Socket&quot;;
</span><span class="cx"> localizedStrings[&quot;Sockets&quot;] = &quot;Sockets&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -601,8 +601,8 @@
</span><span class="cx">     &lt;script src=&quot;Views/VisualStyleSelectorTreeItem.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/VisualStyleTabbedPropertiesRow.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/VisualStyleTimingEditor.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Views/VisualStyleURLInput.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/VisualStyleUnitSlider.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;Views/VisualStyleURLInput.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> 
</span><span class="cx">     &lt;script src=&quot;Controllers/Annotator.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Controllers/CodeMirrorEditingController.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleBackgroundPickerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleBackgroundPicker.js (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleBackgroundPicker.js        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleBackgroundPicker.js        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">     {
</span><span class="cx">         if (event.altKey)
</span><span class="cx">             this._addAdvancedValues();
</span><del>-        else if (!this._valueIsSupportedAdvancedKeyword())
</del><ins>+        else if (!this._valueIsSupportedAdvancedKeyword(this.value))
</ins><span class="cx">             this._removeAdvancedValues();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleDetailsPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -64,6 +64,11 @@
</span><span class="cx">     display: flex;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.sidebar &gt; .panel.details.css-style .visual &gt; .details-section .details-section &gt; .content &gt; .group + .group &gt; .row:first-child {
+    padding-top: 7px;
+    border-top: none;
+}
+
</ins><span class="cx"> .sidebar &gt; .panel.details.css-style .visual &gt; .details-section .details-section &gt; .content .group &gt; .row:last-child {
</span><span class="cx">     padding-bottom: 3px;
</span><span class="cx"> }
</span><span class="lines">@@ -97,6 +102,11 @@
</span><span class="cx">     pointer-events: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.sidebar &gt; .panel.details.css-style .visual &gt; .details-section .details-section &gt; .content .group &gt; .row + .row.visual-style-tabbed-properties-row,
</ins><span class="cx"> .sidebar &gt; .panel.details.css-style .visual &gt; .details-section.background .details-section.background-style .visual-style-property-container.comma-separated-keyword-editor.background {
</span><span class="cx">     margin-top: 3px;
</span><span class="cx"> }
</span><ins>+
+.sidebar &gt; .panel.details.css-style .visual &gt; .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice {
+    flex: 1;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleDetailsPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -962,10 +962,74 @@
</span><span class="cx">         this._addMetricsMouseListeners(group.properties.borderLeftWidth, highlightMode);
</span><span class="cx">         this._addMetricsMouseListeners(group.properties.borderRightWidth, highlightMode);
</span><span class="cx"> 
</span><ins>+        let borderGroup = new WebInspector.DetailsSectionGroup([borderTabController, borderAllGroup, borderTopGroup, borderRightGroup, borderBottomGroup, borderLeftGroup]);
+
+        let borderImageSourceRow = new WebInspector.DetailsSectionRow;
+
+        properties.borderImageSource = new WebInspector.VisualStyleURLInput(&quot;border-image-source&quot;, WebInspector.UIString(&quot;Image&quot;), this._keywords.defaults.concat([&quot;None&quot;]));
+
+        borderImageSourceRow.element.appendChild(properties.borderImageSource.element);
+
+        let borderImageRepeatRow = new WebInspector.DetailsSectionRow;
+
+        let borderImageSliceFill = new WebInspector.VisualStyleKeywordCheckbox(&quot;border-image-slice&quot;, WebInspector.UIString(&quot;Fill&quot;), &quot;Fill&quot;);
+        borderImageSliceFill.optionalProperty = true;
+        properties.borderImageRepeat = new WebInspector.VisualStyleKeywordPicker(&quot;border-image-repeat&quot;, WebInspector.UIString(&quot;Repeat&quot;), this._keywords.defaults.concat([&quot;Stretch&quot;, &quot;Repeat&quot;, &quot;Round&quot;, &quot;Space&quot;]));
+
+        borderImageRepeatRow.element.appendChild(borderImageSliceFill.element);
+        borderImageRepeatRow.element.appendChild(properties.borderImageRepeat.element);
+
+        function generateBorderImagePropertyEditors(propertyName, keywords, units) {
+            let vertical = new WebInspector.DetailsSectionRow;
+
+            let top = new WebInspector.VisualStyleNumberInputBox(propertyName, WebInspector.UIString(&quot;Top&quot;), keywords, units);
+            top.masterProperty = true;
+            let bottom = new WebInspector.VisualStyleNumberInputBox(propertyName, WebInspector.UIString(&quot;Bottom&quot;), keywords, units);
+            bottom.masterProperty = true;
+
+            vertical.element.appendChild(top.element);
+            vertical.element.appendChild(bottom.element);
+
+            let horizontal = new WebInspector.DetailsSectionRow;
+
+            let left = new WebInspector.VisualStyleNumberInputBox(propertyName, WebInspector.UIString(&quot;Left&quot;), keywords, units);
+            left.masterProperty = true;
+            let right = new WebInspector.VisualStyleNumberInputBox(propertyName, WebInspector.UIString(&quot;Right&quot;), keywords, units);
+            right.masterProperty = true;
+
+            horizontal.element.appendChild(left.element);
+            horizontal.element.appendChild(right.element);
+
+            return {group: new WebInspector.DetailsSectionGroup([vertical, horizontal]), properties: [top, bottom, left, right]};
+        }
+
+        let nonKeywordUnits = [WebInspector.UIString(&quot;Number&quot;)];
+
+        let borderImageUnits = this._units.defaults;
+        borderImageUnits.basic = nonKeywordUnits.concat(borderImageUnits.basic);
+        let borderImageWidth = generateBorderImagePropertyEditors(&quot;border-image-width&quot;, this._keywords.boxModel, borderImageUnits);
+        properties.borderImageWidth = new WebInspector.VisualStylePropertyCombiner(&quot;border-image-width&quot;, borderImageWidth.properties, true);
+
+        let borderOutsetUnits = this._units.defaultsSansPercent;
+        borderOutsetUnits.basic = nonKeywordUnits.concat(borderOutsetUnits.basic);
+        let borderImageOutset = generateBorderImagePropertyEditors(&quot;border-image-outset&quot;, this._keywords.defaults, borderOutsetUnits);
+        properties.borderImageOutset = new WebInspector.VisualStylePropertyCombiner(&quot;border-image-outset&quot;, borderImageOutset.properties, true);
+
+        let borderImageSlice = generateBorderImagePropertyEditors(&quot;border-image-slice&quot;, this._keywords.defaults, [&quot;%&quot;].concat(nonKeywordUnits));
+        borderImageSlice.properties.push(borderImageSliceFill);
+        properties.borderImageSlice = new WebInspector.VisualStylePropertyCombiner(&quot;border-image-slice&quot;, borderImageSlice.properties, true);
+
+        let borderImagePropertiesTabController = new WebInspector.VisualStyleTabbedPropertiesRow({
+            &quot;width&quot;: {title: WebInspector.UIString(&quot;Width&quot;), element: borderImageWidth.group.element, properties: [properties.borderImageWidth]},
+            &quot;outset&quot;: {title: WebInspector.UIString(&quot;Outset&quot;), element: borderImageOutset.group.element, properties: [properties.borderImageOutset]},
+            &quot;slice&quot;: {title: WebInspector.UIString(&quot;Slice&quot;), element: borderImageSlice.group.element, properties: [properties.borderImageSlice]}
+        });
+
+        let borderImageGroup = new WebInspector.DetailsSectionGroup([borderImageSourceRow, borderImageRepeatRow, borderImagePropertiesTabController, borderImageWidth.group, borderImageOutset.group, borderImageSlice.group]);
+
</ins><span class="cx">         group.autocompleteCompatibleProperties = [properties.borderColor, properties.borderTopColor, properties.borderBottomColor, properties.borderLeftColor, properties.borderRightColor];
</span><span class="cx"> 
</span><del>-        let borderGroup = new WebInspector.DetailsSectionGroup([borderTabController, borderAllGroup, borderTopGroup, borderRightGroup, borderBottomGroup, borderLeftGroup]);
-        this._populateSection(group, [borderGroup]);
</del><ins>+        this._populateSection(group, [borderGroup, borderImageGroup]);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _populateOutlineSection()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleKeywordPickerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">     {
</span><span class="cx">         if (event.altKey)
</span><span class="cx">             this._addAdvancedValues();
</span><del>-        else if (!this._valueIsSupportedAdvancedKeyword())
</del><ins>+        else if (!this._valueIsSupportedAdvancedKeyword(this.value))
</ins><span class="cx">             this._removeAdvancedValues();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleNumberInputBoxjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleNumberInputBox.js        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -27,9 +27,13 @@
</span><span class="cx"> {
</span><span class="cx">     constructor(propertyNames, text, possibleValues, possibleUnits, allowNegativeValues, layoutReversed)
</span><span class="cx">     {
</span><del>-        super(propertyNames, text, possibleValues, possibleUnits || [WebInspector.UIString(&quot;Number&quot;)], &quot;number-input-box&quot;, layoutReversed);
</del><ins>+        let unitlessNumberUnit = WebInspector.UIString(&quot;Number&quot;);
</ins><span class="cx"> 
</span><del>-        this._hasUnits = !!possibleUnits;
</del><ins>+        super(propertyNames, text, possibleValues, possibleUnits || [unitlessNumberUnit], &quot;number-input-box&quot;, layoutReversed);
+
+        this._unitlessNumberUnit = unitlessNumberUnit;
+
+        this._hasUnits = this._possibleUnits.basic.some((unit) =&gt; unit !== unitlessNumberUnit);
</ins><span class="cx">         this._allowNegativeValues = !!allowNegativeValues || false;
</span><span class="cx"> 
</span><span class="cx">         this.contentElement.classList.toggle(&quot;no-values&quot;, !possibleValues || !possibleValues.length);
</span><span class="lines">@@ -89,8 +93,8 @@
</span><span class="cx">         this.contentElement.classList.add(&quot;number-input-editable&quot;);
</span><span class="cx">         this._valueNumberInputElement.value = null;
</span><span class="cx">         this._valueNumberInputElement.setAttribute(&quot;placeholder&quot;, 0);
</span><del>-        if (this._hasUnits &amp;&amp; this.valueIsSupportedUnit(&quot;px&quot;))
-            this._unitsElementTextContent = this._keywordSelectElement.value = &quot;px&quot;;
</del><ins>+        if (this._hasUnits)
+            this._unitsElementTextContent = this._keywordSelectElement.value = this.valueIsSupportedUnit(&quot;px&quot;) ? &quot;px&quot; : this._possibleUnits.basic[0];
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="lines">@@ -159,20 +163,17 @@
</span><span class="cx"> 
</span><span class="cx">     set units(unit)
</span><span class="cx">     {
</span><del>-        if (this._unchangedOptionElement.selected)
</del><ins>+        if (this._unchangedOptionElement.selected || unit === this.units)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        if (!unit || unit === this.units)
</del><ins>+        if (!unit &amp;&amp; !this._possibleUnits.basic.includes(this._unitlessNumberUnit) &amp;&amp; !this.valueIsSupportedUnit(unit))
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        if (!this.valueIsSupportedUnit(unit))
-            return;
-
</del><span class="cx">         if (this._valueIsSupportedAdvancedUnit(unit))
</span><span class="cx">             this._addAdvancedUnits();
</span><span class="cx"> 
</span><span class="cx">         this._setNumberInputIsEditable(true);
</span><del>-        this._keywordSelectElement.value = unit;
</del><ins>+        this._keywordSelectElement.value = unit || this._unitlessNumberUnit;
</ins><span class="cx">         this._unitsElementTextContent = unit;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -203,7 +204,7 @@
</span><span class="cx">             return null;
</span><span class="cx"> 
</span><span class="cx">         let keyword = this._keywordSelectElement.value;
</span><del>-        return this.valueIsSupportedUnit(keyword) ? value + (this._hasUnits ? keyword : &quot;&quot;) : keyword;
</del><ins>+        return this.valueIsSupportedUnit(keyword) ? value + (keyword === this._unitlessNumberUnit ? &quot;&quot; : keyword) : keyword;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     updateValueFromText(text, value)
</span><span class="lines">@@ -228,7 +229,7 @@
</span><span class="cx">         if (!this._hasUnits)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        this._unitsElement.textContent = text;
</del><ins>+        this._unitsElement.textContent = text === this._unitlessNumberUnit ? &quot;&quot; : text;
</ins><span class="cx">         this._markUnitsContainerIfInputHasValue();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -323,7 +324,7 @@
</span><span class="cx">     {
</span><span class="cx">         if (event.altKey)
</span><span class="cx">             this._addAdvancedUnits();
</span><del>-        else if (!this._valueIsSupportedAdvancedUnit())
</del><ins>+        else if (!this._valueIsSupportedAdvancedUnit(this._keywordSelectElement.value))
</ins><span class="cx">             this._removeAdvancedUnits();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStylePropertyCombinerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.VisualStylePropertyCombiner = class VisualStylePropertyCombiner extends WebInspector.Object
</span><span class="cx"> {
</span><del>-    constructor(propertyName, propertyEditors)
</del><ins>+    constructor(propertyName, propertyEditors, spreadNumberValues)
</ins><span class="cx">     {
</span><span class="cx">         super();
</span><span class="cx"> 
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx">         this._propertyName = propertyName;
</span><span class="cx">         this._propertyMissing = false;
</span><span class="cx">         this._propertyEditors = propertyEditors || [];
</span><ins>+        this._spreadNumberValues = !!spreadNumberValues &amp;&amp; this._propertyEditors.length &gt;= 4;
</ins><span class="cx"> 
</span><span class="cx">         for (let editor of this._propertyEditors) {
</span><span class="cx">             editor.addEventListener(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange, this._handlePropertyEditorValueChanged, this);
</span><span class="lines">@@ -60,7 +61,7 @@
</span><span class="cx">             else if (editor.optionalProperty)
</span><span class="cx">                 continue;
</span><span class="cx"> 
</span><del>-            if (editor.masterProperty &amp;&amp; editor.valueIsSupportedKeyword()) {
</del><ins>+            if (editor.masterProperty &amp;&amp; editor.valueIsSupportedKeyword(editor.value)) {
</ins><span class="cx">                 this._markEditors(editor, true);
</span><span class="cx">                 return editorValue;
</span><span class="cx">             }
</span><span class="lines">@@ -117,6 +118,34 @@
</span><span class="cx">         for (let editor of this._propertyEditors)
</span><span class="cx">             editor[WebInspector.VisualStylePropertyCombiner.EditorUpdatedSymbol] = false;
</span><span class="cx"> 
</span><ins>+        function updateEditor(editor, value) {
+            let updatedValues = editor.getValuesFromText(value || &quot;&quot;, propertyMissing);
+            if (!updatedValues)
+                return;
+
+            editor.updateEditorValues(updatedValues);
+            editor[WebInspector.VisualStylePropertyCombiner.EditorUpdatedSymbol] = true;
+        }
+
+        if (this._spreadNumberValues) {
+            let numberValues = styleText.match(/\d+[\w%]*/g);
+            let count = numberValues &amp;&amp; numberValues.length;
+            if (count === 1) {
+                for (let editor of this._propertyEditors)
+                    updateEditor(editor, numberValues[0]);
+            } else if (count === 2) {
+                for (let i = 0; i &lt; count; ++i) {
+                    updateEditor(this._propertyEditors[i], numberValues[i]);
+                    updateEditor(this._propertyEditors[i + 2], numberValues[i]);
+                }
+            } else if (count === 3) {
+                updateEditor(this._propertyEditors[0], numberValues[0]);
+                updateEditor(this._propertyEditors[1], numberValues[1]);
+                updateEditor(this._propertyEditors[2], numberValues[2]);
+                updateEditor(this._propertyEditors[3], numberValues[1]);
+            }
+        }
+
</ins><span class="cx">         function updateCompatibleEditor(value) {
</span><span class="cx">             for (let editor of this._propertyEditors) {
</span><span class="cx">                 if (value &amp;&amp; !editor.valueIsCompatible(value) || editor[WebInspector.VisualStylePropertyCombiner.EditorUpdatedSymbol])
</span><span class="lines">@@ -125,11 +154,7 @@
</span><span class="cx">                 if (this._currentValueIsKeyword &amp;&amp; editor.disabled)
</span><span class="cx">                     continue;
</span><span class="cx"> 
</span><del>-                let updatedValues = editor.getValuesFromText(value || &quot;&quot;, propertyMissing);
-                if (updatedValues)
-                    editor.updateEditorValues(updatedValues);
-                editor[WebInspector.VisualStylePropertyCombiner.EditorUpdatedSymbol] = true;
-
</del><ins>+                updateEditor(editor, value);
</ins><span class="cx">                 if (value)
</span><span class="cx">                     return;
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStylePropertyEditorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js (194727 => 194728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js        2016-01-07 22:31:27 UTC (rev 194727)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js        2016-01-07 22:36:51 UTC (rev 194728)
</span><span class="lines">@@ -379,7 +379,6 @@
</span><span class="cx">         if (!this._possibleValues)
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        value = value || this.value;
</del><span class="cx">         if (Object.keys(this._possibleValues.basic).includes(value))
</span><span class="cx">             return true;
</span><span class="cx"> 
</span><span class="lines">@@ -391,7 +390,6 @@
</span><span class="cx">         if (!this._possibleUnits)
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        unit = unit || this.units;
</del><span class="cx">         if (this._possibleUnits.basic.includes(unit))
</span><span class="cx">             return true;
</span><span class="cx"> 
</span><span class="lines">@@ -419,12 +417,12 @@
</span><span class="cx"> 
</span><span class="cx">     _valueIsSupportedAdvancedKeyword(value)
</span><span class="cx">     {
</span><del>-        return this._possibleValues.advanced &amp;&amp; Object.keys(this._possibleValues.advanced).includes(value || this.value);
</del><ins>+        return this._possibleValues.advanced &amp;&amp; Object.keys(this._possibleValues.advanced).includes(value);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _valueIsSupportedAdvancedUnit(unit)
</span><span class="cx">     {
</span><del>-        return this._possibleUnits.advanced &amp;&amp; this._possibleUnits.advanced.includes(unit || this.units);
</del><ins>+        return this._possibleUnits.advanced &amp;&amp; this._possibleUnits.advanced.includes(unit);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _canonicalizedKeywordForKey(value)
</span></span></pre>
</div>
</div>

</body>
</html>