Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 | 92 |
| 93 // Common IE-specific property prefix. | 93 // Common IE-specific property prefix. |
| 94 if (name.startsWith("scrollbar-")) | 94 if (name.startsWith("scrollbar-")) |
| 95 return true; | 95 return true; |
| 96 if (hasUnknownVendorPrefix(name)) | 96 if (hasUnknownVendorPrefix(name)) |
| 97 return true; | 97 return true; |
| 98 | 98 |
| 99 var value = property.value.toLowerCase(); | 99 var value = property.value.toLowerCase(); |
| 100 | 100 |
| 101 // IE hack. | 101 // IE hack. |
| 102 if (value.endsWith("\9")) | 102 if (value.endsWith("\\9")) |
|
dgozman
2016/10/26 00:31:01
Unrelated.
| |
| 103 return true; | 103 return true; |
| 104 if (hasUnknownVendorPrefix(value)) | 104 if (hasUnknownVendorPrefix(value)) |
| 105 return true; | 105 return true; |
| 106 | 106 |
| 107 return false; | 107 return false; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 WebInspector.StylesSidebarPane.prototype = { | 110 WebInspector.StylesSidebarPane.prototype = { |
| 111 /** | 111 /** |
| 112 * @param {!WebInspector.Event} event | 112 * @param {!WebInspector.Event} event |
| (...skipping 2758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2871 /** | 2871 /** |
| 2872 * @constructor | 2872 * @constructor |
| 2873 * @extends {WebInspector.TextPrompt} | 2873 * @extends {WebInspector.TextPrompt} |
| 2874 * @param {!Array<string>} cssCompletions | 2874 * @param {!Array<string>} cssCompletions |
| 2875 * @param {!WebInspector.StylePropertyTreeElement} treeElement | 2875 * @param {!WebInspector.StylePropertyTreeElement} treeElement |
| 2876 * @param {boolean} isEditingName | 2876 * @param {boolean} isEditingName |
| 2877 */ | 2877 */ |
| 2878 WebInspector.StylesSidebarPane.CSSPropertyPrompt = function(cssCompletions, tree Element, isEditingName) | 2878 WebInspector.StylesSidebarPane.CSSPropertyPrompt = function(cssCompletions, tree Element, isEditingName) |
| 2879 { | 2879 { |
| 2880 // Use the same callback both for applyItemCallback and acceptItemCallback. | 2880 // Use the same callback both for applyItemCallback and acceptItemCallback. |
| 2881 WebInspector.TextPrompt.call(this, this._buildPropertyCompletions.bind(this) , WebInspector.StyleValueDelimiters); | 2881 WebInspector.TextPrompt.call(this); |
| 2882 this.initialize(this._buildPropertyCompletions.bind(this), WebInspector.Styl eValueDelimiters); | |
| 2882 this.setSuggestBoxEnabled(true); | 2883 this.setSuggestBoxEnabled(true); |
| 2883 this._cssCompletions = cssCompletions; | 2884 this._cssCompletions = cssCompletions; |
| 2884 this._treeElement = treeElement; | 2885 this._treeElement = treeElement; |
| 2885 this._isEditingName = isEditingName; | 2886 this._isEditingName = isEditingName; |
| 2886 | 2887 |
| 2887 if (!isEditingName) { | 2888 if (!isEditingName) { |
| 2888 this.disableDefaultSuggestionForEmptyInput(); | 2889 this.disableDefaultSuggestionForEmptyInput(); |
| 2889 | 2890 |
| 2890 // If a CSS value is being edited that has a numeric or hex substring, h int that precision modifier shortcuts are available. | 2891 // If a CSS value is being edited that has a numeric or hex substring, h int that precision modifier shortcuts are available. |
| 2891 if (treeElement && treeElement.valueElement) { | 2892 if (treeElement && treeElement.valueElement) { |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3187 | 3188 |
| 3188 /** | 3189 /** |
| 3189 * @override | 3190 * @override |
| 3190 * @return {!WebInspector.ToolbarItem} | 3191 * @return {!WebInspector.ToolbarItem} |
| 3191 */ | 3192 */ |
| 3192 item: function() | 3193 item: function() |
| 3193 { | 3194 { |
| 3194 return this._button; | 3195 return this._button; |
| 3195 } | 3196 } |
| 3196 }; | 3197 }; |
| OLD | NEW |