Changeset 141561 in webkit


Ignore:
Timestamp:
Feb 1, 2013 1:52:10 AM (11 years ago)
Author:
aandrey@chromium.org
Message:

Web Inspector: [Canvas] drop trace log in the backend when deleting profile in frontend
https://bugs.webkit.org/show_bug.cgi?id=108591

Reviewed by Pavel Feldman.

Send a dropTraceLog command to the backend when deleting a profile header from the sidebar.
Before we were sending the command only upon deleting an existing view of a profile, so we would not
sent the command if the view was not created or if a profile header was removed via context menu (the ondelete() method).
Drive-by: fixed an odd formatting of property functions.

  • inspector/front-end/CanvasProfileView.js:

(WebInspector.CanvasProfileView.prototype.dispose):
(WebInspector.CanvasProfileHeader.prototype.reset):

  • inspector/front-end/ProfilesPanel.js:

(WebInspector.ProfileHeader.prototype.reset):
(WebInspector.ProfileHeader.prototype.load):
(WebInspector.ProfileHeader.prototype.canSaveToFile):
(WebInspector.ProfileHeader.prototype.saveToFile):
(WebInspector.ProfileHeader.prototype.loadFromFile):
(WebInspector.ProfileHeader.prototype.fromFile):
(WebInspector.ProfilesPanel):
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype._removeProfileHeader):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141560 r141561  
     12013-02-01  Andrey Adaikin  <aandrey@chromium.org>
     2
     3        Web Inspector: [Canvas] drop trace log in the backend when deleting profile in frontend
     4        https://bugs.webkit.org/show_bug.cgi?id=108591
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Send a dropTraceLog command to the backend when deleting a profile header from the sidebar.
     9        Before we were sending the command only upon deleting an existing view of a profile, so we  would not
     10        sent the command if the view was not created or if a profile header was removed via context menu (the ondelete() method).
     11        Drive-by: fixed an odd formatting of property functions.
     12
     13        * inspector/front-end/CanvasProfileView.js:
     14        (WebInspector.CanvasProfileView.prototype.dispose):
     15        (WebInspector.CanvasProfileHeader.prototype.reset):
     16        * inspector/front-end/ProfilesPanel.js:
     17        (WebInspector.ProfileHeader.prototype.reset):
     18        (WebInspector.ProfileHeader.prototype.load):
     19        (WebInspector.ProfileHeader.prototype.canSaveToFile):
     20        (WebInspector.ProfileHeader.prototype.saveToFile):
     21        (WebInspector.ProfileHeader.prototype.loadFromFile):
     22        (WebInspector.ProfileHeader.prototype.fromFile):
     23        (WebInspector.ProfilesPanel):
     24        (WebInspector.ProfilesPanel.prototype._reset):
     25        (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
     26
    1272013-02-01  Chris Fleizach  <cfleizach@apple.com>
    228
  • trunk/Source/WebCore/inspector/front-end/CanvasProfileView.js

    r141403 r141561  
    104104        this._logGridNodes = [];
    105105        this._linkifier.reset();
    106         CanvasAgent.dropTraceLog(this._traceLogId);
    107106    },
    108107
     
    768767
    769768    /**
     769     * @override
     770     */
     771    reset: function()
     772    {
     773        if (this._traceLogId)
     774            CanvasAgent.dropTraceLog(this._traceLogId);
     775    },
     776
     777    /**
    770778     * @param {CanvasAgent.TraceLog=} traceLog
    771779     */
  • trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js

    r141409 r141561  
    185185    },
    186186
     187    reset: function()
     188    {
     189    },
     190
    187191    /**
    188192     * @param {Function} callback
    189193     */
    190     load: function(callback) { },
     194    load: function(callback)
     195    {
     196    },
    191197
    192198    /**
    193199     * @return {boolean}
    194200     */
    195     canSaveToFile: function() { return false; },
    196 
    197     saveToFile: function() { throw new Error("Needs implemented"); },
     201    canSaveToFile: function()
     202    {
     203        return false;
     204    },
     205
     206    saveToFile: function()
     207    {
     208        throw new Error("Needs implemented");
     209    },
    198210
    199211    /**
    200212     * @param {File} file
    201213     */
    202     loadFromFile: function(file) { throw new Error("Needs implemented"); },
     214    loadFromFile: function(file)
     215    {
     216        throw new Error("Needs implemented");
     217    },
    203218
    204219    /**
    205220     * @return {boolean}
    206221     */
    207     fromFile: function() { return this._fromFile; }
     222    fromFile: function()
     223    {
     224        return this._fromFile;
     225    }
    208226}
    209227
     
    265283    this._profileViewStatusBarItemsContainer.className = "status-bar-items";
    266284
     285    /** @type {!Array.<!WebInspector.ProfileHeader>} */
    267286    this._profiles = [];
    268287    this._profilerEnabled = !Capabilities.profilerCausesRecompilation;
     
    401420                    view.dispose();
    402421            }
     422            this._profiles[i].reset();
    403423        }
    404424        delete this.visibleView;
     
    595615                profile = this._profiles[i];
    596616                this._profiles.splice(i, 1);
     617                profile.reset();
    597618                break;
    598619            }
Note: See TracChangeset for help on using the changeset viewer.