Bug 143793

Summary: Web Inspector: "Log Value" of a value inside of an array, does not log the innermost value
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: burg, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix burg: review+

Description Joseph Pecoraro 2015-04-15 13:06:08 PDT
* SUMMARY
"Log Value" of a value inside of an array, does not log the innermost value.

* STEPS TO REPRODUCE
1. js> myObject = { array: [1, {name:"Joe", age:123}] }; dir(myObject)
2. Expand all the way to the inner object
3. Right click "name" and choose "Log Value"
  => Expected "Joe", but got the containing object {name: "Joe", age: 123}
Comment 1 Radar WebKit Bug Importer 2015-04-15 13:06:45 PDT
<rdar://problem/20558139>
Comment 2 Joseph Pecoraro 2015-04-15 13:18:51 PDT
This happens because the GeneralTreeElement event handlers are "useCapture" and thus capture top down. Removing capture mode things work as expected.
Comment 3 Joseph Pecoraro 2015-04-15 21:08:13 PDT
Reusing this to improve context menus in the console in general.
Comment 4 Joseph Pecoraro 2015-04-15 21:32:29 PDT
Created attachment 250898 [details]
[PATCH] Proposed Fix
Comment 5 Brian Burg 2015-04-16 08:08:31 PDT
Comment on attachment 250898 [details]
[PATCH] Proposed Fix

r=me

Any intuition for why this used to be a capturing handler?
Comment 6 Timothy Hatcher 2015-04-16 10:18:04 PDT
(In reply to comment #5)
> Comment on attachment 250898 [details]
> [PATCH] Proposed Fix
> 
> r=me
> 
> Any intuition for why this used to be a capturing handler?

Joe asked me about it before posting this and I had no clue. Likely legacy and a mistake.
Comment 7 Joseph Pecoraro 2015-04-16 13:55:55 PDT
http://trac.webkit.org/changeset/182909