[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

tkent at chromium.org tkent at chromium.org
Wed Apr 7 23:48:41 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit cb15037f6edc1c9fb18a6541ff035e0a6899e269
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 19 05:38:59 2009 +0000

    2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
    
            Reviewed by Darin Adler.
    
            Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
            Support for validationMessage attribute, as per HTML5 specs.
    
            * fast/dom/domListEnumeration-expected.txt: updated with new property
            * fast/dom/script-tests/domListEnumeration.js: ditto
            * fast/forms/script-tests/validationMessage.js: Added.
            * fast/forms/validationMessage-expected.txt: Added.
            * fast/forms/validationMessage.html: Added.
            * platform/gtk/Skipped:
            * platform/qt/Skipped:
            * platform/win/Skipped:
    2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
    
            Reviewed by Darin Adler.
    
            Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
            Support for validationMessage attribute, as per HTML5 specs.
    
            Test: fast/forms/validationMessage.html
    
            * html/HTMLButtonElement.idl: validationMessage attribute
            * html/HTMLFieldSetElement.idl: validationMessage attribute
            * html/HTMLFormControlElement.cpp:
            * html/HTMLFormControlElement.h:
            * html/HTMLInputElement.idl: validationMessage attribute
            * html/HTMLSelectElement.idl: validationMessage attribute
            * html/HTMLTextAreaElement.idl: validationMessage attribute
            * html/ValidityState.cpp: new method to retrieve pertinent localized text
            * html/ValidityState.h:
            * page/mac/WebCoreViewFactory.h:
            * platform/LocalizedStrings.h:
            * platform/android/LocalizedStringsAndroid.cpp:
            * platform/gtk/LocalizedStringsGtk.cpp:
            * platform/haiku/LocalizedStringsHaiku.cpp:
            * platform/mac/LocalizedStringsMac.mm:
            * platform/wx/LocalizedStringsWx.cpp:
    2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
    
            Reviewed by Darin Adler.
    
            Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
            Support for validationMessage attribute, as per HTML5 specs.
    
            * English.lproj/Localizable.strings: new localizable strings
    2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
    
            Reviewed by Darin Adler.
    
            Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
            Support for validationMessage attribute, as per HTML5 specs.
    
            * src/LocalizedStrings.cpp:
            (WebCore::validationMessageValueMissingText):
            (WebCore::validationMessageTypeMismatchText):
            (WebCore::validationMessagePatternMismatchText):
            (WebCore::validationMessageTooLongText):
            (WebCore::validationMessageRangeUnderflowText):
            (WebCore::validationMessageRangeOverflowText):
            (WebCore::validationMessageStepMismatchText):
    2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
    
            Reviewed by Darin Adler.
    
            Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
            Support for validationMessage attribute, as per HTML5 specs.
    
            * WebCoreSupport/WebViewFactory.mm:
            (-[WebViewFactory validationMessageValueMissingText]):
            (-[WebViewFactory validationMessageTypeMismatchText]):
            (-[WebViewFactory validationMessagePatternMismatchText]):
            (-[WebViewFactory validationMessageTooLongText]):
            (-[WebViewFactory validationMessageRangeUnderflowText]):
            (-[WebViewFactory validationMessageRangeOverflowText]):
            (-[WebViewFactory validationMessageStepMismatchText]):
    2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
    
            Reviewed by Darin Adler.
    
            Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
            Support for validationMessage attribute, as per HTML5 specs.
    
            * WebCoreLocalizedStrings.cpp:
            (WebCore::validationMessageValueMissingText):
            (WebCore::validationMessageTypeMismatchText):
            (WebCore::validationMessagePatternMismatchText):
            (WebCore::validationMessageTooLongText):
            (WebCore::validationMessageRangeUnderflowText):
            (WebCore::validationMessageRangeOverflowText):
            (WebCore::validationMessageStepMismatchText):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51172 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 11d170c..a35d775 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+        Support for validationMessage attribute, as per HTML5 specs.
+
+        * fast/dom/domListEnumeration-expected.txt: updated with new property
+        * fast/dom/script-tests/domListEnumeration.js: ditto
+        * fast/forms/script-tests/validationMessage.js: Added.
+        * fast/forms/validationMessage-expected.txt: Added.
+        * fast/forms/validationMessage.html: Added.
+        * platform/gtk/Skipped:
+        * platform/qt/Skipped:
+        * platform/win/Skipped:
+
 2009-11-19  Roland Steiner  <rolandsteiner at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/dom/domListEnumeration-expected.txt b/LayoutTests/fast/dom/domListEnumeration-expected.txt
index 88d202b..9e4579e 100644
--- a/LayoutTests/fast/dom/domListEnumeration-expected.txt
+++ b/LayoutTests/fast/dom/domListEnumeration-expected.txt
@@ -41,7 +41,7 @@ PASS resultArray[2].i is '2'
 PASS resultArray[2].item is document.getElementsByTagName('select')[2]
 
 [object HTMLSelectElement]
-PASS resultArray.length is 140
+PASS resultArray.length is 141
 PASS resultArray[0].i is '0'
 PASS resultArray[0].item is document.getElementsByTagName('option')[0]
 PASS resultArray[1].i is '1'
diff --git a/LayoutTests/fast/dom/script-tests/domListEnumeration.js b/LayoutTests/fast/dom/script-tests/domListEnumeration.js
index 9055aa9..8f8e1ff 100644
--- a/LayoutTests/fast/dom/script-tests/domListEnumeration.js
+++ b/LayoutTests/fast/dom/script-tests/domListEnumeration.js
@@ -141,7 +141,7 @@ shouldBe("resultArray[2].item", "document.getElementsByTagName('select')[2]");
 // HTMLSelectElement
 var htmlSelectElement = document.getElementsByTagName('select')[0];
 resultArray = iterateList(htmlSelectElement);
-shouldBe("resultArray.length", "140");
+shouldBe("resultArray.length", "141");
 shouldBe("resultArray[0].i", "'0'");
 shouldBe("resultArray[0].item", "document.getElementsByTagName('option')[0]");
 shouldBe("resultArray[1].i", "'1'");
diff --git a/LayoutTests/fast/forms/script-tests/validationMessage.js b/LayoutTests/fast/forms/script-tests/validationMessage.js
new file mode 100644
index 0000000..06c7a74
--- /dev/null
+++ b/LayoutTests/fast/forms/script-tests/validationMessage.js
@@ -0,0 +1,76 @@
+description("Test for validationMessage DOM property.");
+
+var form = document.createElement("form");
+
+// An input element with a pattern set and a mismatched value
+var patternInput = document.createElement("input");
+patternInput.name = "patternInput";
+patternInput.pattern = "lorem ipsum";
+patternInput.value = "lorem";
+form.appendChild(patternInput);
+shouldBe("patternInput.validationMessage", "'pattern mismatch'");
+
+// A required input with an empty value
+var requiredInput = document.createElement("input");
+requiredInput.name = "requiredInput";
+requiredInput.required = true;
+form.appendChild(requiredInput);
+shouldBe("requiredInput.validationMessage", "'value missing'");
+
+// A required textarea with an empty value
+var requiredTextArea = document.createElement("textarea");
+requiredTextArea.name = "requiredTextArea";
+requiredTextArea.required = true;
+form.appendChild(requiredTextArea);
+shouldBe("requiredTextArea.validationMessage", "'value missing'");
+
+// A type=email input for the "type mismatch" flag
+var emailInput = document.createElement("input");
+emailInput.name = "emailInput";
+emailInput.type = "email";
+emailInput.value = "incorrectValue";
+form.appendChild(emailInput);
+shouldBe("emailInput.validationMessage", "'type mismatch'");
+
+// A "ranged" input for "range underflow" flag
+var underInput = document.createElement("input");
+underInput.name = "underInput";
+underInput.type = "range";
+underInput.min = "2";
+underInput.value = "1";
+form.appendChild(underInput);
+shouldBe("underInput.validationMessage", "'range underflow'");
+
+// A "ranged" input for "range overflow" flag
+var overInput = document.createElement("input");
+overInput.name = "overInput";
+overInput.type = "range";
+overInput.max = "2";
+overInput.value = "3";
+form.appendChild(overInput);
+shouldBe("overInput.validationMessage", "'range overflow'");
+
+// A button can't be valited and, thus, has a blank validationMessage
+var but = document.createElement("button");
+but.name = "button";
+form.appendChild(but);
+shouldBe("but.validationMessage", "''");
+
+// An input control with no name, so it can't be validated (willValidate = false)
+var anoninput = document.createElement("input");
+form.appendChild(anoninput);
+shouldBe("anoninput.validationMessage", "''")
+
+// Fieldsets can't be validated
+var happyFieldset = document.createElement("fieldset");
+happyFieldset.name = "fieldset";
+form.appendChild(happyFieldset);
+shouldBe("happyFieldset.validationMessage", "''");
+
+// Select controls can't be validated too
+var happySelect = document.createElement("select");
+happySelect.name = "select";
+form.appendChild(happySelect);
+shouldBe("happySelect.validationMessage", "''");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/validationMessage-expected.txt b/LayoutTests/fast/forms/validationMessage-expected.txt
new file mode 100644
index 0000000..172fdb9
--- /dev/null
+++ b/LayoutTests/fast/forms/validationMessage-expected.txt
@@ -0,0 +1,19 @@
+Test for validationMessage DOM property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS patternInput.validationMessage is 'pattern mismatch'
+PASS requiredInput.validationMessage is 'value missing'
+PASS requiredTextArea.validationMessage is 'value missing'
+PASS emailInput.validationMessage is 'type mismatch'
+PASS underInput.validationMessage is 'range underflow'
+PASS overInput.validationMessage is 'range overflow'
+PASS but.validationMessage is ''
+PASS anoninput.validationMessage is ''
+PASS happyFieldset.validationMessage is ''
+PASS happySelect.validationMessage is ''
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/validationMessage.html b/LayoutTests/fast/forms/validationMessage.html
new file mode 100644
index 0000000..af1bbff
--- /dev/null
+++ b/LayoutTests/fast/forms/validationMessage.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/validationMessage.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e3a8d30..881153c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+        Support for validationMessage attribute, as per HTML5 specs.
+
+        Test: fast/forms/validationMessage.html
+
+        * html/HTMLButtonElement.idl: validationMessage attribute
+        * html/HTMLFieldSetElement.idl: validationMessage attribute
+        * html/HTMLFormControlElement.cpp:
+        * html/HTMLFormControlElement.h:
+        * html/HTMLInputElement.idl: validationMessage attribute
+        * html/HTMLSelectElement.idl: validationMessage attribute
+        * html/HTMLTextAreaElement.idl: validationMessage attribute
+        * html/ValidityState.cpp: new method to retrieve pertinent localized text
+        * html/ValidityState.h:
+        * page/mac/WebCoreViewFactory.h:
+        * platform/LocalizedStrings.h:
+        * platform/android/LocalizedStringsAndroid.cpp:
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        * platform/haiku/LocalizedStringsHaiku.cpp:
+        * platform/mac/LocalizedStringsMac.mm:
+        * platform/wx/LocalizedStringsWx.cpp:
+
 2009-11-18  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
 
         Unreviewed.
diff --git a/WebCore/html/HTMLButtonElement.idl b/WebCore/html/HTMLButtonElement.idl
index 55803df..cb9383d 100644
--- a/WebCore/html/HTMLButtonElement.idl
+++ b/WebCore/html/HTMLButtonElement.idl
@@ -37,6 +37,7 @@ module html {
         readonly attribute  DOMString            type;
                  attribute  [ConvertNullToNullString] DOMString            value;
         readonly attribute boolean               willValidate;
+        readonly attribute DOMString             validationMessage;
         boolean  checkValidity();
         void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
         void click();
diff --git a/WebCore/html/HTMLFieldSetElement.idl b/WebCore/html/HTMLFieldSetElement.idl
index ca8563b..c55e604 100644
--- a/WebCore/html/HTMLFieldSetElement.idl
+++ b/WebCore/html/HTMLFieldSetElement.idl
@@ -29,6 +29,7 @@ module html {
         readonly attribute ValidityState   validity;
 #endif
         readonly attribute boolean         willValidate;
+        readonly attribute DOMString       validationMessage;
         boolean  checkValidity();
         void     setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
     };
diff --git a/WebCore/html/HTMLFormControlElement.cpp b/WebCore/html/HTMLFormControlElement.cpp
index ea46980..1546543 100644
--- a/WebCore/html/HTMLFormControlElement.cpp
+++ b/WebCore/html/HTMLFormControlElement.cpp
@@ -288,6 +288,11 @@ bool HTMLFormControlElement::willValidate() const
     return form() && !name().isEmpty() && !disabled() && !isReadOnlyFormControl();
 }
 
+String HTMLFormControlElement::validationMessage()
+{
+    return validity()->validationMessage();
+}
+
 bool HTMLFormControlElement::checkValidity()
 {
     if (willValidate() && !isValidFormControlElement()) {
diff --git a/WebCore/html/HTMLFormControlElement.h b/WebCore/html/HTMLFormControlElement.h
index b5dc7ce..7105112 100644
--- a/WebCore/html/HTMLFormControlElement.h
+++ b/WebCore/html/HTMLFormControlElement.h
@@ -107,6 +107,7 @@ public:
     virtual short tabIndex() const;
 
     virtual bool willValidate() const;
+    String validationMessage();
     bool checkValidity();
     void updateValidity();
     void setCustomValidity(const String&);
diff --git a/WebCore/html/HTMLInputElement.idl b/WebCore/html/HTMLInputElement.idl
index b45d190..c9d08e3 100644
--- a/WebCore/html/HTMLInputElement.idl
+++ b/WebCore/html/HTMLInputElement.idl
@@ -72,6 +72,7 @@ module html {
 #endif
 
         readonly attribute boolean         willValidate;
+        readonly attribute DOMString       validationMessage;
         boolean            checkValidity();
         void               setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
         void               select();
diff --git a/WebCore/html/HTMLSelectElement.idl b/WebCore/html/HTMLSelectElement.idl
index 53fe848..ae47896 100644
--- a/WebCore/html/HTMLSelectElement.idl
+++ b/WebCore/html/HTMLSelectElement.idl
@@ -45,6 +45,7 @@ module html {
         readonly attribute ValidityState   validity;
 #endif
         readonly attribute boolean         willValidate;
+        readonly attribute DOMString       validationMessage;
         boolean            checkValidity();
         void               setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
 
diff --git a/WebCore/html/HTMLTextAreaElement.idl b/WebCore/html/HTMLTextAreaElement.idl
index db5154e..107a1fe 100644
--- a/WebCore/html/HTMLTextAreaElement.idl
+++ b/WebCore/html/HTMLTextAreaElement.idl
@@ -48,6 +48,7 @@ module html {
         void     select();
 
         readonly attribute boolean         willValidate;
+        readonly attribute DOMString       validationMessage;
         boolean  checkValidity();
         void     setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
 
diff --git a/WebCore/html/ValidityState.cpp b/WebCore/html/ValidityState.cpp
index c67a3c4..e7df225 100644
--- a/WebCore/html/ValidityState.cpp
+++ b/WebCore/html/ValidityState.cpp
@@ -26,6 +26,7 @@
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "KURL.h"
+#include "LocalizedStrings.h"
 #include "RegularExpression.h"
 #include <wtf/StdLibExtras.h>
 
@@ -43,6 +44,31 @@ ValidityState::ValidityState(HTMLFormControlElement* parent)
     ASSERT(parent);
 }
 
+String ValidityState::validationMessage()
+{
+    if (!control()->willValidate())
+        return String();
+
+    if (customError())
+        return m_customErrorMessage;
+    if (valueMissing())
+        return validationMessageValueMissingText();
+    if (typeMismatch())
+        return validationMessageTypeMismatchText();
+    if (patternMismatch())
+        return validationMessagePatternMismatchText();
+    if (tooLong())
+        return validationMessageTooLongText();
+    if (rangeUnderflow())
+        return validationMessageRangeUnderflowText();
+    if (rangeOverflow())
+        return validationMessageRangeOverflowText();
+    if (stepMismatch())
+        return validationMessageStepMismatchText();
+
+    return String();
+}
+
 bool ValidityState::typeMismatch()
 {
     if (!control()->hasTagName(inputTag))
diff --git a/WebCore/html/ValidityState.h b/WebCore/html/ValidityState.h
index 4e240ed..7ae95d7 100644
--- a/WebCore/html/ValidityState.h
+++ b/WebCore/html/ValidityState.h
@@ -38,6 +38,7 @@ namespace WebCore {
 
         HTMLFormControlElement* control() const { return m_control; }
 
+        String validationMessage();
         void setCustomErrorMessage(const String& message) { m_customErrorMessage = message; }
 
         bool valueMissing() { return control()->valueMissing(); }
diff --git a/WebCore/page/mac/WebCoreViewFactory.h b/WebCore/page/mac/WebCoreViewFactory.h
index 249d696..43f3f0a 100644
--- a/WebCore/page/mac/WebCoreViewFactory.h
+++ b/WebCore/page/mac/WebCoreViewFactory.h
@@ -150,6 +150,13 @@
 - (NSString*)localizedMediaControlElementHelpText:(NSString*)name;
 - (NSString*)localizedMediaTimeDescription:(float)time;
 
+- (NSString *)validationMessageValueMissingText;
+- (NSString *)validationMessageTypeMismatchText;
+- (NSString *)validationMessagePatternMismatchText;
+- (NSString *)validationMessageTooLongText;
+- (NSString *)validationMessageRangeUnderflowText;
+- (NSString *)validationMessageRangeOverflowText;
+- (NSString *)validationMessageStepMismatchText;
 
 @end
 
diff --git a/WebCore/platform/LocalizedStrings.h b/WebCore/platform/LocalizedStrings.h
index 0fa9f71..f7a6fa6 100644
--- a/WebCore/platform/LocalizedStrings.h
+++ b/WebCore/platform/LocalizedStrings.h
@@ -141,6 +141,15 @@ namespace WebCore {
     String localizedMediaControlElementString(const String&);
     String localizedMediaControlElementHelpText(const String&);
     String localizedMediaTimeDescription(float);
+
+    String validationMessageValueMissingText();
+    String validationMessageTypeMismatchText();
+    String validationMessagePatternMismatchText();
+    String validationMessageTooLongText();
+    String validationMessageRangeUnderflowText();
+    String validationMessageRangeOverflowText();
+    String validationMessageStepMismatchText();
+
 }
 
 #endif
diff --git a/WebCore/platform/android/LocalizedStringsAndroid.cpp b/WebCore/platform/android/LocalizedStringsAndroid.cpp
index fc3b63c..d15fd1b 100644
--- a/WebCore/platform/android/LocalizedStringsAndroid.cpp
+++ b/WebCore/platform/android/LocalizedStringsAndroid.cpp
@@ -301,4 +301,46 @@ String inputElementAltText()
     return String();
 }
 
+String validationMessageValueMissingText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTypeMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessagePatternMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTooLongText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeUnderflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeOverflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageStepMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
 } // namespace WebCore
diff --git a/WebCore/platform/gtk/LocalizedStringsGtk.cpp b/WebCore/platform/gtk/LocalizedStringsGtk.cpp
index 85e071b..1ffad83 100644
--- a/WebCore/platform/gtk/LocalizedStringsGtk.cpp
+++ b/WebCore/platform/gtk/LocalizedStringsGtk.cpp
@@ -467,4 +467,46 @@ String localizedMediaTimeDescription(float time)
 }
 #endif  // ENABLE(VIDEO)
 
+String validationMessageValueMissingText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTypeMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessagePatternMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTooLongText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeUnderflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeOverflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageStepMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
 }
diff --git a/WebCore/platform/haiku/LocalizedStringsHaiku.cpp b/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
index a37ffcc..9bb4c3e 100644
--- a/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
+++ b/WebCore/platform/haiku/LocalizedStringsHaiku.cpp
@@ -342,5 +342,47 @@ String AXDefinitionListDefinitionText()
     return String();
 }
 
+String validationMessageValueMissingText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTypeMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessagePatternMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTooLongText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeUnderflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeOverflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageStepMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
 } // namespace WebCore
 
diff --git a/WebCore/platform/mac/LocalizedStringsMac.mm b/WebCore/platform/mac/LocalizedStringsMac.mm
index 261347f..c438d6b 100644
--- a/WebCore/platform/mac/LocalizedStringsMac.mm
+++ b/WebCore/platform/mac/LocalizedStringsMac.mm
@@ -747,5 +747,60 @@ String localizedMediaTimeDescription(float time)
     return String();
 }
 
