<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: Tab Restoration may call shown on initial ContentView twice"
href="https://bugs.webkit.org/show_bug.cgi?id=145085">145085</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Web Inspector: Tab Restoration may call shown on initial ContentView twice
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>528+ (Nightly build)
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Web Inspector
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>joepeck@webkit.org
</td>
</tr>
<tr>
<th>CC</th>
<td>graouts@webkit.org, joepeck@webkit.org, jonowells@apple.com, mattbaker@apple.com, nvasilyev@apple.com, timothy@apple.com, webkit-bug-importer@group.apple.com
</td>
</tr></table>
<p>
<div>
<pre>* SUMMARY
Tab Restoration may call shown on initial ContentView twice.
* STEPS TO REPRODUCE
1. Inspect <<a href="http://bogojoker.com/shell/">http://bogojoker.com/shell/</a>>
2. In Debugger Tab select the "easySlider.min.js" resource => creates a SourceCodeTextEditor
3. Switch to the Elements Tab
4. Close Inspector => saves state of tabs
5. Open Inspector
6. Select Debugger Tab to trigger tab restoration
=> Unexpectedly the TextResourceContentView for "easySlider.min.js" gets "shown" called twice.
* TRACES
- Note that BackForwardEntry._restoreFromCookie seems to be the culprit.
- it restores some ContentView and calls shown()
- it then proceeds to call shown() again on what it just showed.
Views/SourceCodeTextEditor.js:100:20: CONSOLE LOG SourceCodeTextEditor.shown <a href="http://bogojoker.com/shell/js/easySlider.min.js">http://bogojoker.com/shell/js/easySlider.min.js</a>
Views/SourceCodeTextEditor.js:101:22: CONSOLE TRACE
0: shown(Views/SourceCodeTextEditor.js:101:22)
1: shown(Views/TextResourceContentView.js:104:31)
2: prepareToShow(Models/BackForwardEntry.js:61:35)
3: _showEntry(Views/ContentViewContainer.js:472:28)
4: showBackForwardEntryForIndex(Views/ContentViewContainer.js:212:28)
5: showContentView(Views/ContentViewContainer.js:188:42)
6: _showContentViewForIdentifier(Views/ResourceClusterContentView.js:236:57)
7: restoreFromCookie(Views/ResourceClusterContentView.js:147:61)
8: _restoreFromCookie(Models/BackForwardEntry.js:78:43)
9: prepareToShow(Models/BackForwardEntry.js:57:32)
10: _showEntry(Views/ContentViewContainer.js:472:28)
11: showBackForwardEntryForIndex(Views/ContentViewContainer.js:212:28)
12: showContentView(Views/ContentViewContainer.js:188:42)
13: showContentViewForRepresentedObject(Views/ContentBrowser.js:168:58)
14: showDefaultContentViewForTreeElement(Views/NavigationSidebarPanel.js:196:64)
15: _checkElementsForPendingViewStateCookie(Views/NavigationSidebarPanel.js:701:54)
16: _checkOutlinesForPendingViewStateCookie(Views/NavigationSidebarPanel.js:656:60)
17: finalAttemptToRestoreViewStateFromCookie(Views/NavigationSidebarPanel.js:242:57)
18: finalAttemptToRestoreViewStateFromCookie([native code])
Views/SourceCodeTextEditor.js:100:20: CONSOLE LOG SourceCodeTextEditor.shown <a href="http://bogojoker.com/shell/js/easySlider.min.js">http://bogojoker.com/shell/js/easySlider.min.js</a>
Views/SourceCodeTextEditor.js:101:22: CONSOLE TRACE
0: shown(Views/SourceCodeTextEditor.js:101:22)
1: shown(Views/TextResourceContentView.js:104:31)
2: prepareToShow(Models/BackForwardEntry.js:61:35)
3: _showEntry(Views/ContentViewContainer.js:472:28)
4: shown(Views/ContentViewContainer.js:425:24)
5: shown(Views/ClusterContentView.js:75:41)
6: shown(Views/ResourceClusterContentView.js:125:61)
7: prepareToShow(Models/BackForwardEntry.js:61:35)
8: _showEntry(Views/ContentViewContainer.js:472:28)
9: showBackForwardEntryForIndex(Views/ContentViewContainer.js:212:28)
10: showContentView(Views/ContentViewContainer.js:188:42)
11: showContentViewForRepresentedObject(Views/ContentBrowser.js:168:58)
12: showDefaultContentViewForTreeElement(Views/NavigationSidebarPanel.js:196:64)
13: _checkElementsForPendingViewStateCookie(Views/NavigationSidebarPanel.js:701:54)
14: _checkOutlinesForPendingViewStateCookie(Views/NavigationSidebarPanel.js:656:60)
15: finalAttemptToRestoreViewStateFromCookie(Views/NavigationSidebarPanel.js:242:57)
16: finalAttemptToRestoreViewStateFromCookie([native code])</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>