Modified: trunk/Source/WebInspectorUI/ChangeLog (184924 => 184925)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-05-27 22:11:27 UTC (rev 184924)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-05-27 23:21:58 UTC (rev 184925)
@@ -1,3 +1,21 @@
+2015-05-27 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: REGRESSION(r179286) Editing Style Metrics Values no longer works
+ https://bugs.webkit.org/show_bug.cgi?id=143164
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/BoxModelDetailsSectionRow.js:
+ (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement):
+ (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.toggleInlineStyleProperty):
+ (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.didToggle):
+ (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode):
+ (WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput):
+ Make it so editing in the metrics pane just evaluates elem.style.setProperty
+ on the inspected page. Use "!important" to try and give the maximum priority
+ possible, which is a change from older behavior. Finally, refresh the sidebar
+ to update all values, and update the UI if bad input didn't change styles.
+
2015-05-26 Joseph Pecoraro <[email protected]>
Web Inspector: Function parameter string parsing improperly handles empty parameter list
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js (184924 => 184925)
--- trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js 2015-05-27 22:11:27 UTC (rev 184924)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js 2015-05-27 23:21:58 UTC (rev 184925)
@@ -117,8 +117,7 @@
element.textContent = shouldRoundValue ? ("~" + Math.round(floatValue * 100) / 100) : value;
if (shouldRoundValue)
element.title = value;
- // FIXME: <https://webkit.org/b/143164> Web Inspector: REGRESSION(r179286) Editing Style Metrics Values no longer works
- // element.addEventListener("dblclick", this._startEditing.bind(this, element, name, propertyName, style), false);
+ element.addEventListener("dblclick", this._startEditing.bind(this, element, name, propertyName, style), false);
return element;
}
@@ -413,8 +412,26 @@
userInput = userValuePx + "px";
}
- var property = this._nodeStyles.inlineStyle.propertyForName(context.styleProperty);
- // FIXME: <https://webkit.org/b/143164> Web Inspector: REGRESSION(r179286) Editing Style Metrics Values no longer works
+ function resolvedNode(object)
+ {
+ if (!object)
+ return;
+
+ function toggleInlineStyleProperty(property, value)
+ {
+ this.style.setProperty(property, value, "!important");
+ }
+
+ function didToggle()
+ {
+ this._nodeStyles.refresh();
+ }
+
+ object.callFunction(toggleInlineStyleProperty, [styleProperty, userInput], false, didToggle.bind(this));
+ object.release();
+ }
+
+ WebInspector.RemoteObject.resolveNode(this._nodeStyles.node, "", resolvedNode.bind(this));
}
_editingCommitted(element, userInput, previousContent, context)