Changeset 53996 in webkit


Ignore:
Timestamp:
Jan 28, 2010 4:34:02 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-28 Mikhail Naganov <mnaganov@chromium.org>

Reviewed by Timothy Hatcher.

Simplify views logic in Profiler panel, and fix the problem described in the issue.
Remove image from Welcome view.
Preserve border on status bar-like buttons in Welcome view on window deactivation.

https://bugs.webkit.org/show_bug.cgi?id=34201

  • inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.show): (WebInspector.ProfilesPanel.prototype.reset): (WebInspector.ProfilesPanel.prototype.addProfileHeader): (WebInspector.ProfilesPanel.prototype.showView): (WebInspector.ProfilesPanel.prototype._updateInterface):
  • inspector/front-end/WelcomeView.js: (WebInspector.WelcomeView):
  • inspector/front-end/inspector.css:
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53995 r53996  
     12010-01-28  Mikhail Naganov  <mnaganov@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Simplify views logic in Profiler panel, and fix the problem described in the issue.
     6        Remove image from Welcome view.
     7        Preserve border on status bar-like buttons in Welcome view on window deactivation.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=34201
     10
     11        * inspector/front-end/ProfilesPanel.js:
     12        (WebInspector.ProfilesPanel.prototype.show):
     13        (WebInspector.ProfilesPanel.prototype.reset):
     14        (WebInspector.ProfilesPanel.prototype.addProfileHeader):
     15        (WebInspector.ProfilesPanel.prototype.showView):
     16        (WebInspector.ProfilesPanel.prototype._updateInterface):
     17        * inspector/front-end/WelcomeView.js:
     18        (WebInspector.WelcomeView):
     19        * inspector/front-end/inspector.css:
     20
    1212010-01-18  Holger Hans Peter Freyther  <zecke@selfish.org>
    222
  • trunk/WebCore/inspector/front-end/ProfilesPanel.js

    r53545 r53996  
    158158    {
    159159        WebInspector.Panel.prototype.show.call(this);
    160         this._updateInterface();
    161         if (!this.visibleView) {
    162             this.visibleView = this.welcomeView;
    163             this.welcomeView.show();
    164         }
    165         this.visibleView.show();
    166160        if (this._shouldPopulateProfiles)
    167161            this._populateProfiles();
     
    191185        for (var i = 0; i < this._profiles.length; ++i)
    192186            delete this._profiles[i]._profileView;
     187        delete this.visibleView;
    193188
    194189        delete this.currentQuery;
     
    210205
    211206        this._updateInterface();
     207        this.welcomeView.show();
    212208    },
    213209
     
    308304
    309305        sidebarParent.appendChild(profileTreeElement);
    310         if (!this.visibleView || this.visibleView === this.welcomeView)
     306        this.welcomeView.hide();
     307        if (!this.visibleView)
    311308            this.showProfile(profile);
    312309    },
     
    337334    showView: function(view)
    338335    {
    339         if (this.visibleView === view) {
    340             if (this.visibleView && !this.visibleView.visible)
    341                 view.show();
    342             return;
    343         }
    344 
    345         this._previousVisibleView = this.visibleView;
    346         if (view === this.welcomeView) {
    347             this.closeVisibleView();
    348             this.visibleView = view;
    349             view.show();
    350         } else
    351             this.showProfile(view.profile);
     336        this.showProfile(view.profile);
    352337    },
    353338
     
    452437            this.profileViewStatusBarItemsContainer.removeStyleClass("hidden");
    453438            this.panelEnablerView.visible = false;
    454             this.welcomeView.visible = true;
    455             this.visibleView = this._previousVisibleView || this.welcomeView;
    456439        } else {
    457440            this.enableToggleButton.title = WebInspector.UIString("Profiling disabled. Click to enable.");
     
    460443                this._profileTypeButtonsByIdMap[typeId].addStyleClass("hidden");
    461444            this.profileViewStatusBarItemsContainer.addStyleClass("hidden");
    462             this.welcomeView.visible = false;
    463445            this.panelEnablerView.visible = true;
    464             this.visibleView = this.panelEnablerView;
    465446        }
    466447    },
  • trunk/WebCore/inspector/front-end/WelcomeView.js

    r53545 r53996  
    4040    this.element.appendChild(this.contentElement);
    4141
    42     this.imageElement = document.createElement("img");
    43     this.contentElement.appendChild(this.imageElement);
     42    this.alignerElement = document.createElement("div");
     43    this.alignerElement.className = "welcome-instructions-aligner";
     44    this.contentElement.appendChild(this.alignerElement);
    4445
    4546    this.instructionsElement = document.createElement("div");
     
    5657
    5758WebInspector.WelcomeView.prototype = {
    58 
    59     show: function(parentElement)
    60     {
    61         WebInspector.View.prototype.show.call(this, parentElement);
    62 
    63         setTimeout(this.resize.bind(this), 0);
    64     },
    65 
    66     resize: function()
    67     {
    68         this.imageElement.removeStyleClass("hidden");
    69 
    70         if (this.element.offsetWidth < (this.instructionsElement.offsetWidth + this.imageElement.offsetWidth))
    71             this.imageElement.addStyleClass("hidden");
    72     },
    73 
    7459    addMessage: function(message)
    7560    {
  • trunk/WebCore/inspector/front-end/inspector.css

    r53856 r53996  
    22392239}
    22402240
    2241 .panel-enabler-view img {
     2241.panel-enabler-view img, div.welcome-instructions-aligner {
    22422242    height: 100%;
    22432243    min-height: 200px;
     
    22932293}
    22942294
    2295 .panel-enabler-view.welcome img {
    2296     height: 90%;
    2297     min-height: 180px;
    2298     max-width: 90%;
     2295.panel-enabler-view.welcome div.welcome-instructions-aligner {
     2296    display: inline-block;
     2297    width: 0;
    22992298}
    23002299
     
    23042303    width: 330px;
    23052304    margin: 0;
    2306     padding: 15px;
    23072305    white-space: normal;
    23082306    line-height: 175%;
     
    23222320}
    23232321
    2324 .panel-enabler-view button:active, .pane button:active {
     2322.panel-enabler-view button:active:not(.status-bar-item), .pane button:active {
    23252323    background-color: rgb(215, 215, 215);
    23262324    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
    23272325}
    23282326
    2329 body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled, body.inactive .pane button, .pane button:disabled {
     2327body.inactive .panel-enabler-view button:not(.status-bar-item), .panel-enabler-view button:disabled:not(.status-bar-item), body.inactive .pane button, .pane button:disabled {
    23302328    color: rgb(130, 130, 130);
    23312329    border-color: rgb(212, 212, 212);
Note: See TracChangeset for help on using the changeset viewer.