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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js

Issue 2693383003: [DevTools] Refactor CSS live locations. (Closed)
Patch Set: rebased Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
index 25421fcfd9d585865a6d8e0982eb98e5f7f86814..c9a0323e28d122f0c4d4dc63a0e7451e57074d30 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
@@ -1036,7 +1036,7 @@ SDK.CSSLocation = class {
* @param {number=} columnNumber
*/
constructor(header, lineNumber, columnNumber) {
- this._header = header;
+ this._cssModel = header.cssModel();
this.styleSheetId = header.id;
this.url = header.resourceURL();
this.lineNumber = lineNumber;
@@ -1047,14 +1047,14 @@ SDK.CSSLocation = class {
* @return {!SDK.CSSModel}
*/
cssModel() {
- return this._header.cssModel();
+ return this._cssModel;
}
/**
- * @return {!SDK.CSSStyleSheetHeader}
+ * @return {?SDK.CSSStyleSheetHeader}
*/
header() {
- return this._header;
+ return this._cssModel.styleSheetHeaderForId(this.styleSheetId);
}
};
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698