[EFL][WK2] Enable interactive form validation for email and url input type validation
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 03:25:33 +0000 (03:25 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 03:25:33 +0000 (03:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111026

Reviewed by Laszlo Gombos.

WebKit EFL can check if input value is valid by enabling this feature.

Source/WebCore:

* platform/efl/LocalizedStringsEfl.cpp: Change validation messages of email and url the same with chromium port.
(WebCore::validationMessageTypeMismatchForEmailText):
(WebCore::validationMessageTypeMismatchForMultipleEmailText):
(WebCore::validationMessageTypeMismatchForURLText):
* platform/efl/RenderThemeEfl.cpp: Add type checking conditions for email and url.
(WebCore::RenderThemeEfl::supportsDataListUI):

Source/WebKit2:

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/efl/LocalizedStringsEfl.cpp
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/efl/EwkView.cpp

index fc8c217..9a87930 100644 (file)
@@ -1,3 +1,19 @@
+2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        [EFL][WK2] Enable interactive form validation for email and url input type validation
+        https://bugs.webkit.org/show_bug.cgi?id=111026
+
+        Reviewed by Laszlo Gombos.
+
+        WebKit EFL can check if input value is valid by enabling this feature.
+
+        * platform/efl/LocalizedStringsEfl.cpp: Change validation messages of email and url the same with chromium port.
+        (WebCore::validationMessageTypeMismatchForEmailText):
+        (WebCore::validationMessageTypeMismatchForMultipleEmailText):
+        (WebCore::validationMessageTypeMismatchForURLText):
+        * platform/efl/RenderThemeEfl.cpp: Add type checking conditions for email and url.
+        (WebCore::RenderThemeEfl::supportsDataListUI):
+
 2013-03-06  Aaron Colwell  <acolwell@chromium.org>
 
         Remove WebCore::Node::isActiveNode() since it isn't called anywhere.
index 5877106..f076997 100644 (file)
@@ -481,17 +481,17 @@ String validationMessageTypeMismatchText()
 
 String validationMessageTypeMismatchForEmailText()
 {
-    return String::fromUTF8("type mismatch");
+    return ASCIILiteral("Please enter an email address");
 }
 
 String validationMessageTypeMismatchForMultipleEmailText()
 {
-    return String::fromUTF8("type mismatch");
+    return ASCIILiteral("Please enter an email address");
 }
 
 String validationMessageTypeMismatchForURLText()
 {
-    return String::fromUTF8("type mismatch");
+    return ASCIILiteral("Please enter a URL");
 }
 
 String validationMessageValueMissingText()
index 25fc513..3df39f5 100644 (file)
@@ -756,7 +756,9 @@ bool RenderThemeEfl::supportsDataListUI(const AtomicString& type) const
 {
 #if ENABLE(DATALIST_ELEMENT)
     // FIXME: We need to support other types.
-    return type == InputTypeNames::range();
+    return type == InputTypeNames::range()
+        || type == InputTypeNames::email()
+        || type == InputTypeNames::url();
 #else
     UNUSED_PARAM(type);
     return false;
index becdc37..8a18011 100644 (file)
@@ -1,3 +1,15 @@
+2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        [EFL][WK2] Enable interactive form validation for email and url input type validation
+        https://bugs.webkit.org/show_bug.cgi?id=111026
+
+        Reviewed by Laszlo Gombos.
+
+        WebKit EFL can check if input value is valid by enabling this feature.
+
+        * UIProcess/API/efl/EwkView.cpp:
+        (EwkView::EwkView):
+
 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
 
         [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
index b52c52e..1f2eea2 100644 (file)
@@ -283,6 +283,7 @@ EwkView::EwkView(Evas_Object* evasObject, PassRefPtr<EwkContext> context, WKPage
 #if ENABLE(SPELLCHECK)
     WKPreferencesSetAsynchronousSpellCheckingEnabled(wkPreferences, true);
 #endif
+    WKPreferencesSetInteractiveFormValidationEnabled(wkPreferences, true);
 
     // Enable mouse events by default
     setMouseEventsEnabled(true);