Diff
Modified: trunk/LayoutTests/ChangeLog (121155 => 121156)
--- trunk/LayoutTests/ChangeLog 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/LayoutTests/ChangeLog 2012-06-25 14:36:00 UTC (rev 121156)
@@ -1,3 +1,19 @@
+2012-06-25 Pavel Feldman <[email protected]>
+
+ 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 <[email protected]>
Fix rewinding of SVG animations
Modified: trunk/LayoutTests/http/tests/inspector/elements-test.js (121155 => 121156)
--- trunk/LayoutTests/http/tests/inspector/elements-test.js 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/LayoutTests/http/tests/inspector/elements-test.js 2012-06-25 14:36:00 UTC (rev 121156)
@@ -157,8 +157,14 @@
}
InspectorTest.addResult("");
}
-};
+}
+InspectorTest.toggleStyleProperty = function(propertyName, checked)
+{
+ var treeItem = InspectorTest.getElementStylePropertyTreeItem(propertyName);
+ treeItem.toggleEnabled({ target: { checked: checked }, consume: function() { } });
+}
+
InspectorTest.expandAndDumpSelectedElementEventListeners = function(callback)
{
InspectorTest.expandSelectedElementEventListeners(function() {
Modified: trunk/LayoutTests/inspector/styles/styles-disable-inherited.html (121155 => 121156)
--- trunk/LayoutTests/inspector/styles/styles-disable-inherited.html 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/LayoutTests/inspector/styles/styles-disable-inherited.html 2012-06-25 14:36:00 UTC (rev 121156)
@@ -20,8 +20,7 @@
function step2()
{
- var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
- treeItem.toggleEnabled({ target: { checked: false } });
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.selectNodeAndWaitForStyles("nested", step3);
}
Modified: trunk/LayoutTests/inspector/styles/styles-disable-then-change.html (121155 => 121156)
--- trunk/LayoutTests/inspector/styles/styles-disable-then-change.html 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/LayoutTests/inspector/styles/styles-disable-then-change.html 2012-06-25 14:36:00 UTC (rev 121156)
@@ -13,8 +13,7 @@
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);
}
Modified: trunk/LayoutTests/inspector/styles/styles-disable-then-delete.html (121155 => 121156)
--- trunk/LayoutTests/inspector/styles/styles-disable-then-delete.html 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/LayoutTests/inspector/styles/styles-disable-then-delete.html 2012-06-25 14:36:00 UTC (rev 121156)
@@ -13,10 +13,7 @@
// 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);
}
Modified: trunk/LayoutTests/inspector/styles/styles-disable-then-enable.html (121155 => 121156)
--- trunk/LayoutTests/inspector/styles/styles-disable-then-enable.html 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/LayoutTests/inspector/styles/styles-disable-then-enable.html 2012-06-25 14:36:00 UTC (rev 121156)
@@ -14,7 +14,7 @@
var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
InspectorTest.dumpStyleTreeItem(treeItem, "");
- treeItem.toggleEnabled({ target: { checked: false } });
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.waitForStyles("container", step2);
}
@@ -24,7 +24,7 @@
var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
InspectorTest.dumpStyleTreeItem(treeItem, "");
- treeItem.toggleEnabled({ target: { checked: true } });
+ InspectorTest.toggleStyleProperty("font-weight", true);
InspectorTest.waitForStyles("container", step3);
}
Modified: trunk/LayoutTests/inspector/styles/undo-property-toggle.html (121155 => 121156)
--- trunk/LayoutTests/inspector/styles/undo-property-toggle.html 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/LayoutTests/inspector/styles/undo-property-toggle.html 2012-06-25 14:36:00 UTC (rev 121156)
@@ -14,7 +14,7 @@
var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
InspectorTest.dumpStyleTreeItem(treeItem, "");
- treeItem.toggleEnabled({ target: { checked: false } });
+ InspectorTest.toggleStyleProperty("font-weight", false);
InspectorTest.waitForStyles("container", step2);
}
Modified: trunk/Source/WebCore/ChangeLog (121155 => 121156)
--- trunk/Source/WebCore/ChangeLog 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/Source/WebCore/ChangeLog 2012-06-25 14:36:00 UTC (rev 121156)
@@ -1,3 +1,15 @@
+2012-06-25 Pavel Feldman <[email protected]>
+
+ 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 <[email protected]>
Web Inspector: "Emulate Touch Events" breaks selecting elements with "touchstart" event listeners for inspection.
Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (121155 => 121156)
--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-06-25 14:30:10 UTC (rev 121155)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-06-25 14:36:00 UTC (rev 121156)
@@ -1693,7 +1693,7 @@
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");
@@ -1986,6 +1986,7 @@
this._parentPane._userOperation = true;
this.property.setDisabled(disabled, callback.bind(this));
+ event.consume();
},
updateState: function()