Diff
Modified: trunk/Source/WebCore/ChangeLog (126978 => 126979)
--- trunk/Source/WebCore/ChangeLog 2012-08-29 10:27:08 UTC (rev 126978)
+++ trunk/Source/WebCore/ChangeLog 2012-08-29 10:31:25 UTC (rev 126979)
@@ -1,3 +1,25 @@
+2012-08-29 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Extract StylesUISourceCodeProvider to separate file.
+ https://bugs.webkit.org/show_bug.cgi?id=95319
+
+ Reviewed by Alexander Pavlov.
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj: Also added WebGLProfiler files forgotten before.
+ * inspector/compile-front-end.py:
+ * inspector/front-end/StyleSource.js:
+ * inspector/front-end/StylesUISourceCodeProvider.js: Copied from Source/WebCore/inspector/front-end/StyleSource.js.
+ (WebInspector.StylesUISourceCodeProvider):
+ (WebInspector.StylesUISourceCodeProvider.prototype.uiSourceCodes):
+ (WebInspector.StylesUISourceCodeProvider.prototype.rawLocationToUILocation):
+ (WebInspector.StylesUISourceCodeProvider.prototype.uiLocationToRawLocation):
+ (WebInspector.StylesUISourceCodeProvider.prototype._populate):
+ (WebInspector.StylesUISourceCodeProvider.prototype._resourceAdded):
+ (WebInspector.StylesUISourceCodeProvider.prototype.reset):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
2012-08-29 Philip Rogers <[email protected]>
Use SVGImage instead of cached image when drawing without a render tree.
Modified: trunk/Source/WebCore/WebCore.gypi (126978 => 126979)
--- trunk/Source/WebCore/WebCore.gypi 2012-08-29 10:27:08 UTC (rev 126978)
+++ trunk/Source/WebCore/WebCore.gypi 2012-08-29 10:31:25 UTC (rev 126979)
@@ -6391,6 +6391,7 @@
'inspector/front-end/SplitView.js',
'inspector/front-end/StatusBarButton.js',
'inspector/front-end/StyleSource.js',
+ 'inspector/front-end/StylesUISourceCodeProvider.js',
'inspector/front-end/TabbedPane.js',
'inspector/front-end/TestController.js',
'inspector/front-end/TextEditor.js',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (126978 => 126979)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-08-29 10:27:08 UTC (rev 126978)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-08-29 10:31:25 UTC (rev 126979)
@@ -76598,6 +76598,10 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\StylesUISourceCodeProvider.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\StyleSource.js"
>
</File>
@@ -76726,6 +76730,14 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\webGLProfiler.css"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\WebGLProfileView.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\WorkersSidebarPane.js"
>
</File>
Modified: trunk/Source/WebCore/inspector/compile-front-end.py (126978 => 126979)
--- trunk/Source/WebCore/inspector/compile-front-end.py 2012-08-29 10:27:08 UTC (rev 126978)
+++ trunk/Source/WebCore/inspector/compile-front-end.py 2012-08-29 10:31:25 UTC (rev 126979)
@@ -90,6 +90,7 @@
"SnippetStorage.js",
"SourceMapping.js",
"StyleSource.js",
+ "StylesUISourceCodeProvider.js",
"TimelineManager.js",
"RawSourceCode.js",
"RemoteObject.js",
Modified: trunk/Source/WebCore/inspector/front-end/StyleSource.js (126978 => 126979)
--- trunk/Source/WebCore/inspector/front-end/StyleSource.js 2012-08-29 10:27:08 UTC (rev 126978)
+++ trunk/Source/WebCore/inspector/front-end/StyleSource.js 2012-08-29 10:31:25 UTC (rev 126979)
@@ -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
*/
Copied: trunk/Source/WebCore/inspector/front-end/StylesUISourceCodeProvider.js (from rev 126977, trunk/Source/WebCore/inspector/front-end/StyleSource.js) (0 => 126979)
--- trunk/Source/WebCore/inspector/front-end/StylesUISourceCodeProvider.js (rev 0)
+++ trunk/Source/WebCore/inspector/front-end/StylesUISourceCodeProvider.js 2012-08-29 10:31:25 UTC (rev 126979)
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @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;
Modified: trunk/Source/WebCore/inspector/front-end/WebKit.qrc (126978 => 126979)
--- trunk/Source/WebCore/inspector/front-end/WebKit.qrc 2012-08-29 10:27:08 UTC (rev 126978)
+++ trunk/Source/WebCore/inspector/front-end/WebKit.qrc 2012-08-29 10:31:25 UTC (rev 126979)
@@ -180,6 +180,7 @@
<file>StatusBarButton.js</file>
<file>StyleSheetOutlineDialog.js</file>
<file>StyleSource.js</file>
+ <file>StylesUISourceCodeProvider.js</file>
<file>StylesSidebarPane.js</file>
<file>TabbedEditorContainer.js</file>
<file>TabbedPane.js</file>
Modified: trunk/Source/WebCore/inspector/front-end/inspector.html (126978 => 126979)
--- trunk/Source/WebCore/inspector/front-end/inspector.html 2012-08-29 10:27:08 UTC (rev 126978)
+++ trunk/Source/WebCore/inspector/front-end/inspector.html 2012-08-29 10:31:25 UTC (rev 126979)
@@ -161,6 +161,7 @@
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
+ <script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""
<script type="text/_javascript_" src=""