RESOLVED FIXED 230286
Web Inspector: Don't maintain a back-forward stack for `ContentBrowser`/`ContentViewContainer` when not necessary
https://bugs.webkit.org/show_bug.cgi?id=230286
Summary Web Inspector: Don't maintain a back-forward stack for `ContentBrowser`/`Cont...
Patrick Angle
Reported 2021-09-14 18:16:10 PDT
Many content views explicitly request hidden back/forward navigation buttons, but many of them also do not need to maintain a full stack of back/forward history for navigation. This makes it more difficult for us to ensure that stale views are discarded in a timely manner, particularly on page reload.
Attachments
Patch v1.0 (15.87 KB, patch)
2021-09-14 18:38 PDT, Patrick Angle
no flags
Patch v1.1 (16.46 KB, patch)
2021-09-16 12:32 PDT, Patrick Angle
no flags
Patch v1.1.1 - Add reviewer to change log (16.45 KB, patch)
2021-09-16 12:33 PDT, Patrick Angle
no flags
Radar WebKit Bug Importer
Comment 1 2021-09-14 18:16:23 PDT
Patrick Angle
Comment 2 2021-09-14 18:38:22 PDT
Created attachment 438202 [details] Patch v1.0
Devin Rousso
Comment 3 2021-09-15 11:20:32 PDT
Comment on attachment 438202 [details] Patch v1.0 View in context: https://bugs.webkit.org/attachment.cgi?id=438202&action=review r=me, awesome stuff =D > Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js:32 > + disableBackForwardButtons: true, NIT: `disableBackForwardButtons` makes me think that it's gonna leave the buttons where they are but just `.enabled = false`. Perhaps `hideBackFowardButtons` instead? > Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js:33 > + disableBackForwardNavigation: true, Does this tab also need to remember selection like the Graphics Tab, or am I misremembering/mistaken? > Source/WebInspectorUI/UserInterface/Views/NetworkDetailView.js:88 > + this._contentBrowser = new WI.ContentBrowser(element, this, {disableBackForwardButtons: true, disableBackForwardNavigation: true, contentViewNavigationItemsFlexItem, contentViewNavigationItemsGroup}); I feel like this may want to keep a back-forward list for the various alternate representations of the resource's content (e.g. "Response" vs "Response (JSON)"). Can you confirm?
Patrick Angle
Comment 4 2021-09-16 12:12:46 PDT
Comment on attachment 438202 [details] Patch v1.0 View in context: https://bugs.webkit.org/attachment.cgi?id=438202&action=review >> Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js:33 >> + disableBackForwardNavigation: true, > > Does this tab also need to remember selection like the Graphics Tab, or am I misremembering/mistaken? I've confirmed you are correct - this was hidden before by Bug 230322 which hid either the only, or most noticeable, use for the stack in the Audit tab. >> Source/WebInspectorUI/UserInterface/Views/NetworkDetailView.js:88 >> + this._contentBrowser = new WI.ContentBrowser(element, this, {disableBackForwardButtons: true, disableBackForwardNavigation: true, contentViewNavigationItemsFlexItem, contentViewNavigationItemsGroup}); > > I feel like this may want to keep a back-forward list for the various alternate representations of the resource's content (e.g. "Response" vs "Response (JSON)"). Can you confirm? This state isn't remembered in ToT/STP... I'll open a bug for that.
Patrick Angle
Comment 5 2021-09-16 12:19:21 PDT
Comment on attachment 438202 [details] Patch v1.0 This patch appears to have unintentionally moved the "Response" format dropdown menu in network details from being right justified to being left justified because of a name mismatch for that variable in this patch. contentViewNavigationItemsGroup is also affected.
Patrick Angle
Comment 6 2021-09-16 12:32:46 PDT
Created attachment 438386 [details] Patch v1.1
Patrick Angle
Comment 7 2021-09-16 12:33:53 PDT
Created attachment 438387 [details] Patch v1.1.1 - Add reviewer to change log
EWS
Comment 8 2021-09-16 15:35:33 PDT
Committed r282610 (241770@main): <https://commits.webkit.org/241770@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 438387 [details].
Note You need to log in before you can comment on or make changes to this bug.