+String validationMessageValueMissingText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] validationMessageValueMissingText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
+
+String validationMessageTypeMismatchText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] validationMessageTypeMismatchText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
+
+String validationMessagePatternMismatchText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] validationMessagePatternMismatchText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
+
+String validationMessageTooLongText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] validationMessageTooLongText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
+
+String validationMessageRangeUnderflowText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] validationMessageRangeUnderflowText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
+
+String validationMessageRangeOverflowText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] validationMessageRangeOverflowText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
+
+String validationMessageStepMismatchText()
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+    return [[WebCoreViewFactory sharedFactory] validationMessageStepMismatchText];
+    END_BLOCK_OBJC_EXCEPTIONS;
+    return String();
+}
 
 }
diff --git a/WebCore/platform/wx/LocalizedStringsWx.cpp b/WebCore/platform/wx/LocalizedStringsWx.cpp
index 5bede52..608b496 100644
--- a/WebCore/platform/wx/LocalizedStringsWx.cpp
+++ b/WebCore/platform/wx/LocalizedStringsWx.cpp
@@ -323,4 +323,46 @@ String AXDefinitionListDefinitionText()
     return String();
 }
 
+String validationMessageValueMissingText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTypeMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessagePatternMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTooLongText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeUnderflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeOverflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageStepMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
 } // namespace WebCore
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b62b7d0..8b8987c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+        Support for validationMessage attribute, as per HTML5 specs.
+
+        * English.lproj/Localizable.strings: new localizable strings
+
 2009-11-18  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKit/English.lproj/Localizable.strings b/WebKit/English.lproj/Localizable.strings
