[Webkit-unassigned] [Bug 38568] <input type=number> UI: Support disabled/readonly states

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 24 04:29:01 PDT 2010


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





--- Comment #6 from Kent Tamura <tkent at chromium.org>  2010-06-24 04:29:01 PST ---
Thank you for reviewing.

(In reply to comment #2)
> (From update of attachment 55098 [details])
> Mostly questions and nits.
> 
> WebCore/rendering/TextControlInnerElements.cpp:244
>  +      bool insideBox = local.x() >= 0 && local.x() < box->width() && local.y() >= 0 && local.y() < box->height();
> Why this manual comparison instead of the contains() call you're replacing below?

I don't remember what I thought...
contains() should be ok.  I reverted this part.

> WebCore/rendering/TextControlInnerElements.cpp: 
>  +              if (local.y() < renderBox()->y() + renderBox()->height() / 2)
> What happened to the renderBox()->y() part of this computation?

'local' is relative to this RenderBox.  So we don't need to add renderBox()->y().

> WebCore/rendering/TextControlInnerElements.h:81
>  +      virtual bool isEnabledFormControl() const { return static_cast<Element*>(const_cast<SpinButtonElement*>(this)->shadowAncestorNode())->isEnabledFormControl(); }
> const_cast?  We should be able to write this code without const_cast.

I agree.  We need to make Node::shadowAncestroNode() const.  I'd like to address it in a separated bug.

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