Web Inspector: load source maps via front-end host.
authorpodivilov@chromium.org <podivilov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 09:19:35 +0000 (09:19 +0000)
committerpodivilov@chromium.org <podivilov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Nov 2011 09:19:35 +0000 (09:19 +0000)
commit7a80c0bddd7f23ef744f78cd6f5332c08110315e
treee99387e8330ab4a1509efef45d185c1519c14a11
parent1ba7daf83005057170ac721eb3e6a68c11b4fd03
Web Inspector: load source maps via front-end host.
https://bugs.webkit.org/show_bug.cgi?id=71301

Reviewed by Yury Semikhatsky.

Source/WebCore:

Currently we use an auxiliary iframe hack to load source map files from inspector page. This approach has several drawbacks:
 - in addition to source map url we need to know auxiliary iframe url
 - we need a protocol to communicate with iframe
 - source map provider needs to provide auxiliary document to make our hack work
Loading source maps from front-end host solves all problems.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMapping):
(WebInspector.ClosureCompilerSourceMapping.prototype.load):
(WebInspector.ClosureCompilerSourceMapping.prototype.loadSourceCode):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseMappingPayload):
* inspector/front-end/CompilerSourceMappingProvider.js: Removed.
* inspector/front-end/ContentProviders.js:
(WebInspector.CompilerSourceMappingContentProvider):
(WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode.prototype.setCompilerSourceMapping):
(WebInspector.RawSourceCode.prototype._resourceFinished):
(WebInspector.RawSourceCode.prototype._createSourceMapping.didLoadSourceMapping):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector.installSourceMappingForTest):

LayoutTests:

* http/tests/inspector/compiler-source-mapping-provider-expected.txt: Removed.
* http/tests/inspector/compiler-source-mapping-provider.html: Removed.
* http/tests/inspector/resources/compiler-source-mapping-provider/app-map.html: Removed.
* http/tests/inspector/resources/source-map.json: Renamed from LayoutTests/http/tests/inspector/resources/compiler-source-mapping-provider/app-map.
* http/tests/inspector/resources/source1.js: Renamed from LayoutTests/http/tests/inspector/resources/compiler-source-mapping-provider/app.js.
(window.onload):
(handleClick):
* http/tests/inspector/resources/source2.js: Renamed from LayoutTests/http/tests/inspector/resources/compiler-source-mapping-provider/foo.js.
(ClickHandler):
(ClickHandler.prototype.handle):
* inspector/debugger/compiler-source-mapping.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/compiler-source-mapping-provider-expected.txt [deleted file]
LayoutTests/http/tests/inspector/compiler-source-mapping-provider.html [deleted file]
LayoutTests/http/tests/inspector/resources/compiler-source-mapping-provider/app-map.html [deleted file]
LayoutTests/http/tests/inspector/resources/source-map.json [moved from LayoutTests/http/tests/inspector/resources/compiler-source-mapping-provider/app-map with 94% similarity]
LayoutTests/http/tests/inspector/resources/source1.js [moved from LayoutTests/http/tests/inspector/resources/compiler-source-mapping-provider/app.js with 100% similarity]
LayoutTests/http/tests/inspector/resources/source2.js [moved from LayoutTests/http/tests/inspector/resources/compiler-source-mapping-provider/foo.js with 100% similarity]
LayoutTests/inspector/debugger/compiler-source-mapping.html [deleted file]
LayoutTests/inspector/debugger/raw-source-code.html
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/InspectorFrontendHost.h
Source/WebCore/inspector/InspectorFrontendHost.idl
Source/WebCore/inspector/compile-front-end.sh
Source/WebCore/inspector/front-end/CompilerSourceMapping.js
Source/WebCore/inspector/front-end/CompilerSourceMappingProvider.js [deleted file]
Source/WebCore/inspector/front-end/ContentProviders.js
Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js
Source/WebCore/inspector/front-end/RawSourceCode.js
Source/WebCore/inspector/front-end/WebKit.qrc
Source/WebCore/inspector/front-end/inspector.html
Source/WebCore/inspector/front-end/inspector.js