Changeset 109745 in webkit


Ignore:
Timestamp:
Mar 5, 2012 7:35:13 AM (12 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: [Styles] Tabbing an empty new property in the middle of style moves the editor to the next section
https://bugs.webkit.org/show_bug.cgi?id=80264

Reviewed by Pavel Feldman.

  • inspector/front-end/StylesSidebarPane.js:

(WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection.alreadyNew):
(WebInspector.StylePropertyTreeElement.prototype):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109744 r109745  
     12012-03-05  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: [Styles] Tabbing an empty new property in the middle of style moves the editor to the next section
     4        https://bugs.webkit.org/show_bug.cgi?id=80264
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/front-end/StylesSidebarPane.js:
     9        (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection.alreadyNew):
     10        (WebInspector.StylePropertyTreeElement.prototype):
     11
    1122012-03-05  Rob Buis  <rbuis@rim.com>
    213
  • trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js

    r109545 r109745  
    22832283
    22842284        // Make the Changes and trigger the moveToNextCallback after updating.
     2285        var moveToIndex = moveTo && this.treeOutline ? this.treeOutline.children.indexOf(moveTo) : -1;
    22852286        var blankInput = /^\s*$/.test(userInput);
    22862287        var isDataPasted = "originalName" in context;
     
    23052306        }
    23062307
    2307         var moveToIndex = moveTo && this.treeOutline ? this.treeOutline.children.indexOf(moveTo) : -1;
    2308 
    23092308        // The Callback to start editing the next/previous property/selector.
    23102309        function moveToNextCallback(alreadyNew, valueChanged, section)
     
    23302329                    var treeElement = moveToIndex >= 0 ? propertyElements[moveToIndex] : null;
    23312330                    if (treeElement) {
    2332                         treeElement.startEditing(!isEditingName ? treeElement.nameElement : treeElement.valueElement);
     2331                        var elementToEdit = !isEditingName ? treeElement.nameElement : treeElement.valueElement;
     2332                        if (alreadyNew && blankInput)
     2333                            elementToEdit = moveDirection === "forward" ? treeElement.nameElement : treeElement.valueElement;
     2334                        treeElement.startEditing(elementToEdit);
    23332335                        return;
    23342336                    } else if (!alreadyNew)
Note: See TracChangeset for help on using the changeset viewer.