Inspector does not seem to allow inspecting descendants of <object>

RESOLVED FIXED in Firefox 33

Status

()

Firefox
Developer Tools: Inspector
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: bz, Assigned: Sami Jaktholm)

Tracking

unspecified
Firefox 33
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This testcase:

  <object><div style="color: green; background: yellow">xyz</div></object>

doesn't let me use the inspector to inspect the <div>.

This is a problem in common usage when the outer <object> is ActiveX and there's a fallback <object> or embed for the real thing.  It's also a problem when someone wants to inspect the <param>s of an <object>.

Comment 1

5 years ago
And, annoyingly, <object codebase="flash"><param <param name="src" value="foo" /></object> fails to show the params, which made it hard for me to tell what video it was pointing at ☺

Comment 2

5 years ago
Ummm. w/o the typo in <param ofc :-/

Comment 3

4 years ago
Just discovered this bug to on Windows 7 64-bit with Firefox 25.0.
I wanted to view the <param>'s inside a <object> but there was none in the inspector so i just thought that was how the code was but no.
Guess you cant relay on inspector to be accurate, just like it switches the attributes around and add code that issent in the sourcecode.

Comment 4

3 years ago
scott, I just had to comment on the "adding code" thing.
I've had quirks in inspector that didn't happen in firebug (like stuff I did not applying on the page) but the "adding code" thing is very normal and common in debug tools.
Is 'cause these tools are presenting a parsed valid DOM structure.  Like, the real web page may have interleaved tags, missing closing tags... Chunks of the page may be constantly being manipulated in javascript... The inspector is trying to show you what the web browser is trying to operate on.  View Source is for the raw source without any of this (it'll also thoughtfully highlight errors in red).
(Assignee)

Comment 5

3 years ago
Created attachment 8459266 [details] [diff] [review]
inspector-dom-walker-reparent-object.patch

DocumentWalker tries to detect if it needs to reparent itself to an SVGDocument by checking if an element implements getSVGDocument method. The problem here is that object element always implements getSVGDocument method whether or not it contains one. If <object> doesn't contain an SVGDocument, DocumentWalker aborts the child resolution as it tries to reparent itself on a null document.

This patch checks that getSVGDocument actually returns a document before attempting to reparent to an SVGDocument. It also includes a small test case to check the functionality.

Try: https://tbpl.mozilla.org/?tree=Try&rev=6abc2f5234d1
Attachment #8459266 - Flags: review?(mratcliffe)
Attachment #8459266 - Flags: review?(mratcliffe) → review+
(Assignee)

Updated

3 years ago
Assignee: nobody → sjakthol
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/33c83c1d9980
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/33c83c1d9980
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
You need to log in before you can comment on or make changes to this bug.