Changeset 76941 in webkit
- Timestamp:
- Jan 28, 2011 7:07:09 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76936 r76941 1 2011-01-28 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword 6 https://bugs.webkit.org/show_bug.cgi?id=53295 7 8 Select the current word suffix before switching to the next suggestion. 9 10 * inspector/front-end/StylesSidebarPane.js: 11 (): 12 1 13 2011-01-28 Alejandro G. Castro <alex@igalia.com> 2 14 -
trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js
r76913 r76941 1930 1930 if (this.autoCompleteElement) 1931 1931 this.complete(false, reverse); // Accept the current suggestion, if any. 1932 else { 1933 // Select the word suffix to affect it when computing the subsequent suggestion. 1934 this._selectCurrentWordSuffix(); 1935 } 1936 1932 1937 this.complete(false, reverse); // Actually increment/decrement the suggestion. 1933 1938 event.handled = true; 1939 }, 1940 1941 _selectCurrentWordSuffix: function() 1942 { 1943 var selection = window.getSelection(); 1944 if (!selection.rangeCount) 1945 return; 1946 1947 var selectionRange = selection.getRangeAt(0); 1948 if (!selectionRange.commonAncestorContainer.isDescendant(this.element)) 1949 return; 1950 var wordSuffixRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, WebInspector.StylesSidebarPane.StyleValueDelimiters, this.element, "forward"); 1951 if (!wordSuffixRange.toString()) 1952 return; 1953 selection.removeAllRanges(); 1954 selection.addRange(wordSuffixRange); 1934 1955 }, 1935 1956
Note: See TracChangeset
for help on using the changeset viewer.