[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

apavlov at chromium.org apavlov at chromium.org
Fri Jan 21 14:37:29 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 358ee0a8b9f3fe32a1983c9c8787ef87aef8f31a
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 23 11:12:09 2010 +0000

    2010-12-23  Alexander Pavlov  <apavlov at chromium.org>
    
            Reviewed by Joseph Pecoraro.
    
            Web Inspector: After scrolling new property value and cancelling, removed property remains active in page style
            https://bugs.webkit.org/show_bug.cgi?id=51390
    
            * inspector/front-end/StylesSidebarPane.js:
            (WebInspector.StylePropertyTreeElement.prototype):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74548 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 731e8ca..3b5ce3b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-23  Alexander Pavlov  <apavlov at chromium.org>
+
+        Reviewed by Joseph Pecoraro.
+
+        Web Inspector: After scrolling new property value and cancelling, removed property remains active in page style
+        https://bugs.webkit.org/show_bug.cgi?id=51390
+
+        * inspector/front-end/StylesSidebarPane.js:
+        (WebInspector.StylePropertyTreeElement.prototype):
+
 2010-12-23  Noel Gordon  <noel.gordon at gmail.com>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/inspector/front-end/StylesSidebarPane.js b/WebCore/inspector/front-end/StylesSidebarPane.js
index c89e452..8c50436 100644
--- a/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -1714,8 +1714,8 @@ WebInspector.StylePropertyTreeElement.prototype = {
         event.preventDefault();
 
         if (!("originalPropertyText" in this)) {
-            // Remember the rule's original CSS text, so it can be restored
-            // if the editing is canceled and before each apply.
+            // Remember the rule's original CSS text on [Page](Up|Down), so it can be restored
+            // if the editing is canceled.
             this.originalPropertyText = this.property.propertyText;
         }
 
@@ -1848,14 +1848,21 @@ WebInspector.StylePropertyTreeElement.prototype = {
         }
     },
 
+    _hasBeenAppliedToPageViaUpDown: function()
+    {
+        // New properties applied via up/down have an originalPropertyText and will be deleted later
+        // on, if cancelled, when the empty string gets applied as their style text.
+        return ("originalPropertyText" in this);
+    },
+
     applyStyleText: function(styleText, updateInterface)
     {
         var section = this.treeOutline.section;
         var elementsPanel = WebInspector.panels.elements;
         styleText = styleText.replace(/\s/g, " ").trim(); // Replace &nbsp; with whitespace.
         var styleTextLength = styleText.length;
-        if (!styleTextLength && updateInterface && this._newProperty) {
-            // The user deleted everything, so remove the tree element and update.
+        if (!styleTextLength && updateInterface && this._newProperty && !this._hasBeenAppliedToPageViaUpDown()) {
+            // The user deleted everything and never applied a new property value via Up/Down scrolling, so remove the tree element and update.
             this.parent.removeChild(this);
             section.afterUpdate();
             return;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list