Changeset 117277 in webkit


Ignore:
Timestamp:
May 16, 2012 6:55:04 AM (12 years ago)
Author:
pfeldman@chromium.org
Message:

Web Inspector: split ScriptMapping into UISourceCodeProvider and SourceMapping.
https://bugs.webkit.org/show_bug.cgi?id=86616

Reviewed by Vsevolod Vlasov.

Source/WebCore:

This change simply splits the interface.

  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/compile-front-end.py:
  • inspector/front-end/CompilerScriptMapping.js:

(WebInspector.CompilerScriptMapping.prototype.get uiSourceCodes):
(WebInspector.CompilerScriptMapping.prototype.reset):

  • inspector/front-end/DebuggerModel.js:
  • inspector/front-end/DebuggerResourceBinding.js:

(WebInspector.DebuggerResourceBinding):
(WebInspector.DebuggerResourceBinding.prototype._uiSourceCodeForResource):

  • inspector/front-end/DebuggerScriptMapping.js:

(WebInspector.DebuggerScriptMapping):
(WebInspector.DebuggerScriptMapping.prototype.uiSourceCodes):
(WebInspector.DebuggerScriptMapping.prototype._handleUISourceCodeAdded):
(WebInspector.DebuggerScriptMapping.prototype._handleUISourceCodeReplaced):
(WebInspector.DebuggerScriptMapping.prototype._handleUISourceCodeRemoved):

  • inspector/front-end/FilteredItemSelectionDialog.js:

(WebInspector.OpenScriptDialog):
(WebInspector.OpenScriptDialog.install):
(WebInspector.OpenScriptDialog._show):

  • inspector/front-end/PresentationConsoleMessageHelper.js:

(WebInspector.PresentationConsoleMessageHelper):
(WebInspector.PresentationConsoleMessageHelper.prototype._consoleCleared):

  • inspector/front-end/ResourceScriptMapping.js:

(WebInspector.ResourceScriptMapping.prototype.uiSourceCodes):
(WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAdded):
(WebInspector.ResourceScriptMapping.prototype._uiSourceCodeReplaced):
(WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved):

  • inspector/front-end/Script.js:
  • inspector/front-end/ScriptSnippetModel.js:

(WebInspector.ScriptSnippetModel.prototype._uiSourceCodes):
(WebInspector.SnippetScriptMapping.prototype.uiSourceCodes):
(WebInspector.SnippetScriptMapping.prototype._fireUISourceCodeAdded):
(WebInspector.SnippetScriptMapping.prototype._fireUISourceCodeRemoved):

  • inspector/front-end/ScriptsPanel.js:
  • inspector/front-end/ScriptsSearchScope.js:

(WebInspector.ScriptsSearchScope):
(WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes):

  • inspector/front-end/SourceMapping.js: Renamed from Source/WebCore/inspector/front-end/ScriptMapping.js.
  • inspector/front-end/UISourceCode.js:

(WebInspector.UISourceCodeProvider):
(WebInspector.UISourceCodeProvider.prototype.uiSourceCodes):
(WebInspector.UILocation):
(WebInspector.UILocation.prototype.uiLocationToRawLocation):

  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/inspector.html:

LayoutTests:

  • http/tests/inspector/compiler-script-mapping.html:
  • inspector/debugger/scripts-panel.html:
