Summary: | REGRESSION (r34109): "Inspect Element" on a node in a subframe doesn't highlight that node | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Adam Roben (:aroben) <aroben> | ||||
Component: | Web Inspector (Deprecated) | Assignee: | Timothy Hatcher <timothy> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, collinj, pen, rik, rob.tsuk, timothy | ||||
Priority: | P2 | Keywords: | Regression | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
URL: | http://tivofaq.com/ | ||||||
Attachments: |
|
Description
Adam Roben (:aroben)
2008-06-03 09:39:32 PDT
I think this was caused by r31890. What's happening is we're ending up with two JSInspectedObjectWrappers for the same JSHTMLHtmlElement. The two wrappers have different global objects. Presumably one of them is the subframe's global object and one of them is the main frame's. The effect of this is that the two wrappers fail a strict equality check (they'd fail a non-strict equality check, too). (In reply to comment #1) > Presumably one of them is the subframe's global > object and one of them is the main frame's. This guess turns out to be correct. Actually, I suspect that r34109 was the cause of this bug. That change caused us to start caching wrappers per-global object. Prior to that we only had one wrapper for each JS object. Created attachment 22430 [details]
Proposed patch
Comment on attachment 22430 [details]
Proposed patch
"sameObjects" is a somewhat awkward name for an equality function. I think it needs some version of "to be" in it, like "areSameObject" or "objectsAreSame" or "objectsAreEqual". It also seems like we might as well call up to C++ to do the comparison on the unwrapped objects for real, if we're sending everything through a single bottleneck anyway.
r=me, but do consider renaming sameObjects.
|