index 733c0c8..0c7d339 100644
Binary files a/WebKit/English.lproj/Localizable.strings and b/WebKit/English.lproj/Localizable.strings differ
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index db8d47a..9045b2a 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+        Support for validationMessage attribute, as per HTML5 specs.
+
+        * src/LocalizedStrings.cpp:
+        (WebCore::validationMessageValueMissingText):
+        (WebCore::validationMessageTypeMismatchText):
+        (WebCore::validationMessagePatternMismatchText):
+        (WebCore::validationMessageTooLongText):
+        (WebCore::validationMessageRangeUnderflowText):
+        (WebCore::validationMessageRangeOverflowText):
+        (WebCore::validationMessageStepMismatchText):
+
 2009-11-18  Nate Chapin  <japhet at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp
index 36b231e..1121931 100644
--- a/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/WebKit/chromium/src/LocalizedStrings.cpp
@@ -262,4 +262,46 @@ String localizedMediaTimeDescription(float /*time*/)
     return String();
 }
 
+String validationMessageValueMissingText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTypeMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessagePatternMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageTooLongText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeUnderflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageRangeOverflowText()
+{
+    notImplemented();
+    return String();
+}
+
+String validationMessageStepMismatchText()
+{
+    notImplemented();
+    return String();
+}
+
 } // namespace WebCore
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index f9c3185..ab999b6 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+        Support for validationMessage attribute, as per HTML5 specs.
+
+        * WebCoreSupport/WebViewFactory.mm:
+        (-[WebViewFactory validationMessageValueMissingText]):
+        (-[WebViewFactory validationMessageTypeMismatchText]):
+        (-[WebViewFactory validationMessagePatternMismatchText]):
+        (-[WebViewFactory validationMessageTooLongText]):
+        (-[WebViewFactory validationMessageRangeUnderflowText]):
+        (-[WebViewFactory validationMessageRangeOverflowText]):
+        (-[WebViewFactory validationMessageStepMismatchText]):
+
 2009-11-18  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
