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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSRule.js

Issue 2455943003: Backend for css rule tracking (Closed)
Patch Set: Backend for CSS Rule tracking. Created 4 years, 1 month 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 | « third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js ('k') | 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 WebInspector.CSSValue = class { 7 WebInspector.CSSValue = class {
8 /** 8 /**
9 * @param {!Protocol.CSS.Value} payload 9 * @param {!Protocol.CSS.Value} payload
10 */ 10 */
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 }; 94 };
95 95
96 /** 96 /**
97 * @unrestricted 97 * @unrestricted
98 */ 98 */
99 WebInspector.CSSStyleRule = class extends WebInspector.CSSRule { 99 WebInspector.CSSStyleRule = class extends WebInspector.CSSRule {
100 /** 100 /**
101 * @param {!WebInspector.CSSModel} cssModel 101 * @param {!WebInspector.CSSModel} cssModel
102 * @param {!Protocol.CSS.CSSRule} payload 102 * @param {!Protocol.CSS.CSSRule} payload
103 * @param {boolean=} wasUsed
103 */ 104 */
104 constructor(cssModel, payload) { 105 constructor(cssModel, payload, wasUsed) {
105 super(cssModel, payload); 106 super(cssModel, payload);
106 107
107 this._reinitializeSelectors(payload.selectorList); 108 this._reinitializeSelectors(payload.selectorList);
108 this.media = payload.media ? WebInspector.CSSMedia.parseMediaArrayPayload(cs sModel, payload.media) : []; 109 this.media = payload.media ? WebInspector.CSSMedia.parseMediaArrayPayload(cs sModel, payload.media) : [];
110 this.wasUsed = wasUsed || false;
109 } 111 }
110 112
111 /** 113 /**
112 * @param {!WebInspector.CSSModel} cssModel 114 * @param {!WebInspector.CSSModel} cssModel
113 * @param {string} selectorText 115 * @param {string} selectorText
114 * @return {!WebInspector.CSSStyleRule} 116 * @return {!WebInspector.CSSStyleRule}
115 */ 117 */
116 static createDummyRule(cssModel, selectorText) { 118 static createDummyRule(cssModel, selectorText) {
117 var dummyPayload = { 119 var dummyPayload = {
118 selectorList: { 120 selectorList: {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 setKeyText(newKeyText) { 293 setKeyText(newKeyText) {
292 var styleSheetId = this.styleSheetId; 294 var styleSheetId = this.styleSheetId;
293 if (!styleSheetId) 295 if (!styleSheetId)
294 throw 'No rule stylesheet id'; 296 throw 'No rule stylesheet id';
295 var range = this._keyText.range; 297 var range = this._keyText.range;
296 if (!range) 298 if (!range)
297 throw 'Keyframe key is not editable'; 299 throw 'Keyframe key is not editable';
298 return this._cssModel.setKeyframeKey(styleSheetId, range, newKeyText); 300 return this._cssModel.setKeyframeKey(styleSheetId, range, newKeyText);
299 } 301 }
300 }; 302 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698