[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

apavlov at chromium.org apavlov at chromium.org
Wed Dec 22 18:43:19 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4973cd2f6b24949d1b5a6d76138d0dffe8a2ee5b
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 16 14:09:28 2010 +0000

    2010-12-16  Alexander Pavlov  <apavlov at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: Up/Down/PageUp/PageDown on a CSS property numeric value commit the value editor
            https://bugs.webkit.org/show_bug.cgi?id=51114
    
            The r74038 regressed the behaviour. This patch additionally ensures that both Metrics and Styles panes
            are updated once a stylesheet is reverted.
    
            WebCore:
            * inspector/front-end/ElementsPanel.js:
            (WebInspector.ElementsPanel.prototype._stylesPaneEdited):
            (WebInspector.ElementsPanel.prototype._metricsPaneEdited):
            (WebInspector.ElementsPanel.prototype._styleSheetChanged):
    
            LayoutTests:
            * inspector/styles-add-blank-property-expected.txt:
            * inspector/styles-add-blank-property.html:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74185 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6386cd1..7f00529 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-16  Alexander Pavlov  <apavlov at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: Up/Down/PageUp/PageDown on a CSS property numeric value commit the value editor
+        https://bugs.webkit.org/show_bug.cgi?id=51114
+
+        * inspector/styles-add-blank-property-expected.txt:
+        * inspector/styles-add-blank-property.html:
+
 2010-12-16  Yury Semikhatsky  <yurys at chromium.org>
 
         Unreviewed. Update Chromium test expectations.
diff --git a/LayoutTests/inspector/styles-add-blank-property-expected.txt b/LayoutTests/inspector/styles-add-blank-property-expected.txt
index 68a0ec1..deb35bd 100644
--- a/LayoutTests/inspector/styles-add-blank-property-expected.txt
+++ b/LayoutTests/inspector/styles-add-blank-property-expected.txt
@@ -13,7 +13,7 @@ display: block;
 After append:
 [expanded] element.style { ()
 font-size: 12px;
-text-decoration: none;
+margin-left: 3px;
 
 ======== Matched CSS Rules ========
 [expanded] div { (user agent stylesheet)
diff --git a/LayoutTests/inspector/styles-add-blank-property.html b/LayoutTests/inspector/styles-add-blank-property.html
index fd36a95..b6b50e6 100644
--- a/LayoutTests/inspector/styles-add-blank-property.html
+++ b/LayoutTests/inspector/styles-add-blank-property.html
@@ -27,6 +27,13 @@ function frontend_selectInspectedElement(testController)
     frontend_selectElementAndRun(testController, "inspected", frontend_dumpInspectedStyle);
 }
 
+function frontend_createKeyboardEvent(eventName, keyIdentifier)
+{
+    var evt = document.createEvent("KeyboardEvent");
+    evt.initKeyboardEvent(eventName, true /* can bubble */, true /* can cancel */, null /* view */, keyIdentifier, "");
+    return evt;
+}
+
 function frontend_dumpInspectedStyle(testController)
 {
     testController.results.push("Before append:");
@@ -35,15 +42,35 @@ function frontend_dumpInspectedStyle(testController)
     var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][1];
     section.expand();
     var treeElement = section.addNewBlankProperty();
-    treeElement.startEditing();
+    var enterKeyDown = frontend_createKeyboardEvent("keydown", "Enter");
+    var incrementKeyDown = frontend_createKeyboardEvent("keydown", "Up");
 
-    var evt = document.createEvent("KeyboardEvent");
-    evt.initKeyboardEvent("keydown", true /* can bubble */, true /* can cancel */, null /* view */, "Enter", "");
-    treeElement.nameElement.textContent = "text-decoration";
-    treeElement.valueElement.textContent = "none";
-    treeElement.nameElement.dispatchEvent(evt);
+    function removeEmpty()
+    {
+        window.getSelection().anchorNode.dispatchEvent(enterKeyDown);
+        frontend_dumpResults(testController);
+    }
 
-    testController.runAfterPendingDispatches(frontend_dumpResults.bind(this, testController));
+    function commit()
+    {
+        treeElement.valueElement.dispatchEvent(enterKeyDown);
+        testController.runAfterPendingDispatches(removeEmpty.bind(this));
+        frontend_dumpResults(testController);
+    }
+
+    function incrementAgain()
+    {
+        treeElement.valueElement.dispatchEvent(incrementKeyDown);
+        testController.runAfterPendingDispatches(commit.bind(this));
+    }
+
+    treeElement.startEditing();
+    treeElement.nameElement.textContent = "margin-left";
+    treeElement.nameElement.dispatchEvent(enterKeyDown);
+    treeElement.valueElement.textContent = "1px";
+    treeElement.valueElement.firstChild.select();
+    treeElement.valueElement.dispatchEvent(incrementKeyDown);
+    testController.runAfterPendingDispatches(incrementAgain.bind(this));
 }
 
 function frontend_dumpResults(testController)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9dd6b46..185dc60 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-16  Alexander Pavlov  <apavlov at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: Up/Down/PageUp/PageDown on a CSS property numeric value commit the value editor
+        https://bugs.webkit.org/show_bug.cgi?id=51114
+
+        The r74038 regressed the behaviour. This patch additionally ensures that both Metrics and Styles panes
+        are updated once a stylesheet is reverted.
+
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype._stylesPaneEdited):
+        (WebInspector.ElementsPanel.prototype._metricsPaneEdited):
+        (WebInspector.ElementsPanel.prototype._styleSheetChanged):
+
 2010-12-16  Yury Semikhatsky  <yurys at chromium.org>
 
         Unreviewed. Fix Chromium Mac Debug Clang compilation.
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index d096fe9..9299479 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -443,20 +443,23 @@ WebInspector.ElementsPanel.prototype = {
             this.updateBreadcrumb(true);
     },
 
-    _metricsPaneEdited: function()
+    _stylesPaneEdited: function()
     {
+        // Once styles are edited, the Metrics pane should be updated.
         this.sidebarPanes.metrics.needsUpdate = true;
         this.updateMetrics();
     },
 
-    _stylesPaneEdited: function()
+    _metricsPaneEdited: function()
     {
+        // Once metrics are edited, the Styles pane should be updated.
         this.sidebarPanes.styles.needsUpdate = true;
         this.updateStyles(true);
     },
 
     _styleSheetChanged: function()
     {
+        this._metricsPaneEdited();
         this._stylesPaneEdited();
     },
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list