[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tkent at chromium.org tkent at chromium.org
Wed Dec 22 11:29:20 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a216646d763318461830d3fbd041d47d92588973
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 27 07:31:39 2010 +0000

    Add a runtime setting for interactive form validation.
    https://bugs.webkit.org/show_bug.cgi?id=40520
    
    Reviewed by Ojan Vafai.
    
    WebCore:
    
    The interactive validation feature was disabled for non-strict
    modes by r61059 to avoid a compatibility issue. This removes the
    mode checking and introduce a runtime setting to enable/disable
    the feature instead.
    The default value is 'disable' and we'll remove the setting when
    the compatibility issue is resolved and interactive validation
    implementation is completed.
    
    * html/HTMLFormElement.cpp:
    (WebCore::HTMLFormElement::validateInteractively):
    * page/Settings.cpp:
    (WebCore::Settings::Settings):
    * page/Settings.h:
    (WebCore::Settings::setInteractiveFormValidationEnabled):
    (WebCore::Settings::interactiveFormValidationEnabled):
    
    LayoutTests:
    
    Remove the mode-specific tests and skip tests which don't work
    without the interactive validation feature.
    
    * fast/forms/interactive-validation-compat-mode-expected.txt: Removed.
    * fast/forms/interactive-validation-compat-mode.html: Removed.
    * fast/forms/interactive-validation-html4-expected.txt: Removed.
    * fast/forms/interactive-validation-html4.html: Removed.
    * platform/chromium/test_expectations.txt:
    * platform/gtk/Skipped:
    * platform/mac/Skipped:
    * platform/qt/Skipped:
    * platform/win/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64110 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7311016..edd7c0d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-27  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Ojan Vafai.
+
+        Add a runtime setting for interactive form validation.
+        https://bugs.webkit.org/show_bug.cgi?id=40520
+
+        Remove the mode-specific tests and skip tests which don't work
+        without the interactive validation feature.
+
+        * fast/forms/interactive-validation-compat-mode-expected.txt: Removed.
+        * fast/forms/interactive-validation-compat-mode.html: Removed.
+        * fast/forms/interactive-validation-html4-expected.txt: Removed.
+        * fast/forms/interactive-validation-html4.html: Removed.
+        * platform/chromium/test_expectations.txt:
+        * platform/gtk/Skipped:
+        * platform/mac/Skipped:
+        * platform/qt/Skipped:
+        * platform/win/Skipped:
+
 2010-07-26  Cosmin Truta  <ctruta at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/forms/interactive-validation-compat-mode-expected.txt b/LayoutTests/fast/forms/interactive-validation-compat-mode-expected.txt
deleted file mode 100644
index a9460be..0000000
--- a/LayoutTests/fast/forms/interactive-validation-compat-mode-expected.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Test if an invalid form in a document without DOCTYPE is submitted.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS The form should be submitted.
-PASS location.search.indexOf("i0=") != -1 is true
-TEST COMPLETE
- 
diff --git a/LayoutTests/fast/forms/interactive-validation-compat-mode.html b/LayoutTests/fast/forms/interactive-validation-compat-mode.html
deleted file mode 100644
index 58d8862..0000000
--- a/LayoutTests/fast/forms/interactive-validation-compat-mode.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<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>
-<form id=f action="interactive-validation-compat-mode.html">
-<input type=hidden name=submitted value="true">
-<input name=i0 required id="i0">
-<input type=submit id="s">
-</form>
-<script>
-description('Test if an invalid form in a document without DOCTYPE is submitted.');
-
-function startOrVerify() {
-    var query = window.location.search;
-    if (query.indexOf('submitted=true') != -1) {
-        testPassed('The form should be submitted.');
-        shouldBeTrue('location.search.indexOf("i0=") != -1');
-        debug('TEST COMPLETE');
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
-    } else {
-        // HTMLFormElement::submit() skips validation. Use the submit button.
-        document.getElementById('s').click();
-        testFailed('The form was not submitted.');
-    }
-}
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-window.onload = startOrVerify;
-</script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/interactive-validation-html4-expected.txt b/LayoutTests/fast/forms/interactive-validation-html4-expected.txt
deleted file mode 100644
index a9460be..0000000
--- a/LayoutTests/fast/forms/interactive-validation-html4-expected.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Test if an invalid form in a document without DOCTYPE is submitted.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS The form should be submitted.
-PASS location.search.indexOf("i0=") != -1 is true
-TEST COMPLETE
- 
diff --git a/LayoutTests/fast/forms/interactive-validation-html4.html b/LayoutTests/fast/forms/interactive-validation-html4.html
deleted file mode 100644
index 33fa44d..0000000
--- a/LayoutTests/fast/forms/interactive-validation-html4.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<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>
-<form id=f action="interactive-validation-compat-mode.html">
-<input type=hidden name=submitted value="true">
-<input name=i0 required id="i0">
-<input type=submit id="s">
-</form>
-<script>
-description('Test if an invalid form in a document with HTML4.01 DOCTYPE is submitted.');
-
-function startOrVerify() {
-    var query = window.location.search;
-    if (query.indexOf('submitted=true') != -1) {
-        testPassed('The form should be submitted.');
-        shouldBeTrue('location.search.indexOf("i0=") != -1');
-        debug('TEST COMPLETE');
-        if (window.layoutTestController)
-            layoutTestController.notifyDone();
-    } else {
-        // HTMLFormElement::submit() skips validation. Use the submit button.
-        document.getElementById('s').click();
-        testFailed('The form was not submitted.');
-    }
-}
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-window.onload = startOrVerify;
-</script>
-</body>
-</html>
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 2cf219c..3af7518 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -718,6 +718,10 @@ BUG20226 DEFER : fast/forms/input-selectedoption.html = FAIL
 BUGWK38570 : fast/forms/input-appearance-spinbutton-disabled-readonly.html = FAIL
 BUGWK38570 : fast/forms/input-number-events.html = FAIL
 
+// The feature was disabled due to a compatibility issue.
+BUGWK40520 DEFER : fast/forms/interactive-validation-lost-focusable.html = TEXT
+BUGWK40520 DEFER : fast/forms/interactive-validation-prevented.html = TEXT
+
 // Add support for inspector layout tests.
 BUG26734 LINUX MAC SKIP : inspector = PASS
 BUG26734 LINUX MAC SKIP : http/tests/inspector = PASS
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 3e4c079..1adb468 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5857,6 +5857,11 @@ fast/events/drag-in-frames.html
 http/tests/misc/bubble-drag-events.html
 fast/events/content-changed-during-drop.html
 
+# The feature was disabled due to a compatibility issue.
+# https://bugs.webkit.org/show_bug.cgi?id=40520
+fast/forms/interactive-validation-lost-focusable.html
+fast/forms/interactive-validation-prevented.html
+
 # Tests that seem to be Mac only, assume that smart drag-and-drop
 # is enabled or assume platform-dependent sizing.
 http/tests/security/dataTransfer-set-data-file-url.html
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 0cb55c9..1b582f6 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -273,6 +273,11 @@ fast/images/large-size-image-crash.html
 # Directory upload is not enabled.
 fast/forms/input-file-directory-upload.html
 
+# The feature was disabled due to a compatibility issue.
+# https://bugs.webkit.org/show_bug.cgi?id=40520
+fast/forms/interactive-validation-lost-focusable.html
+fast/forms/interactive-validation-prevented.html
+
 # Web Timing is not enabled.
 # https://bugs.webkit.org/show_bug.cgi?id=42434
 fast/dom/Window/window-properties-performance.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index b290b63..4761ab2 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5453,6 +5453,11 @@ http/tests/xmlhttprequest/remember-bad-password.html
 # different DOM to be created.
 html5lib/runner.html
 
+# The feature was disabled due to a compatibility issue.
+# https://bugs.webkit.org/show_bug.cgi?id=40520
+fast/forms/interactive-validation-lost-focusable.html
+fast/forms/interactive-validation-prevented.html
+
 # [Qt] REGRESSION(63862): animations/play-state.html fails intermittently
 # https://bugs.webkit.org/show_bug.cgi?id=42821
 animations/play-state.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 014a51f..2269b9c 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -944,6 +944,11 @@ fast/forms/input-file-directory-upload.html
 # Need setPrinting. See https://bugs.webkit.org/show_bug.cgi?id=20011
 printing/setPrinting.html
 
+# The feature was disabled due to a compatibility issue.
+# https://bugs.webkit.org/show_bug.cgi?id=40520
+fast/forms/interactive-validation-lost-focusable.html
+fast/forms/interactive-validation-prevented.html
+
 # Web Timing is not enabled.
 # https://bugs.webkit.org/show_bug.cgi?id=42435
 fast/dom/Window/window-properties-performance.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9e1dada..3ad3284 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-27  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Ojan Vafai.
+
+        Add a runtime setting for interactive form validation.
+        https://bugs.webkit.org/show_bug.cgi?id=40520
+
+        The interactive validation feature was disabled for non-strict
+        modes by r61059 to avoid a compatibility issue. This removes the
+        mode checking and introduce a runtime setting to enable/disable
+        the feature instead.
+        The default value is 'disable' and we'll remove the setting when
+        the compatibility issue is resolved and interactive validation
+        implementation is completed.
+
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::validateInteractively):
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        * page/Settings.h:
+        (WebCore::Settings::setInteractiveFormValidationEnabled):
+        (WebCore::Settings::interactiveFormValidationEnabled):
+
 2010-07-26  Gavin Barraclough  <barraclough at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/WebCore/html/HTMLFormElement.cpp b/WebCore/html/HTMLFormElement.cpp
