|
https://bugs.webkit.org/show_bug.cgi?id=70304
Patch by Dongwoo Im <dw.im@samsung.com> on 2012-05-07
Reviewed by Darin Adler.
If the type of input element is image button, width/height attributes should be supported.
These attributes are defined in HTML5 spec.
http://www.w3.org/TR/html5/the-map-element.html#attr-dim-width
Source/WebCore:
Tests: fast/forms/input-width-height-attributes-without-renderer-loaded-image.html
fast/forms/input-width-height-attributes-without-renderer-not-loaded-image.html
fast/forms/input-width-height-attributes-without-renderer.html
fast/forms/input-width-height-attributes.html
* html/HTMLInputElement.cpp: Add setter/getter functions to query/set width/height of input element.
(WebCore):
(WebCore::HTMLInputElement::height): Gets height of input element.
(WebCore::HTMLInputElement::width): Gets width of input element.
(WebCore::HTMLInputElement::setHeight): Sets height of input element.
(WebCore::HTMLInputElement::setWidth): Sets width of input element.
* html/HTMLInputElement.h: Add public prototype.
(HTMLInputElement):
* html/HTMLInputElement.idl: Add width/height attributes.
* html/ImageInputType.cpp: Add getter functions if the element is an image button.
(WebCore):
(WebCore::ImageInputType::height): Gets height of input element.
(WebCore::ImageInputType::width): Gets width of input element.
* html/ImageInputType.h: Add prototype.
(ImageInputType):
* html/InputType.cpp: Add getter functions.
(WebCore::InputType::height): Returns zero.
(WebCore):
(WebCore::InputType::width): Returns zero.
* html/InputType.h: Add prototype.
(InputType):
LayoutTests:
* fast/forms/input-width-height-attributes-expected.txt: Added.
* fast/forms/input-width-height-attributes-without-renderer-expected.txt: Added.
* fast/forms/input-width-height-attributes-without-renderer-loaded-image-expected.txt: Added.
* fast/forms/input-width-height-attributes-without-renderer-loaded-image.html: Added.
* fast/forms/input-width-height-attributes-without-renderer-not-loaded-image-expected.txt: Added.
* fast/forms/input-width-height-attributes-without-renderer-not-loaded-image.html: Added.
* fast/forms/input-width-height-attributes-without-renderer.html: Added.
* fast/forms/input-width-height-attributes.html: Added.
* fast/forms/resources/green.jpg: Added.
* fast/forms/resources/image-slow.pl: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@116389 bbb929c8-8fbe-4397-9dbb-9b2b20218538
|