<!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>[191493] 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/191493">191493</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-10-23 01:10:24 -0700 (Fri, 23 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Visual sidebar should support multiple backgrounds
https://bugs.webkit.org/show_bug.cgi?id=148310
Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2015-10-23
Reviewed by Timothy Hatcher.
Changes the layout of the Background - Style section in the Visual sidebar
to be a list instead of a single editable field for a background-image URL.
Allows for comma-separated background properties (both shorthand and
longhand) and displays them all in a single list for editing.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/VisualStyleColorPicker.js:
(WebInspector.VisualStyleColorPicker):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor):
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties.propertyValue):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties):
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.modifyPropertyText):
Comma separated properties will now try to assemble a value from related longhand
properties so that a single shorthand property with commas may be used.
* UserInterface/Views/VisualStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.background-style .visual-style-property-container.comma-separated-keyword-editor.background):
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection):
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection):
(WebInspector.VisualStyleDetailsPanel.prototype._noRemainingCommaSeparatedEditorItems):
(WebInspector.VisualStyleDetailsPanel.prototype._selectedCommaSeparatedEditorItemValueChanged):
(WebInspector.VisualStyleDetailsPanel.prototype._commaSeparatedEditorTreeItemSelected):
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.noRemainingTreeItems): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.selectedBoxShadowItemValueChanged): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.boxShadowItemSelected): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.noRemainingTreeItems): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.selectedtransitionItemValueChanged): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.transitionItemSelected): Deleted.
Made the "background-image" property into a comma separated editor.
* UserInterface/Views/VisualStyleFontFamilyListEditor.js:
(WebInspector.VisualStyleFontFamilyListEditor):
* UserInterface/Views/VisualStyleKeywordIconList.js:
(WebInspector.VisualStyleKeywordIconList.prototype.set value):
(WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):
(WebInspector.VisualStyleKeywordIconList):
* UserInterface/Views/VisualStyleKeywordPicker.js:
(WebInspector.VisualStyleKeywordPicker.prototype.updateEditorValues):
(WebInspector.VisualStyleKeywordPicker.prototype._setValue):
* UserInterface/Views/VisualStyleNumberInputBox.js:
(WebInspector.VisualStyleNumberInputBox.prototype.set value):
* UserInterface/Views/VisualStylePropertyCombiner.js:
(WebInspector.VisualStylePropertyCombiner):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
(WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
* UserInterface/Views/VisualStylePropertyEditor.js:
(WebInspector.VisualStylePropertyEditor):
(WebInspector.VisualStylePropertyEditor.prototype.update):
(WebInspector.VisualStylePropertyEditor.prototype.getValuesFromText):
(WebInspector.VisualStylePropertyEditor.prototype.get propertyMissing):
(WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
Moved "propertyMissing" into a member variable for better access.
* UserInterface/Views/VisualStyleURLInput.js:
(WebInspector.VisualStyleURLInput):
(WebInspector.VisualStyleURLInput.prototype.get synthesizedValue):
(WebInspector.VisualStyleURLInput.prototype.parseValue):
Added support for specific keywords to be used in the input field.</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="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleColorPickerjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleCommaSeparatedKeywordEditorcss">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleCommaSeparatedKeywordEditorjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.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="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleFontFamilyListEditorjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyListEditor.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleKeywordIconListjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordIconList.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleKeywordPickerjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.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>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleURLInputjs">trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleURLInput.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2015-10-23 Devin Rousso <dcrousso+webkit@gmail.com>
+
+ Web Inspector: Visual sidebar should support multiple backgrounds
+ https://bugs.webkit.org/show_bug.cgi?id=148310
+
+ Reviewed by Timothy Hatcher.
+
+ Changes the layout of the Background - Style section in the Visual sidebar
+ to be a list instead of a single editable field for a background-image URL.
+ Allows for comma-separated background properties (both shorthand and
+ longhand) and displays them all in a single list for editing.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Views/VisualStyleColorPicker.js:
+ (WebInspector.VisualStyleColorPicker):
+ * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
+ (.visual-style-property-container.comma-separated-keyword-editor):
+ * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
+ (WebInspector.VisualStyleCommaSeparatedKeywordEditor):
+ (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties.propertyValue):
+ (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties):
+ (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.modifyPropertyText):
+ Comma separated properties will now try to assemble a value from related longhand
+ properties so that a single shorthand property with commas may be used.
+
+ * UserInterface/Views/VisualStyleDetailsPanel.css:
+ (.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.background-style .visual-style-property-container.comma-separated-keyword-editor.background):
+ * UserInterface/Views/VisualStyleDetailsPanel.js:
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection):
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection):
+ (WebInspector.VisualStyleDetailsPanel.prototype._noRemainingCommaSeparatedEditorItems):
+ (WebInspector.VisualStyleDetailsPanel.prototype._selectedCommaSeparatedEditorItemValueChanged):
+ (WebInspector.VisualStyleDetailsPanel.prototype._commaSeparatedEditorTreeItemSelected):
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.noRemainingTreeItems): Deleted.
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.selectedBoxShadowItemValueChanged): Deleted.
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateBoxShadowSection.boxShadowItemSelected): Deleted.
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.noRemainingTreeItems): Deleted.
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.selectedtransitionItemValueChanged): Deleted.
+ (WebInspector.VisualStyleDetailsPanel.prototype._populateTransitionSection.transitionItemSelected): Deleted.
+ Made the "background-image" property into a comma separated editor.
+
+ * UserInterface/Views/VisualStyleFontFamilyListEditor.js:
+ (WebInspector.VisualStyleFontFamilyListEditor):
+ * UserInterface/Views/VisualStyleKeywordIconList.js:
+ (WebInspector.VisualStyleKeywordIconList.prototype.set value):
+ (WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):
+ (WebInspector.VisualStyleKeywordIconList):
+ * UserInterface/Views/VisualStyleKeywordPicker.js:
+ (WebInspector.VisualStyleKeywordPicker.prototype.updateEditorValues):
+ (WebInspector.VisualStyleKeywordPicker.prototype._setValue):
+ * UserInterface/Views/VisualStyleNumberInputBox.js:
+ (WebInspector.VisualStyleNumberInputBox.prototype.set value):
+ * UserInterface/Views/VisualStylePropertyCombiner.js:
+ (WebInspector.VisualStylePropertyCombiner):
+ (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText.updateCompatibleEditor):
+ (WebInspector.VisualStylePropertyCombiner.prototype.updateValuesFromText):
+ * UserInterface/Views/VisualStylePropertyEditor.js:
+ (WebInspector.VisualStylePropertyEditor):
+ (WebInspector.VisualStylePropertyEditor.prototype.update):
+ (WebInspector.VisualStylePropertyEditor.prototype.getValuesFromText):
+ (WebInspector.VisualStylePropertyEditor.prototype.get propertyMissing):
+ (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
+ Moved "propertyMissing" into a member variable for better access.
+
+ * UserInterface/Views/VisualStyleURLInput.js:
+ (WebInspector.VisualStyleURLInput):
+ (WebInspector.VisualStyleURLInput.prototype.get synthesizedValue):
+ (WebInspector.VisualStyleURLInput.prototype.parseValue):
+ Added support for specific keywords to be used in the input field.
+
</ins><span class="cx"> 2015-10-22 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Remove generateColoredImagesForCSS and its clients
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -127,6 +127,7 @@
</span><span class="cx"> localizedStrings["Click to restart the animation"] = "Click to restart the animation";
</span><span class="cx"> localizedStrings["Click to select a color. Shift-click to switch color formats."] = "Click to select a color. Shift-click to switch color formats.";
</span><span class="cx"> localizedStrings["Clickable"] = "Clickable";
</span><ins>+localizedStrings["Clip"] = "Clip";
</ins><span class="cx"> localizedStrings["Close"] = "Close";
</span><span class="cx"> localizedStrings["Close %s timeline view"] = "Close %s timeline view";
</span><span class="cx"> localizedStrings["Close Other Tabs"] = "Close Other Tabs";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleColorPickerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleColorPicker.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">
</span><span class="cx"> this._formatChanged = false;
</span><span class="cx"> this._updateColorSwatch();
</span><ins>+ this._colorProperty = true;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Public
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleCommaSeparatedKeywordEditorcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> .visual-style-property-container.comma-separated-keyword-editor {
</span><ins>+ margin-left: 11px;
</ins><span class="cx"> margin-bottom: 5px;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleCommaSeparatedKeywordEditorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -25,11 +25,12 @@
</span><span class="cx">
</span><span class="cx"> WebInspector.VisualStyleCommaSeparatedKeywordEditor = class VisualStyleCommaSeparatedKeywordEditor extends WebInspector.VisualStylePropertyEditor
</span><span class="cx"> {
</span><del>- constructor(propertyNames, text, insertNewItemsBeforeSelected, layoutReversed)
</del><ins>+ constructor(propertyNames, text, longhandProperties, insertNewItemsBeforeSelected, layoutReversed)
</ins><span class="cx"> {
</span><span class="cx"> super(propertyNames, text, null, null, "comma-separated-keyword-editor", layoutReversed);
</span><span class="cx">
</span><span class="cx"> this._insertNewItemsBeforeSelected = insertNewItemsBeforeSelected || false;
</span><ins>+ this._longhandProperties = longhandProperties || {};
</ins><span class="cx">
</span><span class="cx"> let listElement = document.createElement("ol");
</span><span class="cx"> listElement.classList.add("visual-style-comma-separated-keyword-list");
</span><span class="lines">@@ -115,6 +116,60 @@
</span><span class="cx">
</span><span class="cx"> // Private
</span><span class="cx">
</span><ins>+ _generateTextFromLonghandProperties()
+ {
+ let text = "";
+ if (!this._style)
+ return text;
+
+ function propertyValue(existingProperty, propertyName) {
+ if (existingProperty)
+ return existingProperty.value;
+
+ if (propertyName)
+ return this._longhandProperties[propertyName];
+
+ return "";
+ }
+
+ let onePropertyExists = false;
+ let valueLists = [];
+ let valuesCount = 0;
+ for (let propertyName in this._longhandProperties) {
+ let existingProperty = this._style.propertyForName(propertyName, true);
+ if (existingProperty)
+ onePropertyExists = true;
+
+ let matches = propertyValue.call(this, existingProperty, propertyName).split(/\s*,\s*(?![^\(]*\))/);
+ valuesCount = Math.max(valuesCount, matches.length);
+ valueLists.push(matches);
+ }
+
+ if (!onePropertyExists)
+ return text;
+
+ let count = 0;
+ while (count < valuesCount) {
+ if (count > 0)
+ text += ",";
+
+ for (let valueList of valueLists)
+ text += valueList[count > valueList.length - 1 ? valueList.length - 1 : count] + " ";
+
+ ++count;
+ }
+ return text;
+ }
+
+ modifyPropertyText(text, value)
+ {
+ for (let property in this._longhandProperties) {
+ let replacementRegExp = new RegExp(property + "\s*:\s*[^;]*(;|$)");
+ text = text.replace(replacementRegExp, "");
+ }
+ return super.modifyPropertyText(text, value);
+ }
+
</ins><span class="cx"> _listElementKeyDown(event)
</span><span class="cx"> {
</span><span class="cx"> let selectedTreeElement = this._commaSeparatedKeywords.selectedTreeElement;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleDetailsPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -96,3 +96,7 @@
</span><span class="cx"> .sidebar > .panel.details.css-style .visual.disabled > .details-section:not(.visual-style-selector-section) input {
</span><span class="cx"> pointer-events: none;
</span><span class="cx"> }
</span><ins>+
+.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.background-style .visual-style-property-container.comma-separated-keyword-editor.background {
+ margin-top: 3px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleDetailsPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -737,7 +737,6 @@
</span><span class="cx"> let textShadowStyle = new WebInspector.DetailsSectionRow;
</span><span class="cx">
</span><span class="cx"> let textShadowColor = new WebInspector.VisualStyleColorPicker("text-shadow", WebInspector.UIString("Color"));
</span><del>- textShadowColor.colorProperty = true;
</del><span class="cx"> let textShadowBlur = new WebInspector.VisualStyleNumberInputBox("text-shadow", WebInspector.UIString("Blur"), null, this._units.defaultsSansPercent);
</span><span class="cx"> textShadowBlur.optionalProperty = true;
</span><span class="cx">
</span><span class="lines">@@ -760,10 +759,10 @@
</span><span class="cx"> let backgroundStyleRow = new WebInspector.DetailsSectionRow;
</span><span class="cx">
</span><span class="cx"> properties.backgroundColor = new WebInspector.VisualStyleColorPicker("background-color", WebInspector.UIString("Color"));
</span><del>- properties.backgroundImage = new WebInspector.VisualStyleURLInput("background-image", WebInspector.UIString("Image"));
</del><ins>+ properties.backgroundClip = new WebInspector.VisualStyleKeywordPicker("background-clip", WebInspector.UIString("Clip"), ["Inherit", "Border Box", "Padding Box", "Content Box"]);
</ins><span class="cx">
</span><span class="cx"> backgroundStyleRow.element.appendChild(properties.backgroundColor.element);
</span><del>- backgroundStyleRow.element.appendChild(properties.backgroundImage.element);
</del><ins>+ backgroundStyleRow.element.appendChild(properties.backgroundClip.element);
</ins><span class="cx">
</span><span class="cx"> let backgroundSizeRow = new WebInspector.DetailsSectionRow;
</span><span class="cx">
</span><span class="lines">@@ -778,27 +777,58 @@
</span><span class="cx"> backgroundSizeRow.element.appendChild(backgroundSizeX.element);
</span><span class="cx"> backgroundSizeRow.element.appendChild(backgroundSizeY.element);
</span><span class="cx">
</span><del>- let backgroundRepeatRow = new WebInspector.DetailsSectionRow;
</del><ins>+ let backgroundRow = new WebInspector.DetailsSectionRow;
</ins><span class="cx">
</span><del>- properties.backgroundRepeat = new WebInspector.VisualStyleKeywordPicker("background-repeat", WebInspector.UIString("Repeat"), this._keywords.defaults.concat(["No Repeat", "Repeat", "Repeat X", "Repeat Y"]));
- properties.backgroundAttachment = new WebInspector.VisualStyleKeywordPicker("background-attachment", WebInspector.UIString("Attach"), this._keywords.defaults.concat(["Fixed", "Local", "Scroll"]));
</del><ins>+ properties.background = new WebInspector.VisualStyleCommaSeparatedKeywordEditor("background", null, {
+ "background-image": "none",
+ "background-position": "0% 0%",
+ "background-repeat": "repeat",
+ "background-attachment": "scroll",
+ });
</ins><span class="cx">
</span><del>- backgroundRepeatRow.element.appendChild(properties.backgroundRepeat.element);
- backgroundRepeatRow.element.appendChild(properties.backgroundAttachment.element);
</del><ins>+ backgroundRow.element.appendChild(properties.background.element);
</ins><span class="cx">
</span><ins>+ let backgroundImageRow = new WebInspector.DetailsSectionRow;
+
+ let backgroundImage = new WebInspector.VisualStyleURLInput("background-image", WebInspector.UIString("Image"), this._keywords.defaults.concat(["None"]));
+
+ backgroundImageRow.element.appendChild(backgroundImage.element);
+
</ins><span class="cx"> let backgroundPositionRow = new WebInspector.DetailsSectionRow;
</span><span class="cx">
</span><span class="cx"> let backgroundPositionX = new WebInspector.VisualStyleNumberInputBox("background-position", WebInspector.UIString("Position X"), ["Center", "Left", "Right"], this._units.defaults);
</span><ins>+ backgroundPositionX.optionalProperty = true;
</ins><span class="cx"> let backgroundPositionY = new WebInspector.VisualStyleNumberInputBox("background-position", WebInspector.UIString("Position Y"), ["Bottom", "Center", "Top"], this._units.defaults);
</span><ins>+ backgroundPositionY.optionalProperty = true;
</ins><span class="cx">
</span><del>- properties.backgroundPosition = new WebInspector.VisualStylePropertyCombiner("background-position", [backgroundPositionX, backgroundPositionY]);
-
</del><span class="cx"> backgroundPositionRow.element.appendChild(backgroundPositionX.element);
</span><span class="cx"> backgroundPositionRow.element.appendChild(backgroundPositionY.element);
</span><span class="cx">
</span><ins>+ let backgroundRepeatRow = new WebInspector.DetailsSectionRow;
+
+ let backgroundRepeat = new WebInspector.VisualStyleKeywordPicker("background-repeat", WebInspector.UIString("Repeat"), this._keywords.defaults.concat(["No Repeat", "Repeat", "Repeat X", "Repeat Y"]));
+ backgroundRepeat.optionalProperty = true;
+ let backgroundAttachment = new WebInspector.VisualStyleKeywordPicker("background-attachment", WebInspector.UIString("Attach"), this._keywords.defaults.concat(["Fixed", "Local", "Scroll"]));
+ backgroundAttachment.optionalProperty = true;
+
+ backgroundRepeatRow.element.appendChild(backgroundRepeat.element);
+ backgroundRepeatRow.element.appendChild(backgroundAttachment.element);
+
+ let backgroundProperties = [backgroundImage, backgroundPositionX, backgroundPositionY, backgroundRepeat, backgroundAttachment];
+ let backgroundPropertyCombiner = new WebInspector.VisualStylePropertyCombiner("background", backgroundProperties);
+
+ let noRemainingCommaSeparatedEditorItems = this._noRemainingCommaSeparatedEditorItems.bind(this, backgroundPropertyCombiner, backgroundProperties);
+ properties.background.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.NoRemainingTreeItems, noRemainingCommaSeparatedEditorItems, this);
+
+ let selectedCommaSeparatedEditorItemValueChanged = this._selectedCommaSeparatedEditorItemValueChanged.bind(this, properties.background, backgroundPropertyCombiner);
+ backgroundPropertyCombiner.addEventListener(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange, selectedCommaSeparatedEditorItemValueChanged, this);
+
+ let commaSeparatedEditorTreeItemSelected = this._commaSeparatedEditorTreeItemSelected.bind(backgroundPropertyCombiner);
+ properties.background.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.TreeItemSelected, commaSeparatedEditorTreeItemSelected, this);
+
</ins><span class="cx"> group.autocompleteCompatibleProperties = [properties.backgroundColor];
</span><span class="cx">
</span><del>- let backgroundStyleGroup = new WebInspector.DetailsSectionGroup([backgroundStyleRow, backgroundSizeRow, backgroundRepeatRow, backgroundPositionRow]);
</del><ins>+ let backgroundStyleGroup = new WebInspector.DetailsSectionGroup([backgroundStyleRow, backgroundSizeRow, backgroundRow, backgroundImageRow, backgroundPositionRow, backgroundRepeatRow]);
</ins><span class="cx"> this._populateSection(group, [backgroundStyleGroup]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -962,7 +992,6 @@
</span><span class="cx"> let boxShadowRow = new WebInspector.DetailsSectionRow;
</span><span class="cx">
</span><span class="cx"> properties.boxShadow = new WebInspector.VisualStyleCommaSeparatedKeywordEditor("box-shadow");
</span><del>- properties.boxShadow.element.style.marginLeft = "11px";
</del><span class="cx">
</span><span class="cx"> boxShadowRow.element.appendChild(properties.boxShadow.element);
</span><span class="cx">
</span><span class="lines">@@ -991,35 +1020,23 @@
</span><span class="cx"> let boxShadowColorRow = new WebInspector.DetailsSectionRow;
</span><span class="cx">
</span><span class="cx"> let boxShadowColor = new WebInspector.VisualStyleColorPicker("box-shadow", WebInspector.UIString("Color"));
</span><del>- boxShadowColor.colorProperty = true;
</del><span class="cx"> let boxShadowInset = new WebInspector.VisualStyleKeywordCheckbox("box-shadow", WebInspector.UIString("Inset"), "Inset");
</span><span class="cx"> boxShadowInset.optionalProperty = true;
</span><span class="cx">
</span><span class="cx"> boxShadowColorRow.element.appendChild(boxShadowColor.element);
</span><span class="cx"> boxShadowColorRow.element.appendChild(boxShadowInset.element);
</span><span class="cx">
</span><del>- let boxShadowPropertyCombiner = new WebInspector.VisualStylePropertyCombiner("box-shadow", [boxShadowH, boxShadowV, boxShadowBlur, boxShadowSpread, boxShadowColor, boxShadowInset]);
</del><ins>+ let boxShadowProperties = [boxShadowH, boxShadowV, boxShadowBlur, boxShadowSpread, boxShadowColor, boxShadowInset];
+ let boxShadowPropertyCombiner = new WebInspector.VisualStylePropertyCombiner("box-shadow", boxShadowProperties);
</ins><span class="cx">
</span><del>- function noRemainingTreeItems() {
- boxShadowPropertyCombiner.updateValuesFromText("");
- boxShadowH.disabled = true;
- boxShadowV.disabled = true;
- boxShadowBlur.disabled = true;
- boxShadowSpread.disabled = true;
- boxShadowColor.disabled = true;
- boxShadowInset.disabled = true;
- }
- properties.boxShadow.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.NoRemainingTreeItems, noRemainingTreeItems, this);
</del><ins>+ let noRemainingCommaSeparatedEditorItems = this._noRemainingCommaSeparatedEditorItems.bind(this, boxShadowPropertyCombiner, boxShadowProperties);
+ properties.boxShadow.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.NoRemainingTreeItems, noRemainingCommaSeparatedEditorItems, this);
</ins><span class="cx">
</span><del>- function selectedBoxShadowItemValueChanged() {
- properties.boxShadow.selectedTreeElementValue = boxShadowPropertyCombiner.synthesizedValue;
- }
- boxShadowPropertyCombiner.addEventListener(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange, selectedBoxShadowItemValueChanged, this);
</del><ins>+ let selectedCommaSeparatedEditorItemValueChanged = this._selectedCommaSeparatedEditorItemValueChanged.bind(this, properties.boxShadow, boxShadowPropertyCombiner);
+ boxShadowPropertyCombiner.addEventListener(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange, selectedCommaSeparatedEditorItemValueChanged, this);
</ins><span class="cx">
</span><del>- function boxShadowItemSelected(event) {
- boxShadowPropertyCombiner.updateValuesFromText(event.data.text || "");
- }
- properties.boxShadow.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.TreeItemSelected, boxShadowItemSelected, this);
</del><ins>+ let commaSeparatedEditorTreeItemSelected = this._commaSeparatedEditorTreeItemSelected.bind(boxShadowPropertyCombiner);
+ properties.boxShadow.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.TreeItemSelected, commaSeparatedEditorTreeItemSelected, this);
</ins><span class="cx">
</span><span class="cx"> group.autocompleteCompatibleProperties = [boxShadowColor];
</span><span class="cx">
</span><span class="lines">@@ -1034,8 +1051,12 @@
</span><span class="cx">
</span><span class="cx"> let transitionRow = new WebInspector.DetailsSectionRow;
</span><span class="cx">
</span><del>- properties.transition = new WebInspector.VisualStyleCommaSeparatedKeywordEditor("transition");
- properties.transition.element.style.marginLeft = "11px";
</del><ins>+ properties.transition = new WebInspector.VisualStyleCommaSeparatedKeywordEditor("transition", null, {
+ "transition-property": "all",
+ "transition-timing-function": "ease",
+ "transition-duration": "0",
+ "transition-delay": "0"
+ });
</ins><span class="cx">
</span><span class="cx"> transitionRow.element.appendChild(properties.transition.element);
</span><span class="cx">
</span><span class="lines">@@ -1057,32 +1078,44 @@
</span><span class="cx"> transitionDurationRow.element.appendChild(transitionDuration.element);
</span><span class="cx"> transitionDurationRow.element.appendChild(transitionDelay.element);
</span><span class="cx">
</span><del>- let transitionPropertyCombiner = new WebInspector.VisualStylePropertyCombiner("transition", [transitionProperty, transitionTiming, transitionDuration, transitionDelay]);
</del><ins>+ let transitionProperties = [transitionProperty, transitionTiming, transitionDuration, transitionDelay];
+ let transitionPropertyCombiner = new WebInspector.VisualStylePropertyCombiner("transition", transitionProperties);
</ins><span class="cx">
</span><del>- function noRemainingTreeItems() {
- transitionPropertyCombiner.updateValuesFromText("");
- transitionProperty.disabled = true;
- transitionTiming.disabled = true;
- transitionDuration.disabled = true;
- transitionDelay.disabled = true;
- }
- properties.transition.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.NoRemainingTreeItems, noRemainingTreeItems, this);
</del><ins>+ let noRemainingCommaSeparatedEditorItems = this._noRemainingCommaSeparatedEditorItems.bind(this, transitionPropertyCombiner, transitionProperties);
+ properties.transition.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.NoRemainingTreeItems, noRemainingCommaSeparatedEditorItems, this);
</ins><span class="cx">
</span><del>- function selectedtransitionItemValueChanged() {
- properties.transition.selectedTreeElementValue = transitionPropertyCombiner.synthesizedValue;
- }
- transitionPropertyCombiner.addEventListener(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange, selectedtransitionItemValueChanged, this);
</del><ins>+ let selectedCommaSeparatedEditorItemValueChanged = this._selectedCommaSeparatedEditorItemValueChanged.bind(this, properties.transition, transitionPropertyCombiner);
+ transitionPropertyCombiner.addEventListener(WebInspector.VisualStylePropertyEditor.Event.ValueDidChange, selectedCommaSeparatedEditorItemValueChanged, this);
</ins><span class="cx">
</span><del>- function transitionItemSelected(event) {
- transitionPropertyCombiner.updateValuesFromText(event.data.text || "");
- }
- properties.transition.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.TreeItemSelected, transitionItemSelected, this);
</del><ins>+ let commaSeparatedEditorTreeItemSelected = this._commaSeparatedEditorTreeItemSelected.bind(transitionPropertyCombiner);
+ properties.transition.addEventListener(WebInspector.VisualStyleCommaSeparatedKeywordEditor.Event.TreeItemSelected, commaSeparatedEditorTreeItemSelected, this);
</ins><span class="cx">
</span><span class="cx"> group.autocompleteCompatibleProperties = [transitionProperty];
</span><span class="cx">
</span><span class="cx"> let transitionGroup = new WebInspector.DetailsSectionGroup([transitionRow, transitionPropertyRow, transitionDurationRow]);
</span><span class="cx"> this._populateSection(group, [transitionGroup]);
</span><span class="cx"> }
</span><ins>+
+ _noRemainingCommaSeparatedEditorItems(propertyCombiner, propertyEditors)
+ {
+ if (!propertyCombiner || !propertyEditors)
+ return;
+
+ propertyCombiner.updateValuesFromText("");
+ for (let editor of propertyEditors)
+ editor.disabled = true;
+ }
+
+ _selectedCommaSeparatedEditorItemValueChanged(propertyEditor, propertyCombiner)
+ {
+ propertyEditor.selectedTreeElementValue = propertyCombiner.synthesizedValue;
+ }
+
+ _commaSeparatedEditorTreeItemSelected(event)
+ {
+ if (typeof this.updateValuesFromText === "function")
+ this.updateValuesFromText(event.data.text || "");
+ }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> WebInspector.VisualStyleDetailsPanel.StyleDisabledSymbol = Symbol("visual-style-style-disabled");
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleFontFamilyListEditorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyListEditor.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyListEditor.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleFontFamilyListEditor.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -25,9 +25,9 @@
</span><span class="cx">
</span><span class="cx"> WebInspector.VisualStyleFontFamilyListEditor = class VisualStyleFontFamilyListEditor extends WebInspector.VisualStyleCommaSeparatedKeywordEditor
</span><span class="cx"> {
</span><del>- constructor(propertyNames, text, layoutReversed)
</del><ins>+ constructor(propertyNames, text, longhandProperties, layoutReversed)
</ins><span class="cx"> {
</span><del>- super(propertyNames, text, true, layoutReversed);
</del><ins>+ super(propertyNames, text, longhandProperties, true, layoutReversed);
</ins><span class="cx">
</span><span class="cx"> this._commaSeparatedKeywords.element.addEventListener("scroll", this._hideCompletions.bind(this));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleKeywordIconListjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordIconList.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordIconList.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordIconList.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> if (icon.id === this._updatedValues.placeholder)
</span><span class="cx"> this._computedIcon = icon;
</span><span class="cx">
</span><del>- if (icon.id === value && !this._updatedValues.propertyMissing)
</del><ins>+ if (icon.id === value && !this._propertyMissing)
</ins><span class="cx"> this._selectedIcon = icon;
</span><span class="cx"> else
</span><span class="cx"> icon.classList.remove("selected", "computed");
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> let iconIsSelected = this._selectedIcon && this._selectedIcon.classList.toggle("selected");
</span><span class="cx"> if (!iconIsSelected) {
</span><span class="cx"> this._selectedIcon = null;
</span><del>- this._updatedValues.propertyMissing = true;
</del><ins>+ this._propertyMissing = true;
</ins><span class="cx"> this._computedIcon.classList.add("computed");
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">
</span><span class="cx"> _handleKeywordChanged(event)
</span><span class="cx"> {
</span><del>- this._updatedValues.propertyMissing = false;
</del><ins>+ this._propertyMissing = false;
</ins><span class="cx"> this.value = event.target.id;
</span><span class="cx"> this._valueDidChange();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleKeywordPickerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordPicker.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">
</span><span class="cx"> updateEditorValues(updatedValues)
</span><span class="cx"> { if (!updatedValues.conflictingValues) {
</span><del>- let missing = updatedValues.propertyMissing || !updatedValues.value;
</del><ins>+ let missing = this._propertyMissing || !updatedValues.value;
</ins><span class="cx"> this._unchangedOptionElement.selected = missing;
</span><span class="cx"> this.specialPropertyPlaceholderElement.hidden = !missing;
</span><span class="cx"> }
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (this._updatedValues.propertyMissing || !this.valueIsSupportedKeyword(value))
</del><ins>+ if (this._propertyMissing || !this.valueIsSupportedKeyword(value))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (value === this._keywordSelectElement.value)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStylePropertyCombinerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -126,7 +126,8 @@
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> let updatedValues = editor.getValuesFromText(value || "", propertyMissing);
</span><del>- editor.updateEditorValues(updatedValues);
</del><ins>+ if (updatedValues)
+ editor.updateEditorValues(updatedValues);
</ins><span class="cx"> editor[WebInspector.VisualStylePropertyCombiner.EditorUpdatedSymbol] = true;
</span><span class="cx">
</span><span class="cx"> if (value)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStylePropertyEditorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -95,6 +95,7 @@
</span><span class="cx">
</span><span class="cx"> this._updatedValues = {};
</span><span class="cx"> this._lastValue = null;
</span><ins>+ this._propertyMissing = false;
</ins><span class="cx">
</span><span class="cx"> if (typeof propertyNames === "string")
</span><span class="cx"> propertyNames = [propertyNames];
</span><span class="lines">@@ -280,13 +281,21 @@
</span><span class="cx"> if (propertyMissing && this._style.nodeStyles)
</span><span class="cx"> property = this._style.nodeStyles.computedStyle.propertyForName(propertyInfo.name);
</span><span class="cx">
</span><del>- if (!property)
</del><ins>+ let longhandPropertyValue = null;
+ if (typeof this._generateTextFromLonghandProperties === "function")
+ longhandPropertyValue = this._generateTextFromLonghandProperties();
+
+ if (longhandPropertyValue)
+ propertyMissing = false;
+
+ let propertyText = (property && property.value) || longhandPropertyValue;
+ if (!propertyText || !propertyText.length)
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- if (!propertyMissing && property.anonymous)
</del><ins>+ if (!propertyMissing && property && property.anonymous)
</ins><span class="cx"> this._representedProperty = property;
</span><span class="cx">
</span><del>- let newValues = this.getValuesFromText(property.value, propertyMissing);
</del><ins>+ let newValues = this.getValuesFromText(propertyText, propertyMissing);
</ins><span class="cx"> if (this._updatedValues.placeholder && this._updatedValues.placeholder !== newValues.placeholder)
</span><span class="cx"> propertyValuesConflict = true;
</span><span class="cx">
</span><span class="lines">@@ -349,12 +358,13 @@
</span><span class="cx"> if (propertyMissing)
</span><span class="cx"> value = this.valueIsSupportedKeyword(text) ? text : null;
</span><span class="cx">
</span><del>- return {value, units, placeholder, propertyMissing};
</del><ins>+ this._propertyMissing = propertyMissing || false;
+ return {value, units, placeholder};
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> get propertyMissing()
</span><span class="cx"> {
</span><del>- return this._updatedValues && this._updatedValues.propertyMissing;
</del><ins>+ return this._updatedValues && this._propertyMissing;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> valueIsCompatible(value)
</span><span class="lines">@@ -462,7 +472,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> this._lastValue = value;
</span><del>- this._updatedValues.propertyMissing = !value;
</del><ins>+ this._propertyMissing = !value;
</ins><span class="cx"> this._ignoreNextUpdate = true;
</span><span class="cx"> this._specialPropertyPlaceholderElement.hidden = true;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsVisualStyleURLInputjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleURLInput.js (191492 => 191493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleURLInput.js        2015-10-23 07:37:29 UTC (rev 191492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleURLInput.js        2015-10-23 08:10:24 UTC (rev 191493)
</span><span class="lines">@@ -25,9 +25,9 @@
</span><span class="cx">
</span><span class="cx"> WebInspector.VisualStyleURLInput = class VisualStyleURLInput extends WebInspector.VisualStylePropertyEditor
</span><span class="cx"> {
</span><del>- constructor(propertyNames, text, layoutReversed)
</del><ins>+ constructor(propertyNames, text, possibleValues, layoutReversed)
</ins><span class="cx"> {
</span><del>- super(propertyNames, text, null, null, "url-input", layoutReversed);
</del><ins>+ super(propertyNames, text, possibleValues, null, "url-input", layoutReversed);
</ins><span class="cx">
</span><span class="cx"> this._urlInputElement = document.createElement("input");
</span><span class="cx"> this._urlInputElement.type = "url";
</span><span class="lines">@@ -53,17 +53,23 @@
</span><span class="cx">
</span><span class="cx"> get synthesizedValue()
</span><span class="cx"> {
</span><del>- var value = this.value;
</del><ins>+ let value = this.value;
</ins><span class="cx"> if (!value || !value.length)
</span><span class="cx"> return null;
</span><span class="cx">
</span><del>- return "url(" + this.value + ")";
</del><ins>+ if (this.valueIsSupportedKeyword(value))
+ return value;
+
+ return "url(" + value + ")";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Protected
</span><span class="cx">
</span><span class="cx"> parseValue(text)
</span><span class="cx"> {
</span><ins>+ if (this.valueIsSupportedKeyword(text))
+ return [text, text];
+
</ins><span class="cx"> return /^(?:url\(\s*)([^\)]*)(?:\s*\)\s*;?)$/.exec(text);
</span><span class="cx"> }
</span><span class="cx"> };
</span></span></pre>
</div>
</div>
</body>
</html>