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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.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
Index: third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js
index 49cb560acdc6cfcf0a820d99581a6e6968d0192a..7b550638cd7a36afc55b32b91db7dc79f90c9133 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/StylesSourceMapping.js
@@ -63,13 +63,14 @@ Bindings.StylesSourceMapping = class {
* @return {?Workspace.UILocation}
*/
rawLocationToUILocation(rawLocation) {
- var uiSourceCode =
- Bindings.NetworkProject.uiSourceCodeForStyleURL(this._workspace, rawLocation.url, rawLocation.header());
+ var header = rawLocation.header();
+ if (!header)
+ return null;
+ var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForStyleURL(this._workspace, rawLocation.url, header);
if (!uiSourceCode)
return null;
var lineNumber = rawLocation.lineNumber;
var columnNumber = rawLocation.columnNumber;
- var header = this._cssModel.styleSheetHeaderForId(rawLocation.styleSheetId);
if (header && header.isInline && header.hasSourceURL) {
lineNumber -= header.lineNumberInSource(0);
columnNumber -= header.columnNumberInSource(lineNumber, 0);

Powered by Google App Engine
This is Rietveld 408576698