index 40822c9..7ba5075 100644
--- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm
+++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
@@ -756,4 +756,39 @@
     return [NSString stringWithFormat:UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds];
 }
 
+- (NSString *)validationMessageValueMissingText
+{
+    return UI_STRING("value missing", "Validation message for required form control elements that have no value");
+}
+
+- (NSString *)validationMessageTypeMismatchText
+{
+    return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type");
+}
+
+- (NSString *)validationMessagePatternMismatchText
+{
+    return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern");
+}
+
+- (NSString *)validationMessageTooLongText
+{
+    return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length");
+}
+
+- (NSString *)validationMessageRangeUnderflowText
+{
+    return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum");
+}
+
+- (NSString *)validationMessageRangeOverflowText
+{
+    return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum");
+}
+
+- (NSString *)validationMessageStepMismatchText
+{
+    return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute");
+}
+
 @end
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 4aada17..2c4db01 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-18  Michelangelo De Simone  <micdesim at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
+        Support for validationMessage attribute, as per HTML5 specs.
+
+        * WebCoreLocalizedStrings.cpp:
+        (WebCore::validationMessageValueMissingText):
+        (WebCore::validationMessageTypeMismatchText):
+        (WebCore::validationMessagePatternMismatchText):
+        (WebCore::validationMessageTooLongText):
+        (WebCore::validationMessageRangeUnderflowText):
+        (WebCore::validationMessageRangeOverflowText):
+        (WebCore::validationMessageStepMismatchText):
+
 2009-11-18  Daniel Bates  <dbates at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp
index 95dfa76..f4ee724 100644
--- a/WebKit/win/WebCoreLocalizedStrings.cpp
+++ b/WebKit/win/WebCoreLocalizedStrings.cpp
@@ -231,3 +231,10 @@ String WebCore::localizedMediaTimeDescription(float time)
 
 #endif  // ENABLE(VIDEO)
 
+String WebCore::validationMessageValueMissingText() { return String(LPCTSTR_UI_STRING("value missing", "Validation message for required form control elements that have no value")); }
+String WebCore::validationMessageTypeMismatchText() { return String(LPCTSTR_UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type")); }
+String WebCore::validationMessagePatternMismatchText() { return String(LPCTSTR_UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern")); }
+String WebCore::validationMessageTooLongText() { return String(LPCTSTR_UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length")); }
+String WebCore::validationMessageRangeUnderflowText() { return String(LPCTSTR_UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum")); }
+String WebCore::validationMessageRangeOverflowText() { return String(LPCTSTR_UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum")); }
+String WebCore::validationMessageStepMismatchText() { return String(LPCTSTR_UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute")); }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list