~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/inspector/front-end/ProfilesPanel.js

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-02-04 19:30:57 UTC
  • mfrom: (1.2.8 upstream) (4.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20100204193057-d3018lm1fipb0703
* New upstream release
* debian/copyright:
- Updated with changes since 1.1.19.

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
    show: function()
158
158
    {
159
159
        WebInspector.Panel.prototype.show.call(this);
160
 
        if (!this.visibleView)
161
 
            this.welcomeView.show();
162
160
        if (this._shouldPopulateProfiles)
163
161
            this._populateProfiles();
164
162
    },
186
184
    {
187
185
        for (var i = 0; i < this._profiles.length; ++i)
188
186
            delete this._profiles[i]._profileView;
 
187
        delete this.visibleView;
189
188
 
190
189
        delete this.currentQuery;
191
190
        this.searchCanceled();
205
204
        this.profileViewStatusBarItemsContainer.removeChildren();
206
205
 
207
206
        this._updateInterface();
 
207
        this.welcomeView.show();
208
208
    },
209
209
 
210
210
    registerProfileType: function(profileType)
303
303
        profile._profilesTreeElement = profileTreeElement;
304
304
 
305
305
        sidebarParent.appendChild(profileTreeElement);
 
306
        this.welcomeView.hide();
306
307
        if (!this.visibleView)
307
308
            this.showProfile(profile);
308
309
    },
312
313
        if (!profile)
313
314
            return;
314
315
 
315
 
        this.welcomeView.hide();
316
 
        if (this.visibleView)
317
 
            this.visibleView.hide();
 
316
        this.closeVisibleView();
318
317
 
319
318
        var view = profile.__profilesPanelProfileType.viewForProfile(profile);
320
319
 
366
365
        if (this.visibleView)
367
366
            this.visibleView.hide();
368
367
        delete this.visibleView;
369
 
        this.welcomeView.show();
370
368
    },
371
369
 
372
370
    displayTitleForProfileLink: function(title, typeId)
428
426
        }
429
427
    },
430
428
 
431
 
    resize: function()
432
 
    {
433
 
        var visibleView = this.visibleView;
434
 
        if (visibleView && "resize" in visibleView)
435
 
            visibleView.resize();
436
 
    },
437
 
 
438
429
    _updateInterface: function()
439
430
    {
440
431
        // FIXME: Replace ProfileType-specific button visibility changes by a single ProfileType-agnostic "combo-button" visibility change.
445
436
                this._profileTypeButtonsByIdMap[typeId].removeStyleClass("hidden");
446
437
            this.profileViewStatusBarItemsContainer.removeStyleClass("hidden");
447
438
            this.panelEnablerView.visible = false;
448
 
            this.welcomeView.visible = true;
449
439
        } else {
450
440
            this.enableToggleButton.title = WebInspector.UIString("Profiling disabled. Click to enable.");
451
441
            this.enableToggleButton.toggled = false;
452
442
            for (var typeId in this._profileTypeButtonsByIdMap)
453
443
                this._profileTypeButtonsByIdMap[typeId].addStyleClass("hidden");
454
444
            this.profileViewStatusBarItemsContainer.addStyleClass("hidden");
455
 
            this.welcomeView.visible = false;
456
445
            this.panelEnablerView.visible = true;
457
446
        }
458
447
    },
496
485
 
497
486
    updateMainViewWidth: function(width)
498
487
    {
 
488
        this.welcomeView.element.style.left = width + "px";
499
489
        this.profileViews.style.left = width + "px";
500
490
        this.profileViewStatusBarItemsContainer.style.left = width + "px";
 
491
        this.resize();
501
492
    }
502
493
}
503
494