summaryrefslogtreecommitdiff
path: root/Source/WebCore/inspector/front-end/StyleSource.js
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/inspector/front-end/StyleSource.js')
-rw-r--r--Source/WebCore/inspector/front-end/StyleSource.js88
1 files changed, 0 insertions, 88 deletions
diff --git a/Source/WebCore/inspector/front-end/StyleSource.js b/Source/WebCore/inspector/front-end/StyleSource.js
index 6e3873a91..4d21f518a 100644
--- a/Source/WebCore/inspector/front-end/StyleSource.js
+++ b/Source/WebCore/inspector/front-end/StyleSource.js
@@ -28,94 +28,6 @@
/**
* @constructor
- * @extends {WebInspector.Object}
- * @implements {WebInspector.UISourceCodeProvider}
- * @implements {WebInspector.SourceMapping}
- */
-WebInspector.StylesUISourceCodeProvider = function()
-{
- /**
- * @type {Array.<WebInspector.UISourceCode>}
- */
- this._uiSourceCodes = [];
- this._uiSourceCodeForURL = {};
- WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, this._resourceAdded, this);
-}
-
-WebInspector.StylesUISourceCodeProvider.prototype = {
- /**
- * @return {Array.<WebInspector.UISourceCode>}
- */
- uiSourceCodes: function()
- {
- return this._uiSourceCodes;
- },
-
- /**
- * @param {WebInspector.RawLocation} rawLocation
- * @return {WebInspector.UILocation}
- */
- rawLocationToUILocation: function(rawLocation)
- {
- var location = /** @type WebInspector.CSSLocation */ rawLocation;
- var uiSourceCode = this._uiSourceCodeForURL[location.url];
- return new WebInspector.UILocation(uiSourceCode, location.lineNumber, 0);
- },
-
- /**
- * @param {WebInspector.UISourceCode} uiSourceCode
- * @param {number} lineNumber
- * @param {number} columnNumber
- * @return {WebInspector.RawLocation}
- */
- uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber)
- {
- return new WebInspector.CSSLocation(uiSourceCode.contentURL() || "", lineNumber);
- },
-
- _populate: function()
- {
- function populateFrame(frame)
- {
- for (var i = 0; i < frame.childFrames.length; ++i)
- populateFrame.call(this, frame.childFrames[i]);
-
- var resources = frame.resources();
- for (var i = 0; i < resources.length; ++i)
- this._resourceAdded({data:resources[i]});
- }
-
- populateFrame.call(this, WebInspector.resourceTreeModel.mainFrame);
- },
-
- /**
- * @param {WebInspector.Event} event
- */
- _resourceAdded: function(event)
- {
- var resource = /** @type {WebInspector.Resource} */ event.data;
- if (resource.type !== WebInspector.resourceTypes.Stylesheet)
- return;
- var uiSourceCode = new WebInspector.StyleSource(resource);
- this._uiSourceCodes.push(uiSourceCode);
- this._uiSourceCodeForURL[resource.url] = uiSourceCode;
- WebInspector.cssModel.setSourceMapping(resource.url, this);
- this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCode);
- },
-
- reset: function()
- {
- this._uiSourceCodes = [];
- this._uiSourceCodeForURL = {};
- WebInspector.cssModel.resetSourceMappings();
- this._populate();
- }
-}
-
-WebInspector.StylesUISourceCodeProvider.prototype.__proto__ = WebInspector.Object.prototype;
-
-/**
- * @constructor
* @extends {WebInspector.UISourceCode}
* @param {WebInspector.Resource} resource
*/