Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Side by Side Diff: Source/WebCore/inspector/front-end/StylesSidebarPane.js

Issue 6793043: Merge 80710 - 2011-03-09 Alexander Pavlov <apavlov@chromium.org> Reviewed by Pavel Feldm... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/696/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 var wordSuffixRange = selectionRange.startContainer.rangeOfWord(selectio nRange.startOffset, WebInspector.StylesSidebarPane.StyleValueDelimiters, this.el ement, "forward"); 1957 var wordSuffixRange = selectionRange.startContainer.rangeOfWord(selectio nRange.startOffset, WebInspector.StylesSidebarPane.StyleValueDelimiters, this.el ement, "forward");
1958 if (!wordSuffixRange.toString()) 1958 if (!wordSuffixRange.toString())
1959 return; 1959 return;
1960 selection.removeAllRanges(); 1960 selection.removeAllRanges();
1961 selection.addRange(wordSuffixRange); 1961 selection.addRange(wordSuffixRange);
1962 }, 1962 },
1963 1963
1964 _buildPropertyCompletions: function(wordRange, bestMatchOnly, completionsRea dyCallback) 1964 _buildPropertyCompletions: function(wordRange, bestMatchOnly, completionsRea dyCallback)
1965 { 1965 {
1966 var prefix = wordRange.toString().toLowerCase(); 1966 var prefix = wordRange.toString().toLowerCase();
1967 if (!prefix && bestMatchOnly)
1968 return;
1969
1967 var results; 1970 var results;
1968 if (bestMatchOnly) { 1971 if (bestMatchOnly) {
1969 results = []; 1972 results = [];
1970 var firstMatch = this._cssCompletions.firstStartsWith(prefix); 1973 var firstMatch = this._cssCompletions.firstStartsWith(prefix);
1971 if (firstMatch) 1974 if (firstMatch)
1972 results.push(firstMatch); 1975 results.push(firstMatch);
1973 return completionsReadyCallback(results); 1976 return completionsReadyCallback(results);
1974 } 1977 }
1975 1978
1976 results = this._cssCompletions.startsWith(prefix); 1979 results = this._cssCompletions.startsWith(prefix);
1977 if (results) 1980 if (results)
1978 completionsReadyCallback(results); 1981 completionsReadyCallback(results);
1979 } 1982 }
1980 } 1983 }
1981 1984
1982 WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype.__proto__ = WebInspec tor.TextPrompt.prototype; 1985 WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype.__proto__ = WebInspec tor.TextPrompt.prototype;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698