[Webkit-unassigned] [Bug 70304] width/height attributes of input element should be supported when the type of the input element is image.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 4 22:36:02 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=70304





--- Comment #29 from Dongwoo Joshua Im <dw.im at samsung.com>  2011-11-04 22:36:02 PST ---
(In reply to comment #25)
> (From update of attachment 113447 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=113447&action=review

> > Source/WebCore/html/HTMLInputElement.cpp:1017
> > +int HTMLInputElement::height() const
> 
> Why is this "int"?

I need to use getAttribute(widthAttr) to get the width.
The return value is string type, so I need to change the type.

As I know, toInt, toDouble, and toFloat are supported by wtf/text.
There are no 'toLong', or 'toUnsignedLong' functions.

That is the reason why the return type of width() function is int.


As you recommended, I refer the implementation of the HTMLImageElement.

The width attribute is 'long' type in idl file,
but, in the header file, the return type of width() function is 'int.'
And, the argument of setWidth() function is also 'int'.

In the HTMLInputElement, size attribute is 'unsigned long' type in idl file,
the return type of size() function in header file is 'int', as well.


IMHO, using 'int' as return type of width() and height() is reasonable.


But if you worried about it, 
I will use 'unsigned' as return type by casting the result of 'toInt'.

Please let me know your opinion.

Thanks.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list