https://bugs.webkit.org/show_bug.cgi?id=89834
Reviewed by Yury Semikhatsky.
Source/WebCore:
Otherwise property flickers upon toggling.
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertyTreeElement.prototype):
LayoutTests:
* http/tests/inspector/elements-test.js:
(initialize_ElementTest.InspectorTest.dumpSelectedElementStyles):
(initialize_ElementTest.InspectorTest.toggleStylePropertyEnabled):
* inspector/styles/styles-disable-inherited.html:
* inspector/styles/styles-disable-then-change.html:
* inspector/styles/styles-disable-then-delete.html:
* inspector/styles/styles-disable-then-enable.html:
* inspector/styles/undo-property-toggle.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121156
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-06-25 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: toggling style should not start property edit first.
+ https://bugs.webkit.org/show_bug.cgi?id=89834
+
+ Reviewed by Yury Semikhatsky.
+
+ * http/tests/inspector/elements-test.js:
+ (initialize_ElementTest.InspectorTest.dumpSelectedElementStyles):
+ (initialize_ElementTest.InspectorTest.toggleStylePropertyEnabled):
+ * inspector/styles/styles-disable-inherited.html:
+ * inspector/styles/styles-disable-then-change.html:
+ * inspector/styles/styles-disable-then-delete.html:
+ * inspector/styles/styles-disable-then-enable.html:
+ * inspector/styles/undo-property-toggle.html:
+
2012-06-25 Philip Rogers <pdr@google.com>
Fix rewinding of SVG animations
}
InspectorTest.addResult("");
}
-};
+}
+
+InspectorTest.toggleStyleProperty = function(propertyName, checked)
+{
+ var treeItem = InspectorTest.getElementStylePropertyTreeItem(propertyName);
+ treeItem.toggleEnabled({ target: { checked: checked }, consume: function() { } });
+}
InspectorTest.expandAndDumpSelectedElementEventListeners = function(callback)
{
function step2()
{
- var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
- treeItem.toggleEnabled({ target: { checked: false } });
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.selectNodeAndWaitForStyles("nested", step3);
}
InspectorTest.addResult("Before disable");
InspectorTest.dumpSelectedElementStyles(true, true);
- var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
- treeItem.toggleEnabled({ target: { checked: false } });
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.waitForStyles("container", step2);
}
// Disable property
InspectorTest.addResult("Before disable");
InspectorTest.dumpSelectedElementStyles(true, true);
-
- var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
- treeItem.toggleEnabled({ target: { checked: false } });
-
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.runAfterPendingDispatches(step2);
}
var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
InspectorTest.dumpStyleTreeItem(treeItem, "");
- treeItem.toggleEnabled({ target: { checked: false } });
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.waitForStyles("container", step2);
}
var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
InspectorTest.dumpStyleTreeItem(treeItem, "");
- treeItem.toggleEnabled({ target: { checked: true } });
+ InspectorTest.toggleStyleProperty("font-weight", true);
InspectorTest.waitForStyles("container", step3);
}
var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
InspectorTest.dumpStyleTreeItem(treeItem, "");
- treeItem.toggleEnabled({ target: { checked: false } });
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.waitForStyles("container", step2);
}
+2012-06-25 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: toggling style should not start property edit first.
+ https://bugs.webkit.org/show_bug.cgi?id=89834
+
+ Reviewed by Yury Semikhatsky.
+
+ Otherwise property flickers upon toggling.
+
+ * inspector/front-end/StylesSidebarPane.js:
+ (WebInspector.StylePropertyTreeElement.prototype):
+
2012-06-25 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: "Emulate Touch Events" breaks selecting elements with "touchstart" event listeners for inspection.
enabledCheckboxElement.className = "enabled-button";
enabledCheckboxElement.type = "checkbox";
enabledCheckboxElement.checked = !this.disabled;
- enabledCheckboxElement.addEventListener("change", this.toggleEnabled.bind(this), false);
+ enabledCheckboxElement.addEventListener("click", this.toggleEnabled.bind(this), false);
}
var nameElement = document.createElement("span");
this._parentPane._userOperation = true;
this.property.setDisabled(disabled, callback.bind(this));
+ event.consume();
},
updateState: function()