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

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

Issue 2455943003: Backend for css rule tracking (Closed)
Patch Set: 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
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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!CSSAgent.Value} payload 7 * @param {!CSSAgent.Value} payload
8 */ 8 */
9 WebInspector.CSSValue = function(payload) 9 WebInspector.CSSValue = function(payload)
10 { 10 {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 { 96 {
97 return this.origin === CSSAgent.StyleSheetOrigin.Regular; 97 return this.origin === CSSAgent.StyleSheetOrigin.Regular;
98 } 98 }
99 }; 99 };
100 100
101 /** 101 /**
102 * @constructor 102 * @constructor
103 * @extends {WebInspector.CSSRule} 103 * @extends {WebInspector.CSSRule}
104 * @param {!WebInspector.CSSModel} cssModel 104 * @param {!WebInspector.CSSModel} cssModel
105 * @param {!CSSAgent.CSSRule} payload 105 * @param {!CSSAgent.CSSRule} payload
106 * @param {boolean=} status
caseq 2016/10/27 20:59:56 s/status/wasUsed/
valih 2016/10/27 21:41:17 Done.
106 */ 107 */
107 WebInspector.CSSStyleRule = function(cssModel, payload) 108 WebInspector.CSSStyleRule = function(cssModel, payload, status)
108 { 109 {
109 WebInspector.CSSRule.call(this, cssModel, payload); 110 WebInspector.CSSRule.call(this, cssModel, payload);
110 111
111 this._reinitializeSelectors(payload.selectorList); 112 this._reinitializeSelectors(payload.selectorList);
112 this.media = payload.media ? WebInspector.CSSMedia.parseMediaArrayPayload(cs sModel, payload.media) : []; 113 this.media = payload.media ? WebInspector.CSSMedia.parseMediaArrayPayload(cs sModel, payload.media) : [];
114 this.wasUsed = status;
113 }; 115 };
114 116
115 /** 117 /**
116 * @param {!WebInspector.CSSModel} cssModel 118 * @param {!WebInspector.CSSModel} cssModel
117 * @param {string} selectorText 119 * @param {string} selectorText
118 * @return {!WebInspector.CSSStyleRule} 120 * @return {!WebInspector.CSSStyleRule}
119 */ 121 */
120 WebInspector.CSSStyleRule.createDummyRule = function(cssModel, selectorText) 122 WebInspector.CSSStyleRule.createDummyRule = function(cssModel, selectorText)
121 { 123 {
122 var dummyPayload = { 124 var dummyPayload = {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if (!styleSheetId) 317 if (!styleSheetId)
316 throw "No rule stylesheet id"; 318 throw "No rule stylesheet id";
317 var range = this._keyText.range; 319 var range = this._keyText.range;
318 if (!range) 320 if (!range)
319 throw "Keyframe key is not editable"; 321 throw "Keyframe key is not editable";
320 return this._cssModel.setKeyframeKey(styleSheetId, range, newKeyText); 322 return this._cssModel.setKeyframeKey(styleSheetId, range, newKeyText);
321 }, 323 },
322 324
323 __proto__: WebInspector.CSSRule.prototype 325 __proto__: WebInspector.CSSRule.prototype
324 }; 326 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698