Closed Bug 857262 Opened 11 years ago Closed 10 years ago

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

Categories

(DevTools :: Inspector, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 33

People

(Reporter: bzbarsky, Assigned: sjakthol)

Details

Attachments

(1 file)

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>.
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 ☺
Ummm. w/o the typo in <param ofc :-/
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.
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).
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: 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
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: