HTMLInputElement.{width,height} getter should return 0 for type!='image'

RESOLVED FIXED in mozilla26

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

({dev-doc-complete, site-compat})

Trunk
mozilla26
dev-doc-complete, site-compat
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 790298 [details] [diff] [review]
Pach

That is what Blink and the specifications seem to do. Have not checked IE and Webkit though. I assumes that the specification specified the sanest behaviour.
Attachment #790298 - Flags: review?(Ms2ger)
Keywords: dev-doc-needed
Comment on attachment 790298 [details] [diff] [review]
Pach

Review of attachment 790298 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, and sorry for the delay.

::: content/html/content/test/forms/test_input_attributes_reflection.html
@@ +28,5 @@
> +  element[attr] = 12;
> +  is(element.getAttribute(attr), '12', 'setting ' + attr + ' changes the content attribute');
> +
> +  element.removeAttribute(attr);
> +  is(element.getAttribute(attr), null);

Please use ise() when comparing to null

@@ +36,5 @@
> +  document.getElementById('content').appendChild(element);
> +  isnot(element[attr], 0, attr + ' represents the dimension of the element if type=image');
> +
> +  element.setAttribute(attr, '42');
> +  isnot(element[attr], 0, attr + ' represents the dimension of the element if type=image');

Consider also testing that it doesn't return 42
Attachment #790298 - Flags: review?(Ms2ger) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6890020285a1
Flags: in-testsuite+
Target Milestone: --- → mozilla26
https://hg.mozilla.org/mozilla-central/rev/6890020285a1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.