Bug 111026

Summary: [EFL][WK2] Enable interactive form validation for email and url input type validation
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit EFLAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, laszlo.gombos, lucas.de.marchi, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 111534    
Attachments:
Description Flags
Patch
none
Screenshot when inputing wrong email type
none
Patch
none
Patch
none
Patch none

Description Gyuyoung Kim 2013-02-27 17:46:10 PST
Chromium, blackberry and WK1 gtk ports already check if input values are valid by enabling this feature. I would like to enable this functionality for WebKit2 EFL port. First, this patch supports if email and url type is valid.
Comment 1 Gyuyoung Kim 2013-02-27 17:51:44 PST
Created attachment 190630 [details]
Patch
Comment 2 Gyuyoung Kim 2013-02-27 17:53:51 PST
Created attachment 190631 [details]
Screenshot when inputing wrong email type
Comment 3 Benjamin Poulain 2013-03-05 17:16:48 PST
Comment on attachment 190630 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190630&action=review

I sign off on this for WK2.

> Source/WebCore/platform/efl/LocalizedStringsEfl.cpp:494
> -    return String::fromUTF8("type mismatch");
> +    return String::fromUTF8("Please enter an email address");
>  }
>  
>  String validationMessageTypeMismatchForMultipleEmailText()
>  {
> -    return String::fromUTF8("type mismatch");
> +    return String::fromUTF8("Please enter an email address");
>  }
>  
>  String validationMessageTypeMismatchForURLText()
>  {
> -    return String::fromUTF8("type mismatch");
> +    return String::fromUTF8("Please enter a URL");

You could return ASCIILiteral here.

> Source/WebCore/platform/efl/RenderThemeEfl.cpp:760
>      // FIXME: We need to support other types.
> -    return type == InputTypeNames::range();
> +    return type == InputTypeNames::range()
> +        || type == InputTypeNames::email()

Still need the FIXME?
Comment 4 Gyuyoung Kim 2013-03-05 17:23:32 PST
Created attachment 191615 [details]
Patch
Comment 5 Gyuyoung Kim 2013-03-05 17:25:27 PST
Benjamin, thank you for your review. I fix all.

CC'ing Laszlo and Chris. Could you review this patch. This patch is signed off by Benjamin.
Comment 6 Chris Dumez 2013-03-05 22:06:36 PST
Comment on attachment 191615 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=191615&action=review

> Source/WebCore/platform/efl/RenderThemeEfl.cpp:-758
> -    // FIXME: We need to support other types.

I think the FIXME should stay. We still need to support way more types (e.g. search, datetime, color, telephone, ...)
Comment 7 Gyuyoung Kim 2013-03-05 22:16:32 PST
Created attachment 191653 [details]
Patch
Comment 8 Gyuyoung Kim 2013-03-05 22:17:16 PST
(In reply to comment #6)
> (From update of attachment 191615 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=191615&action=review
> 
> > Source/WebCore/platform/efl/RenderThemeEfl.cpp:-758
> > -    // FIXME: We need to support other types.
> 
> I think the FIXME should stay. We still need to support way more types (e.g. search, datetime, color, telephone, ...)

Ok, I don't mind to keep it.
Comment 9 Gyuyoung Kim 2013-03-06 01:15:17 PST
Created attachment 191681 [details]
Patch
Comment 10 Kenneth Rohde Christiansen 2013-03-06 01:22:19 PST
Comment on attachment 191681 [details]
Patch

LGTM
Comment 11 Laszlo Gombos 2013-03-06 18:17:25 PST
Comment on attachment 191681 [details]
Patch

r=me. Signed off by Benjamin for WK2.
Comment 12 WebKit Review Bot 2013-03-06 19:27:37 PST
Comment on attachment 191681 [details]
Patch

Clearing flags on attachment: 191681

Committed r145024: <http://trac.webkit.org/changeset/145024>
Comment 13 WebKit Review Bot 2013-03-06 19:27:42 PST
All reviewed patches have been landed.  Closing bug.