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

Unified Diff: Source/devtools/front_end/bindings/CSSWorkspaceBinding.js

Issue 471433004: DevTools: Split out the "workspace" and "bindings" modules from "sdk" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove marker interfaces and WI.SourceMapping Created 6 years, 4 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: Source/devtools/front_end/bindings/CSSWorkspaceBinding.js
diff --git a/Source/devtools/front_end/sdk/CSSWorkspaceBinding.js b/Source/devtools/front_end/bindings/CSSWorkspaceBinding.js
similarity index 91%
rename from Source/devtools/front_end/sdk/CSSWorkspaceBinding.js
rename to Source/devtools/front_end/bindings/CSSWorkspaceBinding.js
index e32eae29e7ec6c9af5a6e864c10c57dd026ad72e..1146373a6aced923bea94a277091ece8bae97dab 100644
--- a/Source/devtools/front_end/sdk/CSSWorkspaceBinding.js
+++ b/Source/devtools/front_end/bindings/CSSWorkspaceBinding.js
@@ -34,7 +34,7 @@ WebInspector.CSSWorkspaceBinding.prototype = {
/**
* @param {!WebInspector.CSSStyleSheetHeader} header
- * @param {!WebInspector.SourceMapping} mapping
+ * @param {!WebInspector.CSSSourceMapping} mapping
*/
pushSourceMapping: function(header, mapping)
{
@@ -250,7 +250,7 @@ WebInspector.CSSWorkspaceBinding.HeaderInfo = function(header)
{
this._header = header;
- /** @type {!Array.<!WebInspector.SourceMapping>} */
+ /** @type {!Array.<!WebInspector.CSSSourceMapping>} */
this._sourceMappings = [];
/** @type {!Set.<!WebInspector.LiveLocation>} */
@@ -297,7 +297,7 @@ WebInspector.CSSWorkspaceBinding.HeaderInfo.prototype = {
},
/**
- * @param {!WebInspector.SourceMapping} sourceMapping
+ * @param {!WebInspector.CSSSourceMapping} sourceMapping
*/
_pushSourceMapping: function(sourceMapping)
{
@@ -316,8 +316,9 @@ WebInspector.CSSWorkspaceBinding.HeaderInfo.prototype = {
*/
WebInspector.CSSWorkspaceBinding.LiveLocation = function(cssModel, header, rawLocation, updateDelegate)
{
- WebInspector.LiveLocation.call(this, rawLocation, updateDelegate);
+ WebInspector.LiveLocation.call(this, updateDelegate);
this._cssModel = cssModel;
+ this._rawLocation = rawLocation;
if (!header)
this._clearStyleSheet();
else
@@ -332,7 +333,7 @@ WebInspector.CSSWorkspaceBinding.LiveLocation.prototype = {
{
console.assert(!this._header);
var header = /** @type {!WebInspector.CSSStyleSheetHeader} */ (event.data);
- if (header.sourceURL && header.sourceURL === this.rawLocation().url)
+ if (header.sourceURL && header.sourceURL === this._rawLocation.url)
this._setStyleSheet(header);
},
@@ -372,7 +373,7 @@ WebInspector.CSSWorkspaceBinding.LiveLocation.prototype = {
*/
uiLocation: function()
{
- var cssLocation = /** @type WebInspector.CSSLocation */ (this.rawLocation());
+ var cssLocation = this._rawLocation;
if (this._header) {
var headerInfo = WebInspector.cssWorkspaceBinding._headerInfo(this._header);
return headerInfo._rawLocationToUILocation(cssLocation.lineNumber, cssLocation.columnNumber);
@@ -396,6 +397,41 @@ WebInspector.CSSWorkspaceBinding.LiveLocation.prototype = {
}
/**
+ * @interface
+ */
+WebInspector.CSSSourceMapping = function()
+{
+}
+
+WebInspector.CSSSourceMapping.prototype = {
+ /**
+ * @param {!WebInspector.CSSLocation} rawLocation
+ * @return {?WebInspector.UILocation}
+ */
+ rawLocationToUILocation: function(rawLocation) { },
+
+ /**
+ * @param {!WebInspector.UISourceCode} uiSourceCode
+ * @param {number} lineNumber
+ * @param {number} columnNumber
+ * @return {?WebInspector.CSSLocation}
+ */
+ uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber) { },
+
+ /**
+ * @return {boolean}
+ */
+ isIdentity: function() { },
+
+ /**
+ * @param {!WebInspector.UISourceCode} uiSourceCode
+ * @param {number} lineNumber
+ * @return {boolean}
+ */
+ uiLineHasMapping: function(uiSourceCode, lineNumber) { }
+}
+
+/**
* @type {!WebInspector.CSSWorkspaceBinding}
*/
WebInspector.cssWorkspaceBinding;
« no previous file with comments | « Source/devtools/front_end/bindings/BreakpointManager.js ('k') | Source/devtools/front_end/bindings/CompilerScriptMapping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698