Bug 140513

Summary: Web Inspector: Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, simon.fraser, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2015-01-15 14:14:46 PST
* SUMMARY
Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM. Very annoying!

* STEPS TO REPRODUCE
1. Load http://www.nytimes.com/interactive/2015/01/09/sports/el-capitan-2d-image.html
2. Inspect an element on the page
3. Close Inspector
4. Re-open Inspector
  => sub-frame selected instead of main frame

* NOTES
- Somewhat related to bug 139593
Comment 1 Radar WebKit Bug Importer 2015-01-15 14:15:15 PST
<rdar://problem/19490093>
Comment 2 Joseph Pecoraro 2015-01-15 17:20:14 PST
Created attachment 244735 [details]
[PATCH] Proposed Fix

I think ideally we would have a way to uniquely identify sub-frames, but really we don't have much more information than their URL and maybe frame index (which could change). Specifically identifying the main frame I think is a good compromise, at least that is guaranteed to be unique.
Comment 3 Simon Fraser (smfr) 2015-01-15 18:09:48 PST
Comment on attachment 244735 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=244735&action=review

> Source/WebInspectorUI/ChangeLog:11
> +        Specifically identify the main frame, so that any sub-frames with the same
> +        URL, don't get choosen over the main frame when restoring state from cookie.

Why do subframes get the same URL? It seems very unlikely that sites are loading the same url in subframes.
Comment 4 Joseph Pecoraro 2015-01-15 18:18:28 PST
Thats what I want to investigate in bug 139593.
Comment 5 WebKit Commit Bot 2015-01-15 18:53:05 PST
Comment on attachment 244735 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 244735

Committed r178569: <http://trac.webkit.org/changeset/178569>
Comment 6 WebKit Commit Bot 2015-01-15 18:53:11 PST
All reviewed patches have been landed.  Closing bug.