index 7afd434..d75de01 100644
--- a/WebCore/html/HTMLFormElement.cpp
+++ b/WebCore/html/HTMLFormElement.cpp
@@ -45,8 +45,10 @@
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "MIMETypeRegistry.h"
+#include "Page.h"
 #include "RenderTextControl.h"
 #include "ScriptEventListener.h"
+#include "Settings.h"
 #include "ValidityState.h"
 #include <limits>
 
@@ -196,7 +198,7 @@ static inline HTMLFormControlElement* submitElementFromEvent(const Event* event)
 bool HTMLFormElement::validateInteractively(Event* event)
 {
     ASSERT(event);
-    if (!document()->inStrictMode() || noValidate())
+    if (!document()->page() || !document()->page()->settings()->interactiveFormValidationEnabled() || noValidate())
         return true;
 
     HTMLFormControlElement* submitElement = submitElementFromEvent(event);
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 3a942ed..9f560a4 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -137,6 +137,7 @@ Settings::Settings(Page* page)
     , m_paginateDuringLayoutEnabled(false)
     , m_dnsPrefetchingEnabled(true)
     , m_memoryInfoEnabled(false)
+    , m_interactiveFormValidation(false)
 {
     // A Frame may not have been created yet, so we initialize the AtomicString 
     // hash before trying to use it.
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index b42fe02..1dee2d0 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -313,6 +313,13 @@ namespace WebCore {
         void setMemoryInfoEnabled(bool flag) { m_memoryInfoEnabled = flag; }
         bool memoryInfoEnabled() const { return m_memoryInfoEnabled; }
 
+        // This setting will be removed when an HTML5 compatibility issue is
+        // resolved and WebKit implementation of interactive validation is
+        // completed. See http://webkit.org/b/40520, http://webkit.org/b/40747,
+        // and http://webkit.org/b/40908
+        void setInteractiveFormValidationEnabled(bool flag) { m_interactiveFormValidation = flag; }
+        bool interactiveFormValidationEnabled() const { return m_interactiveFormValidation; }
+
     private:
         Page* m_page;
         
@@ -397,6 +404,7 @@ namespace WebCore {
         bool m_paginateDuringLayoutEnabled : 1;
         bool m_dnsPrefetchingEnabled : 1;
         bool m_memoryInfoEnabled: 1;
+        bool m_interactiveFormValidation: 1;
     
 #if USE(SAFARI_THEME)
         static bool gShouldPaintNativeControls;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list