[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
Thu Dec 1 01:39:50 PST 2011


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





--- Comment #36 from Dongwoo Joshua Im <dw.im at samsung.com>  2011-12-01 01:39:50 PST ---
(In reply to comment #35)
> (From update of attachment 117162 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=117162&action=review

> Test coverage is not good.  We should test height/image properties with non-image types.
> 
I will add some more test cases which try to set/get width and height of textbox or something.

> > Source/WebCore/html/HTMLInputElement.cpp:1022
> > +    if (!m_inputType->isImageButton())
> > +        return 0;
> > +
> 
> This type check is not needed. We can just call InputType::height().
> 
I think this kind of early return is preferred in WebKit.
I will remove this two lines.


> > Source/WebCore/html/HTMLInputElement.h:138
> > +    unsigned height(bool ignorePendingStylesheets = false) const;
> > +    unsigned width(bool ignorePendingStylesheets = false) const;
> 
> There are no call sites of ignorePendingStylesheets=true.  We should remove the ignorePendingStylesheets parameter.
> 
> The ignorePendingStylesheets parameter of HTMLImageElement::width() and height() was introduced by http://trac.webkit.org/changeset/7625. But it seems the parameter is not used now.
> 
Oh. I see.

> > Source/WebCore/html/ImageInputType.cpp:187
> > +        // check the attribute first for an explicit pixel valuea
> 
> A comment should be like a normal English sentences. It should start with a capital letter, and should end with '.'
> 
I didn't check the comments carefully.
I will re-write comments.

> > Source/WebCore/html/ImageInputType.h:69
> > +    virtual unsigned height(bool) const;
> > +    virtual unsigned width(bool) const;
> > +    virtual void setHeight(unsigned);
> > +    virtual void setWidth(unsigned);
> 
> We had better append OVERRIDE keyword to them.
> 
Yes!

-- 
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