| 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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 | 1104 |
| 1105 _markSelectorMatches() { | 1105 _markSelectorMatches() { |
| 1106 var rule = this._style.parentRule; | 1106 var rule = this._style.parentRule; |
| 1107 if (!rule) | 1107 if (!rule) |
| 1108 return; | 1108 return; |
| 1109 | 1109 |
| 1110 this._mediaListElement.classList.toggle('media-matches', this._matchedStyles
.mediaMatches(this._style)); | 1110 this._mediaListElement.classList.toggle('media-matches', this._matchedStyles
.mediaMatches(this._style)); |
| 1111 | 1111 |
| 1112 var selectorTexts = rule.selectors.map(selector => selector.text); | 1112 var selectorTexts = rule.selectors.map(selector => selector.text); |
| 1113 var matchingSelectorIndexes = this._matchedStyles.matchingSelectors(/** @typ
e {!SDK.CSSStyleRule} */ (rule)); | 1113 var matchingSelectorIndexes = this._matchedStyles.matchingSelectors(/** @typ
e {!SDK.CSSStyleRule} */ (rule)); |
| 1114 var matchingSelectors = new Array(selectorTexts.length).fill(false); | 1114 var matchingSelectors = /** @type {!Array<boolean>} */ (new Array(selectorTe
xts.length).fill(false)); |
| 1115 for (var matchingIndex of matchingSelectorIndexes) | 1115 for (var matchingIndex of matchingSelectorIndexes) |
| 1116 matchingSelectors[matchingIndex] = true; | 1116 matchingSelectors[matchingIndex] = true; |
| 1117 | 1117 |
| 1118 if (this._parentPane._isEditingStyle) | 1118 if (this._parentPane._isEditingStyle) |
| 1119 return; | 1119 return; |
| 1120 | 1120 |
| 1121 var fragment = this._hoverableSelectorsMode ? this._renderHoverableSelectors
(selectorTexts, matchingSelectors) : | 1121 var fragment = this._hoverableSelectorsMode ? this._renderHoverableSelectors
(selectorTexts, matchingSelectors) : |
| 1122 this._renderSimplifiedSelector
s(selectorTexts, matchingSelectors); | 1122 this._renderSimplifiedSelector
s(selectorTexts, matchingSelectors); |
| 1123 this._selectorElement.removeChildren(); | 1123 this._selectorElement.removeChildren(); |
| 1124 this._selectorElement.appendChild(fragment); | 1124 this._selectorElement.appendChild(fragment); |
| (...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3049 } | 3049 } |
| 3050 | 3050 |
| 3051 /** | 3051 /** |
| 3052 * @override | 3052 * @override |
| 3053 * @return {!UI.ToolbarItem} | 3053 * @return {!UI.ToolbarItem} |
| 3054 */ | 3054 */ |
| 3055 item() { | 3055 item() { |
| 3056 return this._button; | 3056 return this._button; |
| 3057 } | 3057 } |
| 3058 }; | 3058 }; |
| OLD | NEW |