Bug 140513 - Web Inspector: Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM
Summary: Web Inspector: Reopening the inspector can selects a sub-frame instead of the...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-01-15 14:14 PST by Joseph Pecoraro
Modified: 2015-01-15 18:53 PST (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.78 KB, patch)
2015-01-15 17:20 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.