Changeset 116619 in webkit


Ignore:
Timestamp:
May 10, 2012 12:48:10 AM (12 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: Autocomplete for CSS property values in the Styles pane behaving incorrectly
https://bugs.webkit.org/show_bug.cgi?id=85784

Reviewed by Vsevolod Vlasov.

Before executing the number increment/decrement within CSS property value, the current word is checked
for being a valid suggestion for the current property, and if it is, the numeric change is skipped
in favor of the suggested property value switch by a suggest box.

  • inspector/front-end/StylesSidebarPane.js:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116618 r116619  
     12012-05-10  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: Autocomplete for CSS property values in the Styles pane behaving incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=85784
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        Before executing the number increment/decrement within CSS property value, the current word is checked
     9        for being a valid suggestion for the current property, and if it is, the numeric change is skipped
     10        in favor of the suggested property value switch by a suggest box.
     11
     12        * inspector/front-end/StylesSidebarPane.js:
     13
    1142012-05-10  Abhishek Arya  <inferno@chromium.org>
    215
  • trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js

    r114637 r116619  
    25622562        var wordRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, WebInspector.StylesSidebarPane.StyleValueDelimiters, this._sidebarPane.valueElement);
    25632563        var wordString = wordRange.toString();
     2564        if (this._isValueSuggestion(wordString))
     2565            return false;
     2566
    25642567        var replacementString;
    25652568        var prefix, suffix, number;
     
    26122615    },
    26132616
     2617    _isValueSuggestion: function(word)
     2618    {
     2619        if (!word)
     2620            return false;
     2621        word = word.toLowerCase();
     2622        return this._cssCompletions.keySet().hasOwnProperty(word);
     2623    },
     2624
    26142625    _buildPropertyCompletions: function(textPrompt, wordRange, force, completionsReadyCallback)
    26152626    {
Note: See TracChangeset for help on using the changeset viewer.