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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1106 return; | 1106 return; |
| 1107 | 1107 |
| 1108 this._mediaListElement.classList.toggle('media-matches', this._matchedStyles .mediaMatches(this._style)); | 1108 this._mediaListElement.classList.toggle('media-matches', this._matchedStyles .mediaMatches(this._style)); |
| 1109 | 1109 |
| 1110 var selectorTexts = rule.selectors.map(selector => selector.text); | 1110 var selectorTexts = rule.selectors.map(selector => selector.text); |
| 1111 var matchingSelectorIndexes = this._matchedStyles.matchingSelectors(/** @typ e {!SDK.CSSStyleRule} */ (rule)); | 1111 var matchingSelectorIndexes = this._matchedStyles.matchingSelectors(/** @typ e {!SDK.CSSStyleRule} */ (rule)); |
| 1112 var matchingSelectors = new Array(selectorTexts.length).fill(false); | 1112 var matchingSelectors = new Array(selectorTexts.length).fill(false); |
| 1113 for (var matchingIndex of matchingSelectorIndexes) | 1113 for (var matchingIndex of matchingSelectorIndexes) |
| 1114 matchingSelectors[matchingIndex] = true; | 1114 matchingSelectors[matchingIndex] = true; |
| 1115 | 1115 |
| 1116 if (this._parentPane._isEditingStyle) | |
|
lushnikov
2016/12/05 22:22:09
should this check be in the very beginning of the
allada
2016/12/05 22:40:12
No, the code above this mostly affects non-selecto
| |
| 1117 return; | |
| 1118 | |
| 1116 var fragment = this._hoverableSelectorsMode ? this._renderHoverableSelectors (selectorTexts, matchingSelectors) : | 1119 var fragment = this._hoverableSelectorsMode ? this._renderHoverableSelectors (selectorTexts, matchingSelectors) : |
| 1117 this._renderSimplifiedSelector s(selectorTexts, matchingSelectors); | 1120 this._renderSimplifiedSelector s(selectorTexts, matchingSelectors); |
| 1118 this._selectorElement.removeChildren(); | 1121 this._selectorElement.removeChildren(); |
| 1119 this._selectorElement.appendChild(fragment); | 1122 this._selectorElement.appendChild(fragment); |
| 1120 this._markSelectorHighlights(); | 1123 this._markSelectorHighlights(); |
| 1121 } | 1124 } |
| 1122 | 1125 |
| 1123 /** | 1126 /** |
| 1124 * @param {!Array<string>} selectors | 1127 * @param {!Array<string>} selectors |
| 1125 * @param {!Array<boolean>} matchingSelectors | 1128 * @param {!Array<boolean>} matchingSelectors |
| (...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3044 } | 3047 } |
| 3045 | 3048 |
| 3046 /** | 3049 /** |
| 3047 * @override | 3050 * @override |
| 3048 * @return {!UI.ToolbarItem} | 3051 * @return {!UI.ToolbarItem} |
| 3049 */ | 3052 */ |
| 3050 item() { | 3053 item() { |
| 3051 return this._button; | 3054 return this._button; |
| 3052 } | 3055 } |
| 3053 }; | 3056 }; |
| OLD | NEW |