Changeset 145548 in webkit


Ignore:
Timestamp:
Mar 12, 2013 8:19:37 AM (11 years ago)
Author:
eustas@chromium.org
Message:

Web Inspector: [REGRESSION] StepInto (F11) and StepOut (Shift-F11) shortcuts toggle Inspector window full-screen state
https://bugs.webkit.org/show_bug.cgi?id=112113

Reviewed by Alexander Pavlov.

Updated handlers missed in first patch. Added JSDocs to all handlers.

  • inspector/front-end/Panel.js: Fixed JSDocs.
  • inspector/front-end/CallStackSidebarPane.js:

Added return values. Added JSDocs.

  • inspector/front-end/ScriptsPanel.js: Ditto.
  • inspector/front-end/GoToLineDialog.js: Added JSDocs.
  • inspector/front-end/TimelinePanel.js: Ditto.
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r145547 r145548  
     12013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
     2
     3        Web Inspector: [REGRESSION] StepInto (F11) and StepOut (Shift-F11) shortcuts toggle Inspector window full-screen state
     4        https://bugs.webkit.org/show_bug.cgi?id=112113
     5
     6        Reviewed by Alexander Pavlov.
     7
     8        Updated handlers missed in first patch. Added JSDocs to all handlers.
     9
     10        * inspector/front-end/Panel.js: Fixed JSDocs.
     11        * inspector/front-end/CallStackSidebarPane.js:
     12        Added return values. Added JSDocs.
     13        * inspector/front-end/ScriptsPanel.js: Ditto.
     14        * inspector/front-end/GoToLineDialog.js: Added JSDocs.
     15        * inspector/front-end/TimelinePanel.js: Ditto.
     16
    1172013-03-12  Alberto Garcia  <agarcia@igalia.com>
    218
  • trunk/Source/WebCore/inspector/front-end/CallStackSidebarPane.js

    r142127 r145548  
    6969    },
    7070
    71     _selectNextCallFrameOnStack: function()
     71    /**
     72     * @param {Event=} event
     73     * @return {boolean}
     74     */
     75    _selectNextCallFrameOnStack: function(event)
    7276    {
    7377        var index = this._selectedCallFrameIndex();
    7478        if (index == -1)
    75             return;
     79            return true;
    7680        this._selectedPlacardByIndex(index + 1);
    77     },
    78 
    79     _selectPreviousCallFrameOnStack: function()
     81        return true;
     82    },
     83
     84    /**
     85     * @param {Event=} event
     86     * @return {boolean}
     87     */
     88    _selectPreviousCallFrameOnStack: function(event)
    8089    {
    8190        var index = this._selectedCallFrameIndex();
    8291        if (index == -1)
    83             return;
     92            return true;
    8493        this._selectedPlacardByIndex(index - 1);
    85     },
    86 
     94        return true;
     95    },
     96
     97    /**
     98     * @param {number} index
     99     */
    87100    _selectedPlacardByIndex: function(index)
    88101    {
     
    92105    },
    93106
     107    /**
     108     * @return {number}
     109     */
    94110    _selectedCallFrameIndex: function()
    95111    {
     
    118134
    119135    /**
    120      * @param {function(!Array.<!WebInspector.KeyboardShortcut.Descriptor>, function(KeyboardEvent))} registerShortcutDelegate
     136     * @param {function(!Array.<!WebInspector.KeyboardShortcut.Descriptor>, function(Event=):boolean)} registerShortcutDelegate
    121137     */
    122138    registerShortcuts: function(registerShortcutDelegate)
  • trunk/Source/WebCore/inspector/front-end/GoToLineDialog.js

    r145045 r145548  
    6565/**
    6666 * @param {function():?WebInspector.View} viewGetter
     67 * @param {Event=} event
    6768 * @return {boolean}
    6869 */
    69 WebInspector.GoToLineDialog._show = function(viewGetter)
     70WebInspector.GoToLineDialog._show = function(viewGetter, event)
    7071{
    7172    var sourceView = viewGetter();
  • trunk/Source/WebCore/inspector/front-end/Panel.js

    r145045 r145548  
    4040    this._panelName = name;
    4141
    42     this._shortcuts = {};
     42    this._shortcuts = /** !Object.<number, function(Event=):boolean> */ ({});
    4343
    4444    WebInspector.settings[this._sidebarWidthSettingName()] = WebInspector.settings.createSetting(this._sidebarWidthSettingName(), undefined);
     
    258258    /**
    259259     * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys
    260      * @param {function(KeyboardEvent):boolean} handler
     260     * @param {function(Event=):boolean} handler
    261261     */
    262262    registerShortcuts: function(keys, handler)
  • trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js

    r145536 r145548  
    675675    },
    676676
    677     _togglePause: function()
     677    /**
     678     * @param {Event=} event
     679     * @return {boolean}
     680     */
     681    _togglePause: function(event)
    678682    {
    679683        if (this._paused) {
     
    688692
    689693        this._clearInterface();
    690     },
    691 
    692     _stepOverClicked: function()
     694        return true;
     695    },
     696
     697    /**
     698     * @param {Event=} event
     699     * @return {boolean}
     700     */
     701    _stepOverClicked: function(event)
    693702    {
    694703        if (!this._paused)
    695             return;
     704            return true;
    696705
    697706        this._paused = false;
     
    701710
    702711        DebuggerAgent.stepOver();
    703     },
    704 
    705     _stepIntoClicked: function()
     712        return true;
     713    },
     714
     715    /**
     716     * @param {Event=} event
     717     * @return {boolean}
     718     */
     719    _stepIntoClicked: function(event)
    706720    {
    707721        if (!this._paused)
    708             return;
     722            return true;
    709723
    710724        this._paused = false;
     
    714728
    715729        DebuggerAgent.stepInto();
    716     },
    717 
    718     _stepOutClicked: function()
     730        return true;
     731    },
     732
     733    /**
     734     * @param {Event=} event
     735     * @return {boolean}
     736     */
     737    _stepOutClicked: function(event)
    719738    {
    720739        if (!this._paused)
    721             return;
     740            return true;
    722741
    723742        this._paused = false;
     
    727746
    728747        DebuggerAgent.stepOut();
     748        return true;
    729749    },
    730750
     
    749769    },
    750770
    751     _evaluateSelectionInConsole: function()
     771    /**
     772     * @param {Event=} event
     773     * @return {boolean}
     774     */
     775    _evaluateSelectionInConsole: function(event)
    752776    {
    753777        var selection = window.getSelection();
     
    815839     * @param {string} buttonId
    816840     * @param {string} buttonTitle
    817      * @param {function(Event)} handler
     841     * @param {function(Event=):boolean} handler
    818842     * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} shortcuts
    819843     */
     
    956980    },
    957981
     982    /**
     983     * @return {boolean}
     984     */
    958985    _toggleBreakpoint: function()
    959986    {
     
    970997    },
    971998
    972     _showOutlineDialog: function()
     999    /**
     1000     * @param {Event=} event
     1001     * @return {boolean}
     1002     */
     1003    _showOutlineDialog: function(event)
    9731004    {
    9741005        var uiSourceCode = this._editorContainer.currentFile();
  • trunk/Source/WebCore/inspector/front-end/TimelinePanel.js

    r145537 r145548  
    345345        if (InspectorFrontendHost.canSave())
    346346            this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.SaveToFile, this._saveToFile.bind(this));
    347         this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.LoadFromFile, this._fileSelectorElement.click.bind(this._fileSelectorElement));
     347        this.registerShortcuts(WebInspector.TimelinePanelDescriptor.ShortcutKeys.LoadFromFile, this._selectFileToLoad.bind(this));
    348348    },
    349349
     
    362362        if (InspectorFrontendHost.canSave())
    363363            contextMenu.appendItem(WebInspector.UIString("Save Timeline data\u2026"), this._saveToFile.bind(this), this._operationInProgress);
    364         contextMenu.appendItem(WebInspector.UIString("Load Timeline data\u2026"), this._fileSelectorElement.click.bind(this._fileSelectorElement), this._operationInProgress);
     364        contextMenu.appendItem(WebInspector.UIString("Load Timeline data\u2026"), this._selectFileToLoad.bind(this), this._operationInProgress);
    365365        contextMenu.show();
    366366    },
    367367
    368     _saveToFile: function()
     368    /**
     369     * @param {Event=} event
     370     * @return {boolean}
     371     */
     372    _saveToFile: function(event)
    369373    {
    370374        if (this._operationInProgress)
    371             return false;
     375            return true;
    372376        this._model.saveToFile();
     377        return true;
     378    },
     379
     380    /**
     381     * @param {Event=} event
     382     * @return {boolean}
     383     */
     384    _selectFileToLoad: function(event) {
     385        this._fileSelectorElement.click();
    373386        return true;
    374387    },
     
    561574    },
    562575
     576    /**
     577     * @return {boolean}
     578     */
    563579    _toggleTimelineButtonClicked: function()
    564580    {
    565581        if (this._operationInProgress)
    566             return false;
     582            return true;
    567583        if (this.toggleTimelineButton.toggled) {
    568584            this._model.stopRecord();
Note: See TracChangeset for help on using the changeset viewer.