[webkit-reviews] review granted: [Bug 40107] Impossible to set input method hints based HTML5 input types : [Attachment 58246] 2nd proposal for fix.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 9 08:21:31 PDT 2010


Kenneth Rohde Christiansen <kenneth at webkit.org> has granted Raine Makelainen
<raine.makelainen at nokia.com>'s request for review:
Bug 40107: Impossible to set input method hints based HTML5 input types
https://bugs.webkit.org/show_bug.cgi?id=40107

Attachment 58246: 2nd proposal for fix.
https://bugs.webkit.org/attachment.cgi?id=58246&action=review

------- Additional Comments from Kenneth Rohde Christiansen
<kenneth at webkit.org>

> +	       if
(frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) {
> +		   inputElement =
static_cast<HTMLInputElement*>(frame->document()->focusedNode());
>	       }

Should not use braces.


> +		   bool isPasswordField = false;
> +		   active = isPasswordField = inputElement->isPasswordField();

The - false here is useless.

> +		   webPageClient->setInputMethodHint(Qt::ImhHiddenText,
isPasswordField);
> +	       } else {
> +		   // Set input method hints for "number", "tel", "email", and
"url" input elements.
> +		  
webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly,
inputElement->isTelephoneField());
> +		   webPageClient->setInputMethodHint(Qt::ImhDigitsOnly,
inputElement->isNumberField());
> +		  
webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly,
inputElement->isEmailField());
> +		   webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly,
inputElement->isUrlField());

Are *ALL* of these defined for Qt 4.6 ? If not, we need some ifdefs. I do not
believe that Email is available for instance.

r=me with these fixes.


More information about the webkit-reviews mailing list