Bug 90818
Summary: | Width and height content attributes are not exposed on image input field | ||
---|---|---|---|
Product: | WebKit | Reporter: | Niels Leenheer (HTML5test) <info> |
Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ap, jonlee, tkent |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Niels Leenheer (HTML5test)
According to the HTML5 spec, both the width and height property of an image field should return the dimensions of the rendered image or 0 if the dimensions are not known:
http://www.w3.org/TR/html5/states-of-the-type-attribute.html#image-button-state-type-image
e = document.createElement('input');
e.type = 'image';
Actual results:
'height' in e;
> false
typeof e.height;
> "undefined"
'width' in e;
> false
typeof e.width;
> "undefined"
Expected results:
'height' in e;
> true
typeof e.height;
> "number"
'width' in e;
> true
typeof e.width;
> "height"
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kent Tamura
Would you try WebKit nightly or Google Chrome 21+ please?
Niels Leenheer (HTML5test)
(In reply to comment #1)
> Would you try WebKit nightly or Google Chrome 21+ please?
Seems to work (with some issues) on Chrome 22.
Filed bug #90885 for a crash that I experienced while accessing the width and height property.
Kent Tamura
*** This bug has been marked as a duplicate of bug 70304 ***