Changeset 172038 in webkit
- Timestamp:
- Aug 5, 2014 11:29:42 AM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r171940 r172038 1 2014-08-05 Saam Barati <sbarati@apple.com> 2 3 Web Inspector: shown() called on a content view when stepping over an instruction in the debugger 4 https://bugs.webkit.org/show_bug.cgi?id=135311 5 6 Reviewed by Timothy Hatcher. 7 8 ContentViewContainer should not repeatedly call ContentView.prototype.shown 9 on ContentViews that are already visible. ContentViewContainer now passes 10 a flag to BackForwardEntry.prototype.prepareToShow indicating whether it should 11 call the shown function on the ContentView it is about to display. 12 ContentViewContainer.prototype.showBackForwardEntryForIndex passes in this 13 flag based on its ContentView being visible. 14 15 * UserInterface/Models/BackForwardEntry.js: 16 (WebInspector.BackForwardEntry.prototype.prepareToShow): 17 * UserInterface/Views/ContentViewContainer.js: 18 (WebInspector.ContentViewContainer.prototype.showBackForwardEntryForIndex): 19 (WebInspector.ContentViewContainer.prototype.replaceContentView): 20 (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype): 21 (WebInspector.ContentViewContainer.prototype.shown): 22 (WebInspector.ContentViewContainer.prototype._showEntry): 23 1 24 2014-08-01 Jonathan Wells <jonowells@apple.com> 2 25 -
trunk/Source/WebInspectorUI/UserInterface/Models/BackForwardEntry.js
r164543 r172038 53 53 }, 54 54 55 prepareToShow: function( )55 prepareToShow: function(shouldCallShown) 56 56 { 57 57 this._restoreFromCookie(); 58 58 59 59 this.contentView.visible = true; 60 this.contentView.shown(); 60 if (shouldCallShown) 61 this.contentView.shown(); 61 62 this.contentView.updateLayout(); 62 63 }, -
trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js
r164543 r172038 191 191 return; 192 192 193 // Hide the currently visible content view.194 193 var previousEntry = this.currentBackForwardEntry; 195 if (previousEntry)196 this._hideEntry(previousEntry);197 198 194 this._currentIndex = index; 199 195 var currentEntry = this.currentBackForwardEntry; 200 196 console.assert(currentEntry); 201 197 202 this._showEntry(currentEntry); 198 var isNewContentView = !previousEntry || !currentEntry.contentView.visible; 199 if (isNewContentView) { 200 // Hide the currently visible content view. 201 if (previousEntry) 202 this._hideEntry(previousEntry); 203 this._showEntry(currentEntry, true); 204 } else 205 this._showEntry(currentEntry, false); 203 206 204 207 this.dispatchEventToListeners(WebInspector.ContentViewContainer.Event.CurrentContentViewDidChange); … … 241 244 // Re-show the current entry, because its content view instance was replaced. 242 245 if (currentlyShowing) { 243 this._showEntry(this.currentBackForwardEntry );246 this._showEntry(this.currentBackForwardEntry, true); 244 247 this.dispatchEventToListeners(WebInspector.ContentViewContainer.Event.CurrentContentViewDidChange); 245 248 } … … 297 300 298 301 if (currentEntry && currentEntry.contentView !== oldCurrentContentView || backForwardListDidChange) { 299 this._showEntry(currentEntry );302 this._showEntry(currentEntry, true); 300 303 this.dispatchEventToListeners(WebInspector.ContentViewContainer.Event.CurrentContentViewDidChange); 301 304 } … … 353 356 return; 354 357 355 this._showEntry(currentEntry );358 this._showEntry(currentEntry, true); 356 359 }, 357 360 … … 394 397 }, 395 398 396 _showEntry: function(entry )399 _showEntry: function(entry, shouldCallShown) 397 400 { 398 401 console.assert(entry instanceof WebInspector.BackForwardEntry); 399 402 400 403 this._addContentViewElement(entry.contentView); 401 entry.prepareToShow( );404 entry.prepareToShow(shouldCallShown); 402 405 }, 403 406
Note: See TracChangeset
for help on using the changeset viewer.