Closed Bug 905240 Opened 6 years ago Closed 6 years ago

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

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: mounir, Assigned: mounir)

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(1 file)

Attached patch PachSplinter Review
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)
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+
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
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.