Title: [116619] trunk/Source/WebCore
- Revision
- 116619
- Author
- apav...@chromium.org
- Date
- 2012-05-10 00:48:10 -0700 (Thu, 10 May 2012)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (116618 => 116619)
--- trunk/Source/WebCore/ChangeLog 2012-05-10 07:42:03 UTC (rev 116618)
+++ trunk/Source/WebCore/ChangeLog 2012-05-10 07:48:10 UTC (rev 116619)
@@ -1,3 +1,16 @@
+2012-05-10 Alexander Pavlov <apav...@chromium.org>
+
+ 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:
+
2012-05-10 Abhishek Arya <infe...@chromium.org>
Make DOMCharacterDataModified a scoped event (similar to r73690).
Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (116618 => 116619)
--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-05-10 07:42:03 UTC (rev 116618)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js 2012-05-10 07:48:10 UTC (rev 116619)
@@ -2561,6 +2561,9 @@
var wordRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, WebInspector.StylesSidebarPane.StyleValueDelimiters, this._sidebarPane.valueElement);
var wordString = wordRange.toString();
+ if (this._isValueSuggestion(wordString))
+ return false;
+
var replacementString;
var prefix, suffix, number;
@@ -2611,6 +2614,14 @@
return false;
},
+ _isValueSuggestion: function(word)
+ {
+ if (!word)
+ return false;
+ word = word.toLowerCase();
+ return this._cssCompletions.keySet().hasOwnProperty(word);
+ },
+
_buildPropertyCompletions: function(textPrompt, wordRange, force, completionsReadyCallback)
{
var prefix = wordRange.toString().toLowerCase();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes