WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
168105
Web Inspector: ContentViewContainer can have redundant back-forward entries after ContentView close
https://bugs.webkit.org/show_bug.cgi?id=168105
Summary
Web Inspector: ContentViewContainer can have redundant back-forward entries a...
Matt Baker
Reported
2017-02-09 22:11:21 PST
Summary: ContentViewContainer can have redundant back-forward entries content view close. The container guards against adding a BackForwardEntry with the same ContentView/cookie as the current entry, but doesn't check that consecutive entries are unique after replacing/splicing an entry in the list. Note: This doesn't seem to cause any bad behavior, but it can make ContentViewContainer debugging unnecessarily complicated and would be nice to fix. Steps to Reproduce: 1. Open Inspector 2. Switch back and forth between two tabs (Debugger/Elements) multiple times. 3. Open Inspector² 4. Console prompt: `WebInspector.tabBrowser._contentViewContainer._backForwardList` => Outputs something like: BackForwardEntry {_listeners: null, _contentView: ElementsTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} BackForwardEntry {_listeners: null, _contentView: DebuggerTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} BackForwardEntry {_listeners: null, _contentView: ElementsTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} BackForwardEntry {_listeners: null, _contentView: DebuggerTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} BackForwardEntry {_listeners: null, _contentView: ElementsTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} BackForwardEntry {_listeners: null, _contentView: DebuggerTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} ... 5. Close Elements tab 6. Re-run script in Inspector² => Expected: BackForwardEntry {_listeners: null, _contentView: DebuggerTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} => Actual: BackForwardEntry {_listeners: null, _contentView: DebuggerTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} BackForwardEntry {_listeners: null, _contentView: DebuggerTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} BackForwardEntry {_listeners: null, _contentView: DebuggerTabContentView, _tombstone: false, _cookie: {}, _scrollPositions: []} ...
Attachments
Patch
(8.42 KB, patch)
2017-02-09 22:18 PST
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Patch for landing
(8.47 KB, patch)
2017-02-10 16:07 PST
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Matt Baker
Comment 1
2017-02-09 22:18:43 PST
Created
attachment 301132
[details]
Patch
Joseph Pecoraro
Comment 2
2017-02-10 15:30:28 PST
Comment on
attachment 301132
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=301132&action=review
r=me
> Source/WebInspectorUI/ChangeLog:3 > + Web Inspector: ContentViewContainer can have redundant back-forward entries content view close
Please fix the grammar of the bug title. (I see you just did)
> Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js:470 > + _removeDuplicateBackForwardEntires()
Typo: Entires => Entries Note that this is only removing duplicate adjacent entries, right?
Matt Baker
Comment 3
2017-02-10 16:01:12 PST
Comment on
attachment 301132
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=301132&action=review
>> Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js:470 >> + _removeDuplicateBackForwardEntires() > > Typo: Entires => Entries > > Note that this is only removing duplicate adjacent entries, right?
Correct. Will rename to _removeAdjacentIdenticalBackForwardEntries() to better express the intent. The term "identical" is used in an existing comment around line 108.
Matt Baker
Comment 4
2017-02-10 16:07:49 PST
Created
attachment 301209
[details]
Patch for landing
WebKit Commit Bot
Comment 5
2017-02-10 16:46:17 PST
Comment on
attachment 301209
[details]
Patch for landing Clearing flags on attachment: 301209 Committed
r212166
: <
http://trac.webkit.org/changeset/212166
>
WebKit Commit Bot
Comment 6
2017-02-10 16:46:21 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug