Changeset 239649 in webkit


Ignore:
Timestamp:
Jan 4, 2019 5:23:52 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: subclasses of WI.ClusterContentView don't save/restore content views after the initial view
https://bugs.webkit.org/show_bug.cgi?id=192451
<rdar://problem/46800958>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-04
Reviewed by Devin Rousso.

  • UserInterface/Models/BackForwardEntry.js:

(WI.BackForwardEntry.prototype.prepareToHide):

  • UserInterface/Views/ClusterContentView.js:

(WI.ClusterContentView.prototype.get shouldSaveStateOnHide):

  • UserInterface/Views/ContentView.js:

(WI.ContentView.prototype.get shouldSaveStateOnHide):
Allow ClusterContentViews to save its state whenever its hidden,
this means it can be properly restored to the last state it had
instead of the initial state it was shown with.

Location:
trunk/Source/WebInspectorUI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r239646 r239649  
     12019-01-04  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: subclasses of WI.ClusterContentView don't save/restore content views after the initial view
     4        https://bugs.webkit.org/show_bug.cgi?id=192451
     5        <rdar://problem/46800958>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * UserInterface/Models/BackForwardEntry.js:
     10        (WI.BackForwardEntry.prototype.prepareToHide):
     11        * UserInterface/Views/ClusterContentView.js:
     12        (WI.ClusterContentView.prototype.get shouldSaveStateOnHide):
     13        * UserInterface/Views/ContentView.js:
     14        (WI.ContentView.prototype.get shouldSaveStateOnHide):
     15        Allow ClusterContentViews to save its state whenever its hidden,
     16        this means it can be properly restored to the last state it had
     17        instead of the initial state it was shown with.
     18
    1192019-01-04  Devin Rousso  <drousso@apple.com>
    220
  • trunk/Source/WebInspectorUI/UserInterface/Models/BackForwardEntry.js

    r220119 r239649  
    9494
    9595        this._saveScrollPositions();
     96
     97        if (this._contentView.shouldSaveStateWhenHidden) {
     98            this._cookie = {};
     99            this._contentView.saveToCookie(this._cookie);
     100        }
    96101    }
    97102
  • trunk/Source/WebInspectorUI/UserInterface/Views/ClusterContentView.js

    r220119 r239649  
    6262    }
    6363
     64    get shouldSaveStateWhenHidden()
     65    {
     66        return true;
     67    }
     68
    6469    shown()
    6570    {
  • trunk/Source/WebInspectorUI/UserInterface/Views/ContentView.js

    r238484 r239649  
    356356    }
    357357
     358    get shouldSaveStateWhenHidden()
     359    {
     360        return false;
     361    }
     362
    358363    get selectionPathComponents()
    359364    {
Note: See TracChangeset for help on using the changeset viewer.