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

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

Issue 2769843003: DevTools: split text_utils out of common module (Closed)
Patch Set: rebaseline Created 3 years, 9 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/sdk/CSSRule.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSRule.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSRule.js
index 835d7d18356d634eac37c981ebcc3febe02f70d6..262a9ee1db1bea1f5986db2dc0daa7c232913140 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSRule.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSRule.js
@@ -11,7 +11,7 @@ SDK.CSSValue = class {
constructor(payload) {
this.text = payload.text;
if (payload.range)
- this.range = Common.TextRange.fromObject(payload.range);
+ this.range = TextUtils.TextRange.fromObject(payload.range);
}
/**
@@ -126,7 +126,7 @@ SDK.CSSStyleRule = class extends SDK.CSSRule {
selectorList: {
selectors: [{text: selectorText}],
},
- style: {styleSheetId: '0', range: new Common.TextRange(0, 0, 0, 0), shorthandEntries: [], cssProperties: []}
+ style: {styleSheetId: '0', range: new TextUtils.TextRange(0, 0, 0, 0), shorthandEntries: [], cssProperties: []}
};
return new SDK.CSSStyleRule(cssModel, /** @type {!Protocol.CSS.CSSRule} */ (dummyPayload));
}
@@ -163,14 +163,15 @@ SDK.CSSStyleRule = class extends SDK.CSSRule {
}
/**
- * @return {?Common.TextRange}
+ * @return {?TextUtils.TextRange}
*/
selectorRange() {
var firstRange = this.selectors[0].range;
if (!firstRange)
return null;
var lastRange = this.selectors.peekLast().range;
- return new Common.TextRange(firstRange.startLine, firstRange.startColumn, lastRange.endLine, lastRange.endColumn);
+ return new TextUtils.TextRange(
+ firstRange.startLine, firstRange.startColumn, lastRange.endLine, lastRange.endColumn);
}
/**

Powered by Google App Engine
This is Rietveld 408576698