Changeset 53996 in webkit
- Timestamp:
- Jan 28, 2010 4:34:02 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53995 r53996 1 2010-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 1 21 2010-01-18 Holger Hans Peter Freyther <zecke@selfish.org> 2 22 -
trunk/WebCore/inspector/front-end/ProfilesPanel.js
r53545 r53996 158 158 { 159 159 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();166 160 if (this._shouldPopulateProfiles) 167 161 this._populateProfiles(); … … 191 185 for (var i = 0; i < this._profiles.length; ++i) 192 186 delete this._profiles[i]._profileView; 187 delete this.visibleView; 193 188 194 189 delete this.currentQuery; … … 210 205 211 206 this._updateInterface(); 207 this.welcomeView.show(); 212 208 }, 213 209 … … 308 304 309 305 sidebarParent.appendChild(profileTreeElement); 310 if (!this.visibleView || this.visibleView === this.welcomeView) 306 this.welcomeView.hide(); 307 if (!this.visibleView) 311 308 this.showProfile(profile); 312 309 }, … … 337 334 showView: function(view) 338 335 { 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); 352 337 }, 353 338 … … 452 437 this.profileViewStatusBarItemsContainer.removeStyleClass("hidden"); 453 438 this.panelEnablerView.visible = false; 454 this.welcomeView.visible = true;455 this.visibleView = this._previousVisibleView || this.welcomeView;456 439 } else { 457 440 this.enableToggleButton.title = WebInspector.UIString("Profiling disabled. Click to enable."); … … 460 443 this._profileTypeButtonsByIdMap[typeId].addStyleClass("hidden"); 461 444 this.profileViewStatusBarItemsContainer.addStyleClass("hidden"); 462 this.welcomeView.visible = false;463 445 this.panelEnablerView.visible = true; 464 this.visibleView = this.panelEnablerView;465 446 } 466 447 }, -
trunk/WebCore/inspector/front-end/WelcomeView.js
r53545 r53996 40 40 this.element.appendChild(this.contentElement); 41 41 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); 44 45 45 46 this.instructionsElement = document.createElement("div"); … … 56 57 57 58 WebInspector.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 74 59 addMessage: function(message) 75 60 { -
trunk/WebCore/inspector/front-end/inspector.css
r53856 r53996 2239 2239 } 2240 2240 2241 .panel-enabler-view img {2241 .panel-enabler-view img, div.welcome-instructions-aligner { 2242 2242 height: 100%; 2243 2243 min-height: 200px; … … 2293 2293 } 2294 2294 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; 2299 2298 } 2300 2299 … … 2304 2303 width: 330px; 2305 2304 margin: 0; 2306 padding: 15px;2307 2305 white-space: normal; 2308 2306 line-height: 175%; … … 2322 2320 } 2323 2321 2324 .panel-enabler-view button:active , .pane button:active {2322 .panel-enabler-view button:active:not(.status-bar-item), .pane button:active { 2325 2323 background-color: rgb(215, 215, 215); 2326 2324 background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239))); 2327 2325 } 2328 2326 2329 body.inactive .panel-enabler-view button , .panel-enabler-view button:disabled, body.inactive .pane button, .pane button:disabled {2327 body.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 { 2330 2328 color: rgb(130, 130, 130); 2331 2329 border-color: rgb(212, 212, 212);
Note: See TracChangeset
for help on using the changeset viewer.