Location:
trunk
Files:
21 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r117276 r117277  
     12012-05-16  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Web Inspector: split ScriptMapping into UISourceCodeProvider and SourceMapping.
     4        https://bugs.webkit.org/show_bug.cgi?id=86616
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        * http/tests/inspector/compiler-script-mapping.html:
     9        * inspector/debugger/scripts-panel.html:
     10
    1112012-05-16  Dinu Jacob  <dinu.jacob@nokia.com>
    212
  • trunk/LayoutTests/http/tests/inspector/compiler-script-mapping.html

    r117267 r117277  
    131131            mapping.addScript(script);
    132132
    133             var uiSourceCodeList = mapping.uiSourceCodeList();
     133            var uiSourceCodeList = mapping.uiSourceCodes();
    134134            InspectorTest.assertEquals(2, uiSourceCodeList.length);
    135135            InspectorTest.assertEquals("http://localhost:8000/inspector/resources/source1.js", uiSourceCodeList[0].url);
     
    173173            mapping.addScript(script);
    174174
    175             var uiSourceCodeList = mapping.uiSourceCodeList();
     175            var uiSourceCodeList = mapping.uiSourceCodes();
    176176            InspectorTest.assertEquals(1, uiSourceCodeList.length);
    177177            InspectorTest.assertEquals("source.js", uiSourceCodeList[0].url);
     
    194194            WebInspector.debuggerModel._reset();
    195195            var debuggerScriptMapping = new WebInspector.DebuggerScriptMapping();
    196             debuggerScriptMapping.addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeAdded, uiSourceCodeAdded);
     196            debuggerScriptMapping.addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCodeAdded);
    197197
    198198            var script = InspectorTest.createScriptMock("compiled.js", 0, 0, true, "");
  • trunk/LayoutTests/inspector/debugger/scripts-panel.html

    r117269 r117277  
    3030        {
    3131            uiSourceCodes.push(uiSourceCode);
    32             this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeAdded, uiSourceCode);
     32            this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCode);
    3333        }
    3434        model._reset = function(preservedItems)
     
    4242            uiSourceCodes.push(uiSourceCode);
    4343            var data = { oldUISourceCode: oldUISourceCode, uiSourceCode: uiSourceCode };
    44             this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeReplaced, data);
     44            this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeReplaced, data);
    4545        }
    4646        return model;
  • trunk/Source/WebCore/ChangeLog

    r117274 r117277  
     12012-05-16  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Web Inspector: split ScriptMapping into UISourceCodeProvider and SourceMapping.
     4        https://bugs.webkit.org/show_bug.cgi?id=86616
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        This change simply splits the interface.
     9
     10        * WebCore.gypi:
     11        * WebCore.vcproj/WebCore.vcproj:
     12        * inspector/compile-front-end.py:
     13        * inspector/front-end/CompilerScriptMapping.js:
     14        (WebInspector.CompilerScriptMapping.prototype.get uiSourceCodes):
     15        (WebInspector.CompilerScriptMapping.prototype.reset):
     16        * inspector/front-end/DebuggerModel.js:
     17        * inspector/front-end/DebuggerResourceBinding.js:
     18        (WebInspector.DebuggerResourceBinding):
     19        (WebInspector.DebuggerResourceBinding.prototype._uiSourceCodeForResource):
     20        * inspector/front-end/DebuggerScriptMapping.js:
     21        (WebInspector.DebuggerScriptMapping):
     22        (WebInspector.DebuggerScriptMapping.prototype.uiSourceCodes):
     23        (WebInspector.DebuggerScriptMapping.prototype._handleUISourceCodeAdded):
     24        (WebInspector.DebuggerScriptMapping.prototype._handleUISourceCodeReplaced):
     25        (WebInspector.DebuggerScriptMapping.prototype._handleUISourceCodeRemoved):
     26        * inspector/front-end/FilteredItemSelectionDialog.js:
     27        (WebInspector.OpenScriptDialog):
     28        (WebInspector.OpenScriptDialog.install):
     29        (WebInspector.OpenScriptDialog._show):
     30        * inspector/front-end/PresentationConsoleMessageHelper.js:
     31        (WebInspector.PresentationConsoleMessageHelper):
     32        (WebInspector.PresentationConsoleMessageHelper.prototype._consoleCleared):
     33        * inspector/front-end/ResourceScriptMapping.js:
     34        (WebInspector.ResourceScriptMapping.prototype.uiSourceCodes):
     35        (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAdded):
     36        (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeReplaced):
     37        (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved):
     38        * inspector/front-end/Script.js:
     39        * inspector/front-end/ScriptSnippetModel.js:
     40        (WebInspector.ScriptSnippetModel.prototype._uiSourceCodes):
     41        (WebInspector.SnippetScriptMapping.prototype.uiSourceCodes):
     42        (WebInspector.SnippetScriptMapping.prototype._fireUISourceCodeAdded):
     43        (WebInspector.SnippetScriptMapping.prototype._fireUISourceCodeRemoved):
     44        * inspector/front-end/ScriptsPanel.js:
     45        * inspector/front-end/ScriptsSearchScope.js:
     46        (WebInspector.ScriptsSearchScope):
     47        (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes):
     48        * inspector/front-end/SourceMapping.js: Renamed from Source/WebCore/inspector/front-end/ScriptMapping.js.
     49        * inspector/front-end/UISourceCode.js:
     50        (WebInspector.UISourceCodeProvider):
     51        (WebInspector.UISourceCodeProvider.prototype.uiSourceCodes):
     52        (WebInspector.UILocation):
     53        (WebInspector.UILocation.prototype.uiLocationToRawLocation):
     54        * inspector/front-end/WebKit.qrc:
     55        * inspector/front-end/inspector.html:
     56
    1572012-05-16  Vsevolod Vlasov  <vsevik@chromium.org>
    258
  • trunk/Source/WebCore/WebCore.gypi

    r117272 r117277  
    64686468            'inspector/front-end/ScriptFormatter.js',
    64696469            'inspector/front-end/ScriptFormatterWorker.js',
    6470             'inspector/front-end/ScriptMapping.js',
    64716470            'inspector/front-end/ScriptSnippetModel.js',
    64726471            'inspector/front-end/ScriptsNavigator.js',
     
    64886487            'inspector/front-end/SourceHTMLTokenizer.js',
    64896488            'inspector/front-end/SourceJavaScriptTokenizer.js',
     6489            'inspector/front-end/SourceMapping.js',
    64906490            'inspector/front-end/SourceTokenizer.js',
    64916491            'inspector/front-end/Spectrum.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r117272 r117277  
    7469874698                                </File>
    7469974699                                <File
    74700                                         RelativePath="..\inspector\front-end\ScriptMapping.js"
    74701                                         >
    74702                                 </File>
    74703                                 <File
    7470474700                                        RelativePath="..\inspector\front-end\ScriptsNavigator.js"
    7470574701                                        >
     
    7477974775                                <File
    7478074776                                        RelativePath="..\inspector\front-end\SourceJavaScriptTokenizer.js"
     74777                                        >
     74778                                </File>
     74779                                <File
     74780                                        RelativePath="..\inspector\front-end\SourceMapping.js"
    7478174781                                        >
    7478274782                                </File>
  • trunk/Source/WebCore/inspector/compile-front-end.py

    r117272 r117277  
    8484            "Script.js",
    8585            "ScriptFormatter.js",
    86             "ScriptMapping.js",
    8786            "ScriptSnippetModel.js",
    8887            "SnippetStorage.js",
     88            "SourceMapping.js",
    8989            "TimelineManager.js",
    9090            "TimelineModel.js",
  • trunk/Source/WebCore/inspector/front-end/CompilerScriptMapping.js

    r117269 r117277  
    3131/**
    3232 * @constructor
    33  * @extends {WebInspector.ScriptMapping}
     33 * @extends {WebInspector.Object}
     34 * @implements {WebInspector.SourceMapping}
     35 * @implements {WebInspector.UISourceCodeProvider}
    3436 */
    3537WebInspector.CompilerScriptMapping = function()
     
    7072     * @return {Array.<WebInspector.UISourceCode>}
    7173     */
    72     uiSourceCodeList: function()
     74    uiSourceCodes: function()
    7375    {
    7476        var result = [];
     
    129131
    130132        for (var i = 0; i < uiSourceCodeList.length; ++i)
    131             this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeAdded, uiSourceCodeList[i]);
     133            this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCodeList[i]);
    132134    },
    133135
     
    160162    reset: function()
    161163    {
    162         var uiSourceCodes = this.uiSourceCodeList();
     164        var uiSourceCodes = this.uiSourceCodes();
    163165        for (var i = 0; i < uiSourceCodes.length; ++i)
    164             this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeRemoved, uiSourceCodes[i]);
     166            this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, uiSourceCodes[i]);
    165167
    166168        this._sourceMapByURL = {};
     
    172174}
    173175
    174 WebInspector.CompilerScriptMapping.prototype.__proto__ = WebInspector.ScriptMapping.prototype;
     176WebInspector.CompilerScriptMapping.prototype.__proto__ = WebInspector.Object.prototype;
    175177
    176178/**
  • trunk/Source/WebCore/inspector/front-end/DebuggerModel.js

    r116077 r117277  
    519519     * @param {DebuggerAgent.Location} location
    520520     * @param {function(WebInspector.UILocation):(boolean|undefined)} updateDelegate
    521      * @return {WebInspector.LiveLocation}
     521     * @return {WebInspector.Script.Location}
    522522     */
    523523    createLiveLocation: function(location, updateDelegate)
  • trunk/Source/WebCore/inspector/front-end/DebuggerResourceBinding.js

    r117269 r117277  
    3232 * @constructor
    3333 * @implements {WebInspector.ResourceDomainModelBinding}
    34  * @param {WebInspector.UISourceCodeProject} uiSourceCodeProject
     34 * @param {WebInspector.UISourceCodeProvider} uiSourceCodeProvider
    3535 */
    36 WebInspector.DebuggerResourceBinding = function(uiSourceCodeProject)
     36WebInspector.DebuggerResourceBinding = function(uiSourceCodeProvider)
    3737{
    38     this._uiSourceCodeProject = uiSourceCodeProject;
     38    this._uiSourceCodeProvider = uiSourceCodeProvider;
    3939    WebInspector.Resource.registerDomainModelBinding(WebInspector.resourceTypes.Script, this);
    4040}
     
    106106    _uiSourceCodeForResource: function(resource)
    107107    {
    108         var uiSourceCodes = this._uiSourceCodeProject.uiSourceCodes();
     108        var uiSourceCodes = this._uiSourceCodeProvider.uiSourceCodes();
    109109        for (var i = 0; i < uiSourceCodes.length; ++i) {
    110110            if (uiSourceCodes[i].url === resource.url)
  • trunk/Source/WebCore/inspector/front-end/DebuggerScriptMapping.js

    r117267 r117277  
    3232 * @constructor
    3333 * @extends {WebInspector.Object}
    34  * @implements {WebInspector.UISourceCodeProject}
     34 * @implements {WebInspector.UISourceCodeProvider}
    3535 */
    3636WebInspector.DebuggerScriptMapping = function()
     
    4545    this._mappings.push(this._snippetMapping);
    4646    for (var i = 0; i < this._mappings.length; ++i) {
    47         this._mappings[i].addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeAdded, this._handleUISourceCodeAdded, this);
    48         this._mappings[i].addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeReplaced, this._handleUISourceCodeReplaced, this);
    49         this._mappings[i].addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeRemoved, this._handleUISourceCodeRemoved, this);
     47        this._mappings[i].addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, this._handleUISourceCodeAdded, this);
     48        this._mappings[i].addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeReplaced, this._handleUISourceCodeReplaced, this);
     49        this._mappings[i].addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, this._handleUISourceCodeRemoved, this);
    5050    }
    5151
     
    7373        var result = [];
    7474        for (var i = 0; i < this._mappings.length; ++i) {
    75             var uiSourceCodeList = this._mappings[i].uiSourceCodeList();
     75            var uiSourceCodeList = this._mappings[i].uiSourceCodes();
    7676            for (var j = 0; j < uiSourceCodeList.length; ++j)
    7777                result.push(uiSourceCodeList[j]);
     
    8585    _handleUISourceCodeAdded: function(event)
    8686    {
    87         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeAdded, event.data);
     87        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, event.data);
    8888    },
    8989
     
    9393    _handleUISourceCodeReplaced: function(event)
    9494    {
    95         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeReplaced, event.data);
     95        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeReplaced, event.data);
    9696    },
    9797
     
    101101    _handleUISourceCodeRemoved: function(event)
    102102    {
    103         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeRemoved, event.data);
     103        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, event.data);
    104104    },
    105105
    106106    /**
    107107     * @param {WebInspector.Script} script
    108      * @return {WebInspector.ScriptMapping}
     108     * @return {WebInspector.SourceMapping}
    109109     */
    110110    _mappingForScript: function(script)
  • trunk/Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js

    r117235 r117277  
    655655 * @extends {WebInspector.OpenResourceDialog}
    656656 * @param {WebInspector.ScriptsPanel} panel
    657  * @param {WebInspector.UISourceCodeProject} uiSourceCodeProject
    658  */
    659 WebInspector.OpenScriptDialog = function(panel, uiSourceCodeProject)
    660 {
    661     WebInspector.OpenResourceDialog.call(this, uiSourceCodeProject.uiSourceCodes());
     657 * @param {WebInspector.UISourceCodeProvider} uiSourceCodeProvider
     658 */
     659WebInspector.OpenScriptDialog = function(panel, uiSourceCodeProvider)
     660{
     661    WebInspector.OpenResourceDialog.call(this, uiSourceCodeProvider.uiSourceCodes());
    662662    this._panel = panel;
    663663}
     
    665665/**
    666666 * @param {WebInspector.ScriptsPanel} panel
    667  * @param {WebInspector.UISourceCodeProject} uiSourceCodeProject
    668  */
    669 WebInspector.OpenScriptDialog.install = function(panel, uiSourceCodeProject, relativeToElement)
     667 * @param {WebInspector.UISourceCodeProvider} uiSourceCodeProvider
     668 */
     669WebInspector.OpenScriptDialog.install = function(panel, uiSourceCodeProvider, relativeToElement)
    670670{
    671671    function showOpenResourceDialog()
    672672    {
    673         WebInspector.OpenScriptDialog._show(panel, uiSourceCodeProject, relativeToElement);
     673        WebInspector.OpenScriptDialog._show(panel, uiSourceCodeProvider, relativeToElement);
    674674    }
    675675
     
    680680/**
    681681 * @param {WebInspector.ScriptsPanel} panel
    682  * @param {WebInspector.UISourceCodeProject} uiSourceCodeProject
     682 * @param {WebInspector.UISourceCodeProvider} uiSourceCodeProvider
    683683 * @param {Element} relativeToElement
    684684 */
    685 WebInspector.OpenScriptDialog._show = function(panel, uiSourceCodeProject, relativeToElement)
     685WebInspector.OpenScriptDialog._show = function(panel, uiSourceCodeProvider, relativeToElement)
    686686{
    687687    if (WebInspector.Dialog.currentInstance())
    688688        return;
    689689
    690     var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDialog(new WebInspector.OpenScriptDialog(panel, uiSourceCodeProject));
     690    var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDialog(new WebInspector.OpenScriptDialog(panel, uiSourceCodeProvider));
    691691    WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog);
    692692}
  • trunk/Source/WebCore/inspector/front-end/PresentationConsoleMessageHelper.js

    r117235 r117277  
    3131/**
    3232 * @constructor
    33  * @param {WebInspector.UISourceCodeProject} uiSourceCodeProject
     33 * @param {WebInspector.UISourceCodeProvider} uiSourceCodeProvider
    3434 */
    35 WebInspector.PresentationConsoleMessageHelper = function(uiSourceCodeProject)
     35WebInspector.PresentationConsoleMessageHelper = function(uiSourceCodeProvider)
    3636{
    3737    this._pendingConsoleMessages = {};
    3838    this._presentationConsoleMessages = [];
    39     this._uiSourceCodeProject = uiSourceCodeProject;
     39    this._uiSourceCodeProvider = uiSourceCodeProvider;
    4040
    4141    WebInspector.console.addEventListener(WebInspector.ConsoleModel.Events.MessageAdded, this._consoleMessageAdded, this);
     
    116116            this._presentationConsoleMessages[i].dispose();
    117117        this._presentationConsoleMessages = [];
    118         var uiSourceCodes = this._uiSourceCodeProject.uiSourceCodes();
     118        var uiSourceCodes = this._uiSourceCodeProvider.uiSourceCodes();
    119119        for (var i = 0; i < uiSourceCodes.length; ++i)
    120120            uiSourceCodes[i].consoleMessagesCleared();
  • trunk/Source/WebCore/inspector/front-end/ResourceScriptMapping.js

    r117270 r117277  
    3131/**
    3232 * @constructor
    33  * @extends {WebInspector.ScriptMapping}
     33 * @extends {WebInspector.Object}
     34 * @implements {WebInspector.SourceMapping}
     35 * @implements {WebInspector.UISourceCodeProvider}
    3436 */
    3537WebInspector.ResourceScriptMapping = function()
     
    6870     * @return {Array.<WebInspector.UISourceCode>}
    6971     */
    70     uiSourceCodeList: function()
     72    uiSourceCodes: function()
    7173    {
    7274        var result = [];
     
    145147    {
    146148        this._rawSourceCodeForUISourceCode.put(uiSourceCode, rawSourceCode);
    147         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeAdded, uiSourceCode);
     149        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCode);
    148150    },
    149151
     
    162164
    163165        var data = { oldUISourceCode: oldUISourceCode, uiSourceCode: uiSourceCode };
    164         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeReplaced, data);
     166        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeReplaced, data);
    165167    },
    166168
     
    172174    {
    173175        this._rawSourceCodeForUISourceCode.remove(uiSourceCode);
    174         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeRemoved, uiSourceCode);
     176        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, uiSourceCode);
    175177    },
    176178
     
    201203}
    202204
    203 WebInspector.ResourceScriptMapping.prototype.__proto__ = WebInspector.ScriptMapping.prototype;
     205WebInspector.ResourceScriptMapping.prototype.__proto__ = WebInspector.Object.prototype;
  • trunk/Source/WebCore/inspector/front-end/Script.js

    r116775 r117277  
    189189/**
    190190 * @constructor
    191  * @implements {WebInspector.LiveLocation}
    192191 * @param {WebInspector.Script} script
    193192 * @param {DebuggerAgent.Location} rawLocation
  • trunk/Source/WebCore/inspector/front-end/ScriptSnippetModel.js

    r117274 r117277  
    173173     * @return {Array.<WebInspector.UISourceCode>}
    174174     */
    175     _uiSourceCodeList: function()
     175    _uiSourceCodes: function()
    176176    {
    177177        var result = this._uiSourceCodeForSnippet.values();
     
    296296/**
    297297 * @constructor
     298 * @extends {WebInspector.Object}
     299 * @implements {WebInspector.SourceMapping}
     300 * @implements {WebInspector.UISourceCodeProvider}
    298301 * @param {WebInspector.ScriptSnippetModel} scriptSnippetModel
    299  * @extends {WebInspector.ScriptMapping}
    300302 */
    301303WebInspector.SnippetScriptMapping = function(scriptSnippetModel)
     
    328330     * @return {Array.<WebInspector.UISourceCode>}
    329331     */
    330     uiSourceCodeList: function()
    331     {
    332         return this._scriptSnippetModel._uiSourceCodeList();
     332    uiSourceCodes: function()
     333    {
     334        return this._scriptSnippetModel._uiSourceCodes();
    333335    },
    334336
     
    355357    _fireUISourceCodeAdded: function(uiSourceCode)
    356358    {
    357         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeAdded, uiSourceCode);
     359        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCode);
    358360    },
    359361
     
    363365    _fireUISourceCodeRemoved: function(uiSourceCode)
    364366    {
    365         this.dispatchEventToListeners(WebInspector.ScriptMapping.Events.UISourceCodeRemoved, uiSourceCode);
     367        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, uiSourceCode);
    366368    },
    367369
     
    372374}
    373375
    374 WebInspector.SnippetScriptMapping.prototype.__proto__ = WebInspector.ScriptMapping.prototype;
     376WebInspector.SnippetScriptMapping.prototype.__proto__ = WebInspector.Object.prototype;
    375377
    376378/**
  • trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js

    r117274 r117277  
    173173    WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.BreakpointsActiveStateChanged, this._breakpointsActiveStateChanged, this);
    174174
    175     this._scriptMapping.addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeAdded, this._handleUISourceCodeAdded, this);
    176     this._scriptMapping.addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeReplaced, this._uiSourceCodeReplaced, this);
    177     this._scriptMapping.addEventListener(WebInspector.ScriptMapping.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this);
     175    this._scriptMapping.addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, this._handleUISourceCodeAdded, this);
     176    this._scriptMapping.addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeReplaced, this._uiSourceCodeReplaced, this);
     177    this._scriptMapping.addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this);
    178178
    179179    var enableDebugger = !Capabilities.debuggerCausesRecompilation || WebInspector.settings.debuggerEnabled.get();
  • trunk/Source/WebCore/inspector/front-end/ScriptsSearchScope.js

    r117235 r117277  
    3030 * @constructor
    3131 * @implements {WebInspector.SearchScope}
    32  * @param {WebInspector.UISourceCodeProject} uiSourceCodeProject
     32 * @param {WebInspector.UISourceCodeProvider} uiSourceCodeProvider
    3333 */
    34 WebInspector.ScriptsSearchScope = function(uiSourceCodeProject)
     34WebInspector.ScriptsSearchScope = function(uiSourceCodeProvider)
    3535{
    3636    // FIXME: Add title once it is used by search controller.
    3737    WebInspector.SearchScope.call(this)
    3838    this._searchId = 0;
    39     this._uiSourceCodeProject = uiSourceCodeProject;
     39    this._uiSourceCodeProvider = uiSourceCodeProvider;
    4040}
    4141
     
    116116        }
    117117       
    118         var uiSourceCodes = this._uiSourceCodeProject.uiSourceCodes();
     118        var uiSourceCodes = this._uiSourceCodeProvider.uiSourceCodes();
    119119       
    120120        uiSourceCodes = uiSourceCodes.filter(filterOutAnonymous);
  • trunk/Source/WebCore/inspector/front-end/SourceMapping.js

    r117276 r117277  
    3030
    3131/**
    32  * @constructor
    33  * @param {WebInspector.UISourceCode} uiSourceCode
    34  * @param {number} lineNumber
    35  * @param {number} columnNumber
    36  */
    37 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber)
    38 {
    39     this.uiSourceCode = uiSourceCode;
    40     this.lineNumber = lineNumber;
    41     this.columnNumber = columnNumber;
    42 }
    43 
    44 WebInspector.UILocation.prototype = {
    45     /**
    46      * @return {DebuggerAgent.Location}
    47      */
    48     uiLocationToRawLocation: function()
    49     {
    50         return this.uiSourceCode.uiLocationToRawLocation(this.lineNumber, this.columnNumber);
    51     }
    52 }
    53 
    54 /**
    55  * @interface
    56  */
    57 WebInspector.LiveLocation = function()
    58 {
    59 }
    60 
    61 WebInspector.LiveLocation.prototype = {
    62     update: function(rawLocation) { },
    63 
    64     dispose: function() { }
    65 }
    66 
    67 /**
    6832 * @interface
    6933 */
     
    8751    uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber) { }
    8852}
    89 
    90 /**
    91  * @constructor
    92  * @extends {WebInspector.Object}
    93  * @implements {WebInspector.SourceMapping}
    94  */
    95 WebInspector.ScriptMapping = function()
    96 {
    97 }
    98 
    99 WebInspector.ScriptMapping.Events = {
    100     UISourceCodeAdded: "UISourceCodeAdded",
    101     UISourceCodeReplaced: "UISourceCodeReplaced",
    102     UISourceCodeRemoved: "UISourceCodeRemoved"
    103 }
    104 
    105 WebInspector.ScriptMapping.prototype = {
    106     /**
    107      * @param {DebuggerAgent.Location} rawLocation
    108      * @return {WebInspector.UILocation}
    109      */
    110     rawLocationToUILocation: function(rawLocation) {},
    111 
    112     /**
    113      * @param {WebInspector.UISourceCode} uiSourceCode
    114      * @param {number} lineNumber
    115      * @param {number} columnNumber
    116      * @return {DebuggerAgent.Location}
    117      */
    118     uiLocationToRawLocation: function(uiSourceCode, lineNumber, columnNumber) {},
    119 
    120     /**
    121      * @return {Array.<WebInspector.UISourceCode>}
    122      */
    123     uiSourceCodeList: function() {}
    124 }
    125 
    126 WebInspector.ScriptMapping.prototype.__proto__ = WebInspector.Object.prototype;
  • trunk/Source/WebCore/inspector/front-end/UISourceCode.js

    r117274 r117277  
    224224
    225225    /**
    226      * @param {WebInspector.LiveLocation} liveLocation
     226     * @param {WebInspector.Script.Location} liveLocation
    227227     */
    228228    addLiveLocation: function(liveLocation)
     
    232232
    233233    /**
    234      * @param {WebInspector.LiveLocation} liveLocation
     234     * @param {WebInspector.Script.Location} liveLocation
    235235     */
    236236    removeLiveLocation: function(liveLocation)
     
    293293 * @interface
    294294 */
    295 WebInspector.UISourceCodeProject = function()
     295WebInspector.UISourceCodeProvider = function()
    296296{
    297297}
    298298
    299 WebInspector.UISourceCodeProject.prototype = {
    300     /** @return {Array.<WebInspector.UISourceCode>} */
    301     uiSourceCodes: function() { }
    302 }
     299WebInspector.UISourceCodeProvider.Events = {
     300    UISourceCodeAdded: "UISourceCodeAdded",
     301    UISourceCodeReplaced: "UISourceCodeReplaced",
     302    UISourceCodeRemoved: "UISourceCodeRemoved"
     303}
     304
     305WebInspector.UISourceCodeProvider.prototype = {
     306    /**
     307     * @return {Array.<WebInspector.UISourceCode>}
     308     */
     309    uiSourceCodes: function() {}
     310}
     311
     312/**
     313 * @constructor
     314 * @param {WebInspector.UISourceCode} uiSourceCode
     315 * @param {number} lineNumber
     316 * @param {number} columnNumber
     317 */
     318WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber)
     319{
     320    this.uiSourceCode = uiSourceCode;
     321    this.lineNumber = lineNumber;
     322    this.columnNumber = columnNumber;
     323}
     324
     325WebInspector.UILocation.prototype = {
     326    /**
     327     * @return {DebuggerAgent.Location}
     328     */
     329    uiLocationToRawLocation: function()
     330    {
     331        return this.uiSourceCode.uiLocationToRawLocation(this.lineNumber, this.columnNumber);
     332    }
     333}
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r117272 r117277  
    132132    <file>ScriptFormatter.js</file>
    133133    <file>ScriptFormatterWorker.js</file>
    134     <file>ScriptMapping.js</file>
    135134    <file>ScriptSnippetModel.js</file>
    136135    <file>ScriptsPanel.js</file>
     
    152151    <file>SourceHTMLTokenizer.js</file>
    153152    <file>SourceJavaScriptTokenizer.js</file>
     153    <file>SourceMapping.js</file>
    154154    <file>SourceTokenizer.js</file>
    155155    <file>Spectrum.js</file>
  • trunk/Source/WebCore/inspector/front-end/inspector.html

    r117272 r117277  
    177177    <script type="text/javascript" src="HeapSnapshotView.js"></script>
    178178    <script type="text/javascript" src="DebuggerModel.js"></script>
    179     <script type="text/javascript" src="ScriptMapping.js"></script>
     179    <script type="text/javascript" src="SourceMapping.js"></script>
    180180    <script type="text/javascript" src="UISourceCode.js"></script>
    181181    <script type="text/javascript" src="JavaScriptSource.js"></script>
Note: See TracChangeset for help on using the changeset viewer.