Closed Bug 169512 Opened 23 years ago Closed 22 years ago

object tag doesn't return width or height when displaying image

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED INVALID
mozilla1.5alpha

People

(Reporter: neil, Assigned: bzbarsky)

References

Details

(Keywords: qawanted, testcase)

Attachments

(1 file)

If I use an <object> tag to display an image and I try to read the width and height, I just get an empty string. When I do the exact same thing with an <img> tag I get the actual width and height of the image, even if it wasn't specified.
I suspect the only reason that .height/.width on image reflects the "actual" size instead of the attr is for DOM0 reasons.... In any case, making <object> and <img> use the same code here would not be too hard if we decided we want it.
Keywords: qawanted
OS: Windows 2000 → All
Hardware: PC → All
http://mozilla.org/quality/ngdriver/suites/dom-html/hobj017.html is a testcase which sets the height and tries to read the value, It is working fine. Boris, you added the qawanted keyword, what are you expecting from QA.
Keywords: testcase
The point is, for images you can read the "displayed height" without setting the value manually. I'm expecting an evaluation of what the spec says on this issue and what our behavior should be....
Object is a generic element and can be used for specific elements like "img, applet, iframe". So i think "object" should have the same behaviour as an img|applet|iframe.
Well, those three are inconsistent in how they treat the width/height properties, as far as I can tell.
Well, object element being generic of those three elements, it should be consistant across all these elements.
Mass-reassigning bugs.
Assignee: jst → dom_bugs
Depends on: 83774
Taking this so I can keep track of this. I have sent mail to www-dom@w3.org requesting clarification (which is what I was requesting QA do, as it happens.... see comment 4)
Assignee: dom_bugs → bzbarsky
Priority: -- → P3
Target Milestone: --- → mozilla1.5alpha
This could use a testcase that compares with IE behavior (the testcase at http://mozilla.org/quality/ngdriver/suites/dom-html/hobj017.html makes IE barf).
actually... that url works in my ie (tested using 6.0sp1), it gives the expected result what does make ie barf for me is the attachment to this bug
> it gives the expected result Oh, right. That one actually sets the values... so it's not very useful for this bug.
OK, I see no reason to change our behavior, since it follows the DOM spec and IE apparently has the same behavior we do. So....
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: