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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2551323002: [Devtools] Fixes pressing CTRL in styles while editing deselects (Closed)
Patch Set: Created 4 years 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 };
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