• graouts@apple.com's avatar
    Console buttons don’t show after page reload · 0f949982
    graouts@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=116515
    
    Reviewed by Darin Adler.
    
    The correct display of navigation items in the ContentBrowser is contingent on
    the ContentViewContainer's _backForwardList being up-to-date when the navigation
    items are retrieved from it. However, when the main resource changes (in this case
    the user refreshes the browser), calls are made to ContentViewContainer's
    closeAllContentViewsOfPrototype() which may modify the _backForwardList but doesn't
    necessarily notify of a change to the currentContentView since we may be still showing
    the same view in case it wasn't directly related to the main resource, for instance
    the console log.
    
    We now check if the _backForwardList is changed as a result of calling
    closeAllContentViewsOfPrototype() and in that case also dispatch the
    CurrentContentViewDidChange event which will restore the correct state
    for the back/forward buttons and navigation items of the navigation bar.
    
    * UserInterface/ContentViewContainer.js:
    (WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype):
    Track changes to the _backForwardList and dispatch the CurrentContentViewDidChange
    event in case such changes happened.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    0f949982
ChangeLog 99.1 KB