[webkit-reviews] review granted: [Bug 84571] [BlackBerry] Input Range element expects mouse events : [Attachment 138559] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 24 07:40:43 PDT 2012
Antonio Gomes <tonikitoo at webkit.org> has granted Charles Wei
<charles.wei at torchmobile.com.cn>'s request for review:
Bug 84571: [BlackBerry] Input Range element expects mouse events
https://bugs.webkit.org/show_bug.cgi?id=84571
Attachment 138559: Patch
https://bugs.webkit.org/attachment.cgi?id=138559&action=review
------- Additional Comments from Antonio Gomes <tonikitoo at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=138559&action=review
> Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp:79
> +static bool isRangeControlElement(Element* element)
> +{
> + if (element->hasTagName(HTMLNames::inputTag)) {
> + HTMLInputElement* inputElement =
static_cast<HTMLInputElement*>(element);
> + if (inputElement->isRangeControl())
> + return true;
> + }
> + return false;
> +}
lets write this as
static bool isRangeControlElement(Element* elemenet)
{
assert(element);
if (!element->hastagname(htmlnames::inputtag))
return;
htmlinputelement inputelement = static_cast<htmlinputelement*>(element);
return inputelement->israngecontrol();
}
note the assert and the early return.
More information about the webkit-reviews
mailing list