2011-05-24 Keishi Hattori <keishi@webkit.org>
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2011 06:03:09 +0000 (06:03 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 May 2011 06:03:09 +0000 (06:03 +0000)
        Reviewed by Kent Tamura.

        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * configure.ac: Added INPUT_COLOR feature flag.
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * fast/forms/ValidityState-typeMismatch-color-expected.txt: Removed.
        * fast/forms/ValidityState-typeMismatch-color.html: Removed.
        * fast/forms/color/input-value-sanitization-color-expected.txt: Added.
        * fast/forms/color/input-value-sanitization-color.html: Added. Tests
        sanitization algorithm for input type=color.
        * fast/forms/input-type-change3-expected.txt:
        * fast/forms/input-widths-expected.txt:
        * fast/forms/input-widths.html: Removed type=color because it
        is no loger a text input type.
        * fast/forms/script-tests/ValidityState-patternMismatch-unsupported.js: Changed to range input type.
        * fast/forms/script-tests/ValidityState-typeMismatch-color.js: Removed.
        * fast/forms/script-tests/input-type-change3.js:
        * platform/gtk/Skipped: Skip fast/forms/color.
        * platform/mac/Skipped: Skip fast/forms/color.
        * platform/qt/Skipped: Skip fast/forms/color.
        * platform/win/Skipped: Skip fast/forms/color.
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        Test: fast/forms/color/input-value-sanitization-color.html

        * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
        * GNUmakefile.am: Added COLOR_INPUT feature flag.
        * features.pri: Added COLOR_INPUT feature flag.
        * html/ColorInputType.cpp: Wrapped with COLOR_INPUT feature flag.
        (WebCore::ColorInputType::isColorControl): Added.
        (WebCore::ColorInputType::fallbackValue): Added. Fallback value defined in spec.
        (WebCore::ColorInputType::sanitizeValue): Added. Sanitize value string as defined in spec.
        * html/ColorInputType.h: Wrapped with COLOR_INPUT feature flag.
        (WebCore::ColorInputType::ColorInputType): Changed to inherit BaseButtonInputType.
        * html/InputType.cpp:
        (WebCore::InputType::isColorControl): Added.
        * html/InputType.h:
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * features.gypi: Added INPUT_COLOR feature flag.
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * Configurations/FeatureDefines.xcconfig: Added INPUT_COLOR feature flag.
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * Configurations/FeatureDefines.xcconfig: Added INPUT_COLOR feature flag.
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * Scripts/build-webkit: Added INPUT_COLOR feature flag.
2011-05-24  Keishi Hattori  <keishi@webkit.org>

        Reviewed by Kent Tamura.

        Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer.
        https://bugs.webkit.org/show_bug.cgi?id=61273

        * win/tools/vsprops/FeatureDefines.vsprops: Added INPUT_COLOR feature flag.
        * win/tools/vsprops/FeatureDefinesCairo.vsprops: Added INPUT_COLOR feature flag.

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

38 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/forms/ValidityState-typeMismatch-color-expected.txt [deleted file]
LayoutTests/fast/forms/ValidityState-typeMismatch-color.html [deleted file]
LayoutTests/fast/forms/color/input-value-sanitization-color-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/color/input-value-sanitization-color.html [new file with mode: 0644]
LayoutTests/fast/forms/input-type-change3-expected.txt
LayoutTests/fast/forms/input-widths-expected.txt
LayoutTests/fast/forms/input-widths.html
LayoutTests/fast/forms/script-tests/ValidityState-patternMismatch-unsupported.js
LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-color.js [deleted file]
LayoutTests/fast/forms/script-tests/input-type-change3.js
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/GNUmakefile.am
Source/WebCore/features.pri
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/ColorInputType.h
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Tools/ChangeLog
Tools/Scripts/build-webkit
WebKitLibraries/ChangeLog
WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops
WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops
configure.ac

index a50894e..0e03f5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * configure.ac: Added INPUT_COLOR feature flag.
+
 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
 
         Reviewed by Adam Barth.
index e5e8817..9629bf2 100644 (file)
@@ -1,3 +1,27 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * fast/forms/ValidityState-typeMismatch-color-expected.txt: Removed.
+        * fast/forms/ValidityState-typeMismatch-color.html: Removed.
+        * fast/forms/color/input-value-sanitization-color-expected.txt: Added.
+        * fast/forms/color/input-value-sanitization-color.html: Added. Tests
+        sanitization algorithm for input type=color.
+        * fast/forms/input-type-change3-expected.txt:
+        * fast/forms/input-widths-expected.txt:
+        * fast/forms/input-widths.html: Removed type=color because it
+        is no loger a text input type.
+        * fast/forms/script-tests/ValidityState-patternMismatch-unsupported.js: Changed to range input type.
+        * fast/forms/script-tests/ValidityState-typeMismatch-color.js: Removed.
+        * fast/forms/script-tests/input-type-change3.js:
+        * platform/gtk/Skipped: Skip fast/forms/color.
+        * platform/mac/Skipped: Skip fast/forms/color.
+        * platform/qt/Skipped: Skip fast/forms/color.
+        * platform/win/Skipped: Skip fast/forms/color.
+
 2011-05-24  Csaba OsztrogonĂ¡c  <ossy@webkit.org>
 
         [Qt][WK2] Skip new failing test.
diff --git a/LayoutTests/fast/forms/ValidityState-typeMismatch-color-expected.txt b/LayoutTests/fast/forms/ValidityState-typeMismatch-color-expected.txt
deleted file mode 100644 (file)
index cd70505..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-This test aims to check for typeMismatch flag with type=color input fields
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS "" is a correct valid color.
-PASS "#000000" is a correct valid color.
-PASS "#123456" is a correct valid color.
-PASS "#789abc" is a correct valid color.
-PASS "#defABC" is a correct valid color.
-PASS "#DEF012" is a correct valid color.
-PASS "black" is a correct invalid color.
-PASS "blue" is a correct invalid color.
-PASS "red" is a correct invalid color.
-PASS "purple" is a correct invalid color.
-PASS "green" is a correct invalid color.
-PASS "cyan" is a correct invalid color.
-PASS "yellow" is a correct invalid color.
-PASS "white" is a correct invalid color.
-PASS "White" is a correct invalid color.
-PASS "WHITE" is a correct invalid color.
-PASS "000000" is a correct invalid color.
-PASS "#FFF" is a correct invalid color.
-PASS " #ffffff" is a correct invalid color.
-PASS "#ffffff " is a correct invalid color.
-PASS "#00112233" is a correct invalid color.
-PASS "rgb(0,0,0)" is a correct invalid color.
-PASS "xxx-non-existent-color-name" is a correct invalid color.
-PASS "transparent" is a correct invalid color.
-PASS "invalid" is a correct valid color when disabled.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-typeMismatch-color.html b/LayoutTests/fast/forms/ValidityState-typeMismatch-color.html
deleted file mode 100644 (file)
index 73854a6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!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/ValidityState-typeMismatch-color.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/color/input-value-sanitization-color-expected.txt b/LayoutTests/fast/forms/color/input-value-sanitization-color-expected.txt
new file mode 100644 (file)
index 0000000..b26b0a5
--- /dev/null
@@ -0,0 +1,34 @@
+Tests for value sanitization algorithm.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS input.value is "#000000"
+PASS input.value = ""; input.value is "#000000"
+PASS input.value = "#000000"; input.value is "#000000"
+PASS input.value = "#123456"; input.value is "#123456"
+PASS input.value = "#789abc"; input.value is "#789abc"
+PASS input.value = "#defABC"; input.value is "#defabc"
+PASS input.value = "#DEF012"; input.value is "#def012"
+PASS input.value = "black"; input.value is "#000000"
+PASS input.value = "blue"; input.value is "#000000"
+PASS input.value = "red"; input.value is "#000000"
+PASS input.value = "purple"; input.value is "#000000"
+PASS input.value = "green"; input.value is "#000000"
+PASS input.value = "cyan"; input.value is "#000000"
+PASS input.value = "yellow"; input.value is "#000000"
+PASS input.value = "white"; input.value is "#000000"
+PASS input.value = "White"; input.value is "#000000"
+PASS input.value = "WHITE"; input.value is "#000000"
+PASS input.value = "000000"; input.value is "#000000"
+PASS input.value = "#FFF"; input.value is "#000000"
+PASS input.value = " #ffffff"; input.value is "#000000"
+PASS input.value = "#ffffff "; input.value is "#000000"
+PASS input.value = "#00112233"; input.value is "#000000"
+PASS input.value = "rgb(0,0,0)"; input.value is "#000000"
+PASS input.value = "xxx-non-existent-color-name"; input.value is "#000000"
+PASS input.value = "transparent"; input.value is "#000000"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/color/input-value-sanitization-color.html b/LayoutTests/fast/forms/color/input-value-sanitization-color.html
new file mode 100644 (file)
index 0000000..915f8ca
--- /dev/null
@@ -0,0 +1,55 @@
+<!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>
+description('Tests for value sanitization algorithm.');
+
+var input;
+
+var fallbackValue = '"#000000"'
+
+input = document.createElement('input');
+input.type = 'color';
+shouldBe('input.value', fallbackValue);
+
+// Valid values
+shouldBe('input.value = ""; input.value', fallbackValue);
+shouldBe('input.value = "#000000"; input.value', '"#000000"');
+shouldBe('input.value = "#123456"; input.value', '"#123456"');
+shouldBe('input.value = "#789abc"; input.value', '"#789abc"');
+shouldBe('input.value = "#defABC"; input.value', '"#defabc"');
+shouldBe('input.value = "#DEF012"; input.value', '"#def012"');
+
+// Invalid values: named colors
+shouldBe('input.value = "black"; input.value', fallbackValue);
+shouldBe('input.value = "blue"; input.value', fallbackValue);
+shouldBe('input.value = "red"; input.value', fallbackValue);
+shouldBe('input.value = "purple"; input.value', fallbackValue);
+shouldBe('input.value = "green"; input.value', fallbackValue);
+shouldBe('input.value = "cyan"; input.value', fallbackValue);
+shouldBe('input.value = "yellow"; input.value', fallbackValue);
+shouldBe('input.value = "white"; input.value', fallbackValue);
+shouldBe('input.value = "White"; input.value', fallbackValue);
+shouldBe('input.value = "WHITE"; input.value', fallbackValue);
+
+// Invalid values
+shouldBe('input.value = "000000"; input.value', fallbackValue);
+shouldBe('input.value = "#FFF"; input.value', fallbackValue);
+shouldBe('input.value = " #ffffff"; input.value', fallbackValue);
+shouldBe('input.value = "#ffffff "; input.value', fallbackValue);
+shouldBe('input.value = "#00112233"; input.value', fallbackValue);
+shouldBe('input.value = "rgb(0,0,0)"; input.value', fallbackValue);
+shouldBe('input.value = "xxx-non-existent-color-name"; input.value', fallbackValue);
+shouldBe('input.value = "transparent"; input.value', fallbackValue);
+
+var successfullyParsed = true;
+</script>
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index e646dbc..18f9003 100644 (file)
@@ -13,7 +13,6 @@ PASS input.type for " text " is correctly "text".
 PASS input.type for "button" is correctly "button".
 PASS input.type for " button " is correctly "text".
 PASS input.type for "checkbox" is correctly "checkbox".
-PASS input.type for "color" is correctly "color".
 PASS input.type for "date" is correctly "date".
 PASS input.type for "datetime" is correctly "datetime".
 PASS input.type for "datetime-local" is correctly "datetime-local".
index 34731fa..d4e64f4 100644 (file)
@@ -5,7 +5,6 @@ PASS document.getElementById("number").offsetWidth is baseWidth
 PASS document.getElementById("password").offsetWidth is baseWidth
 PASS document.getElementById("tel").offsetWidth is baseWidth
 PASS document.getElementById("url").offsetWidth is baseWidth
-PASS document.getElementById("color").offsetWidth is baseWidth
 PASS document.getElementById("date").offsetWidth is baseWidth
 PASS document.getElementById("datetime").offsetWidth is baseWidth
 PASS document.getElementById("datetimelocal").offsetWidth is baseWidth
index f9efbf6..dc9deb1 100644 (file)
@@ -38,7 +38,6 @@ shouldBe('document.getElementById("url").offsetWidth', 'baseWidth');
 // type=search is not tested intentionally.
 
 // The folloiwng types should be removed when dedicated UIs are implemented.
-shouldBe('document.getElementById("color").offsetWidth', 'baseWidth');
 shouldBe('document.getElementById("date").offsetWidth', 'baseWidth');
 shouldBe('document.getElementById("datetime").offsetWidth', 'baseWidth');
 shouldBe('document.getElementById("datetimelocal").offsetWidth', 'baseWidth');
index ec12d7b..fbaacaf 100644 (file)
@@ -1,11 +1,11 @@
 description('Check if the pattern constraint is not applied to some input types.');
 
 var input = document.createElement('input');
-input.type = 'color';
-input.pattern = '#[0-9A-F]{6}';  // Restrict to capital letters
-input.value = '#0099ff';
+input.type = 'range';
+input.pattern = '[0-9]';  // Restrict to single digit
+input.value = '11';
 
-// pattern doesn't work for type=color
+// pattern doesn't work for type=range
 shouldBe('input.validity.patternMismatch', 'false');
 
 // works for type=text.
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-color.js b/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-color.js
deleted file mode 100644 (file)
index 9293692..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-description('This test aims to check for typeMismatch flag with type=color input fields');
-var i = document.createElement('input');
-i.type = 'color';
-
-function check(value, mismatchExpected, disabled)
-{
-    i.value = value;
-    i.disabled = !!disabled;
-    var actual = i.validity.typeMismatch;
-    var didPass = actual == mismatchExpected;
-    var resultText = '"' + value + '" is ' + (didPass ? 'a correct ' : 'an incorrect ') + (actual ? 'invalid' : 'valid') + ' color' + (disabled ? ' when disabled.' : '.');
-    if (didPass)
-        testPassed(resultText);
-    else
-        testFailed(resultText);
-}
-
-// Valid values
-check('', false);
-check('#000000', false);
-check('#123456', false);
-check('#789abc', false);
-check('#defABC', false);
-check('#DEF012', false);
-
-// Invalid values: named colors
-check('black', true);
-check('blue', true);
-check('red', true);
-check('purple', true);
-check('green', true);
-check('cyan', true);
-check('yellow', true);
-check('white', true);
-check('White', true);
-check('WHITE', true);
-
-// Invalid values
-check('000000', true);
-check('#FFF', true);
-check(' #ffffff', true);
-check('#ffffff ', true);
-check('#00112233', true);
-check('rgb(0,0,0)', true);
-check('xxx-non-existent-color-name', true);
-check('transparent', true);
-
-// Disabled
-check('invalid', false, true);
-
-var successfullyParsed = true;
index c45e8d5..fdbe7ed 100644 (file)
@@ -27,7 +27,6 @@ check(" text ", "text");
 check("button", "button");
 check(" button ", "text");
 check("checkbox", "checkbox");
-check("color", "color");
 check("date", "date");
 check("datetime", "datetime");
 check("datetime-local", "datetime-local");
index 1ea226a..6d37f52 100644 (file)
@@ -277,6 +277,9 @@ storage/indexeddb
 # StorageTracker is not enabled.
 storage/domstorage/localstorage/storagetracker
 
+# Color input is not yet enabled.
+fast/forms/color
+
 # Speech input is not yet enabled.
 fast/speech
 
index f71e3f4..e25417e 100644 (file)
@@ -197,6 +197,9 @@ editing/pasteboard/file-drag-to-editable.html
 # Hits an assert in FrameLoader.cpp. https://bugs.webkit.org/show_bug.cgi?id=31387
 http/tests/multipart/policy-ignore-crash.php
 
+# Color input is not yet enabled.
+fast/forms/color
+
 # Speech input is not yet enabled.
 fast/speech
 
index 6754eb6..f7fe706 100644 (file)
@@ -1973,6 +1973,9 @@ fast/forms/input-number-events.html
 fast/forms/input-spinbutton-capturing.html
 fast/forms/input-number-large-padding.html
 
+# Color input is not yet enabled.
+fast/forms/color
+
 # Speech input is not yet enabled.
 fast/speech
 
index 7b919d0..5afde47 100644 (file)
@@ -1061,6 +1061,9 @@ fast/forms/input-number-events.html
 fast/forms/input-number-large-padding.html
 fast/forms/input-spinbutton-capturing.html
 
+# Color input is not yet enabled.
+fast/forms/color
+
 # Speech input is not yet enabled.
 fast/speech
 
index 29426e3..1cf13d3 100644 (file)
@@ -1,3 +1,12 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
+
 2011-05-24  Kevin Ollivier  <kevino@theolliviers.com>
 
         Reviewed by Eric Seidel.
index 13f94c7..7622fd8 100644 (file)
@@ -85,6 +85,7 @@ ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
 ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ;
+ENABLE_INPUT_COLOR = ;
 ENABLE_INPUT_SPEECH = ;
 ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -134,4 +135,4 @@ ENABLE_XHTMLMP = ;
 ENABLE_XPATH = ENABLE_XPATH;
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
index 496fd3c..cc03d5a 100644 (file)
@@ -1,3 +1,25 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        Test: fast/forms/color/input-value-sanitization-color.html
+
+        * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
+        * GNUmakefile.am: Added COLOR_INPUT feature flag.
+        * features.pri: Added COLOR_INPUT feature flag.
+        * html/ColorInputType.cpp: Wrapped with COLOR_INPUT feature flag.
+        (WebCore::ColorInputType::isColorControl): Added.
+        (WebCore::ColorInputType::fallbackValue): Added. Fallback value defined in spec.
+        (WebCore::ColorInputType::sanitizeValue): Added. Sanitize value string as defined in spec.
+        * html/ColorInputType.h: Wrapped with COLOR_INPUT feature flag.
+        (WebCore::ColorInputType::ColorInputType): Changed to inherit BaseButtonInputType.
+        * html/InputType.cpp:
+        (WebCore::InputType::isColorControl): Added.
+        * html/InputType.h:
+
 2011-05-24  Steve Lacey  <sjl@chromium.org>
 
         Reviewed by Eric Carlson.
index a869d6e..9f72a7b 100644 (file)
@@ -85,6 +85,7 @@ ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
 ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ;
+ENABLE_INPUT_COLOR = ;
 ENABLE_INPUT_SPEECH = ;
 ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -134,4 +135,4 @@ ENABLE_XHTMLMP = ;
 ENABLE_XPATH = ENABLE_XPATH;
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_MHTML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_MHTML) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
index a74877c..2816a4b 100644 (file)
@@ -273,6 +273,16 @@ webcore_cppflags += -DENABLE_TOUCH_ICON_LOADING=0
 endif # END ENABLE_TOUCH_ICON_LOADING
 
 # ----
+# Color Input API support
+# ----
+if ENABLE_INPUT_COLOR
+FEATURE_DEFINES += ENABLE_INPUT_COLOR=1
+webcore_cppflags += -DENABLE_INPUT_COLOR=1
+else
+webcore_cppflags += -DENABLE_INPUT_COLOR=0
+endif # END ENABLE_INPUT_COLOR
+
+# ----
 # Speech Input API support
 # ----
 if ENABLE_INPUT_SPEECH
index eaba6b7..89074d6 100644 (file)
@@ -69,6 +69,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
 !contains(DEFINES, ENABLE_PROGRESS_TAG=.): DEFINES += ENABLE_PROGRESS_TAG=1
 !contains(DEFINES, ENABLE_BLOB=.): DEFINES += ENABLE_BLOB=1
 !contains(DEFINES, ENABLE_NOTIFICATIONS=.): DEFINES += ENABLE_NOTIFICATIONS=1
+!contains(DEFINES, ENABLE_INPUT_COLOR=.): DEFINES += ENABLE_INPUT_COLOR=0
 !contains(DEFINES, ENABLE_INPUT_SPEECH=.): DEFINES += ENABLE_INPUT_SPEECH=0
 !contains(DEFINES, ENABLE_INSPECTOR=.): DEFINES += ENABLE_INSPECTOR=1
 !contains(DEFINES, ENABLE_3D_RENDERING=.): DEFINES += ENABLE_3D_RENDERING=1
index c55eba2..6834fc2 100644 (file)
@@ -36,6 +36,8 @@
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/WTFString.h>
 
+#if ENABLE(INPUT_COLOR)
+
 namespace WebCore {
 
 static bool isValidColorString(const String& value)
@@ -57,31 +59,37 @@ PassOwnPtr<InputType> ColorInputType::create(HTMLInputElement* element)
     return adoptPtr(new ColorInputType(element));
 }
 
+bool ColorInputType::isColorControl() const
+{
+    return true;
+}
+
 const AtomicString& ColorInputType::formControlType() const
 {
     return InputTypeNames::color();
 }
 
-bool ColorInputType::typeMismatchFor(const String& value) const
+bool ColorInputType::supportsRequired() const
 {
-    // FIXME: Should not accept an empty value. Remove it when we implement value
-    // sanitization for type=color.
-    if (value.isEmpty())
-        return false;
-    return !isValidColorString(value);
+    return false;
 }
 
-bool ColorInputType::typeMismatch() const
+String ColorInputType::fallbackValue()
 {
-    // FIXME: Should return false. We don't implement value sanitization for
-    // type=color yet.
-    String value = element()->value();
-    return !value.isEmpty() && !isValidColorString(value);
+    return String("#000000");
 }
 
-bool ColorInputType::supportsRequired() const
+String ColorInputType::sanitizeValue(const String& proposedValue)
 {
-    return false;
+    if (proposedValue.isNull())
+        return proposedValue;
+
+    if (!isValidColorString(proposedValue))
+        return fallbackValue();
+
+    return proposedValue.lower();
 }
 
 } // namespace WebCore
+
+#endif // ENABLE(INPUT_COLOR)
index ea3798b..7084a25 100644 (file)
 #ifndef ColorInputType_h
 #define ColorInputType_h
 
-#include "TextFieldInputType.h"
+#include "BaseButtonInputType.h"
+
+#if ENABLE(INPUT_COLOR)
 
 namespace WebCore {
 
-class ColorInputType : public TextFieldInputType {
+class ColorInputType : public BaseButtonInputType {
 public:
     static PassOwnPtr<InputType> create(HTMLInputElement*);
 
 private:
-    ColorInputType(HTMLInputElement* element) : TextFieldInputType(element) { }
+    ColorInputType(HTMLInputElement* element) : BaseButtonInputType(element) { }
+    virtual bool isColorControl() const;
     virtual const AtomicString& formControlType() const;
-    virtual bool typeMismatchFor(const String&) const;
-    virtual bool typeMismatch() const;
     virtual bool supportsRequired() const;
+    virtual String fallbackValue();
+    virtual String sanitizeValue(const String&);
 };
 
 } // namespace WebCore
 
-#endif // ButtonInputType_h
+#endif // ENABLE(INPUT_COLOR)
+
+#endif // ColorInputType_h
index 6b359ef..3635b6e 100644 (file)
@@ -79,7 +79,9 @@ static PassOwnPtr<InputTypeFactoryMap> createInputTypeFactoryMap()
     OwnPtr<InputTypeFactoryMap> map = adoptPtr(new InputTypeFactoryMap);
     map->add(InputTypeNames::button(), ButtonInputType::create);
     map->add(InputTypeNames::checkbox(), CheckboxInputType::create);
+#if ENABLE(INPUT_COLOR)
     map->add(InputTypeNames::color(), ColorInputType::create);
+#endif
     map->add(InputTypeNames::date(), DateInputType::create);
     map->add(InputTypeNames::datetime(), DateTimeInputType::create);
     map->add(InputTypeNames::datetimelocal(), DateTimeLocalInputType::create);
@@ -635,6 +637,13 @@ bool InputType::isSteppable() const
     return false;
 }
 
+#if ENABLE(INPUT_COLOR)
+bool InputType::isColorControl() const
+{
+    return false;
+}
+#endif
+
 bool InputType::shouldRespectHeightAndWidthAttributes()
 {
     return false;
@@ -657,11 +666,13 @@ const AtomicString& checkbox()
     return name;
 }
 
+#if ENABLE(INPUT_COLOR)
 const AtomicString& color()
 {
     DEFINE_STATIC_LOCAL(AtomicString, name, ("color"));
     return name;
 }
+#endif
 
 const AtomicString& date()
 {
index b2b1f57..6ce7d40 100644 (file)
@@ -88,6 +88,9 @@ public:
     // inflexible because it's harder to add new input types if there is
     // scattered code with special cases for various types.
 
+#if ENABLE(INPUT_COLOR)
+    virtual bool isColorControl() const;
+#endif // ENABLE(INPUT_COLOR)
     virtual bool isCheckbox() const;
     virtual bool isEmailField() const;
     virtual bool isFileUpload() const;
@@ -259,7 +262,9 @@ namespace InputTypeNames {
 
 const AtomicString& button();
 const AtomicString& checkbox();
+#if ENABLE(INPUT_COLOR)
 const AtomicString& color();
+#endif
 const AtomicString& date();
 const AtomicString& datetime();
 const AtomicString& datetimelocal();
index d02ae7e..e1229b4 100644 (file)
@@ -1,3 +1,12 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * features.gypi: Added INPUT_COLOR feature flag.
+
 2011-05-24  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 70218d0..c2f5878 100644 (file)
@@ -62,6 +62,7 @@
         'ENABLE_GESTURE_RECOGNIZER=1',
         'ENABLE_ICONDATABASE=0',
         'ENABLE_INDEXED_DATABASE=1',
+        'ENABLE_INPUT_COLOR=1',
         'ENABLE_INPUT_SPEECH=1',
         'ENABLE_JAVASCRIPT_DEBUGGER=1',
         'ENABLE_JSC_MULTIPLE_THREADS=0',
index 53aee00..234668c 100644 (file)
@@ -1,3 +1,12 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * Configurations/FeatureDefines.xcconfig: Added INPUT_COLOR feature flag.
+
 2011-05-24  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index ba49a46..afaa4c5 100644 (file)
@@ -87,6 +87,7 @@ ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
 ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ;
+ENABLE_INPUT_COLOR = ;
 ENABLE_INPUT_SPEECH = ;
 ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -135,4 +136,4 @@ ENABLE_XHTMLMP = ;
 ENABLE_XPATH = ENABLE_XPATH;
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
index 91b52c2..454e0c7 100644 (file)
@@ -1,3 +1,12 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * Configurations/FeatureDefines.xcconfig: Added INPUT_COLOR feature flag.
+
 2011-05-24  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Dan Bernstein.
index ba49a46..afaa4c5 100644 (file)
@@ -87,6 +87,7 @@ ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
 ENABLE_ICONDATABASE_macosx = ENABLE_ICONDATABASE;
 
 ENABLE_INDEXED_DATABASE = ;
+ENABLE_INPUT_COLOR = ;
 ENABLE_INPUT_SPEECH = ;
 ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -135,4 +136,4 @@ ENABLE_XHTMLMP = ;
 ENABLE_XPATH = ENABLE_XPATH;
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
index 96899ff..3898c68 100644 (file)
@@ -1,3 +1,12 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * Scripts/build-webkit: Added INPUT_COLOR feature flag.
+
 2011-05-24  Greg Simon  <gregsimon@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index 4237b97..a2d7d5c 100755 (executable)
@@ -87,6 +87,7 @@ my (
     $iconDatabaseSupport,
     $imageResizerSupport,
     $indexedDatabaseSupport,
+    $inputColorSupport,
     $inputSpeechSupport,
     $javaScriptDebuggerSupport,
     $linkPrefetchSupport,
@@ -194,6 +195,9 @@ my @features = (
     { option => "indexed-database", desc => "Toggle Indexed Database API support",
       define => "ENABLE_INDEXED_DATABASE", default => 0, value => \$indexedDatabaseSupport },
 
+    { option => "input-color", desc => "Color Input support",
+      define => "ENABLE_INPUT_COLOR", default => 0, value => \$inputColorSupport },
+
     { option => "input-speech", desc => "Speech Input API support",
       define => "ENABLE_INPUT_SPEECH", default => 0, value => \$inputSpeechSupport },
 
index 0933167..5752802 100644 (file)
@@ -1,3 +1,13 @@
+2011-05-24  Keishi Hattori  <keishi@webkit.org>
+
+        Reviewed by Kent Tamura.
+
+        Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer.
+        https://bugs.webkit.org/show_bug.cgi?id=61273
+
+        * win/tools/vsprops/FeatureDefines.vsprops: Added INPUT_COLOR feature flag.
+        * win/tools/vsprops/FeatureDefinesCairo.vsprops: Added INPUT_COLOR feature flag.
+
 2011-05-12  Jessie Berlin  <jberlin@apple.com>
 
         Reviewed by Darin Adler.
index 7f64618..6342b10 100644 (file)
@@ -9,7 +9,7 @@
        >
   <Tool
                Name="VCCLCompilerTool"
-               PreprocessorDefinitions="$(ENABLE_3D_CANVAS);$(ENABLE_3D_RENDERING);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_BLOB);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CLIENT_BASED_GEOLOCATION);$(ENABLE_DATABASE);$(ENABLE_DATAGRID);$(ENABLE_DATALIST);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM_STORAGE);$(ENABLE_EVENTSOURCE);$(ENABLE_FILTERS);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GEOLOCATION);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_SPEECH);$(ENABLE_JAVASCRIPT_DEBUGGER);$(ENABLE_LINK_PREFETCH);$(ENABLE_MATHML);$(ENABLE_METER_TAG);$(ENABLE_NOTIFICATIONS);$(ENABLE_OFFLINE_WEB_APPLICATIONS);$(ENABLE_PAGE_VISIBILITY_API);$(ENABLE_PROGRESS_TAG);$(ENABLE_QUOTA);$(ENABLE_REGISTER_PROTOCOL_HANDLER);$(ENABLE_SHARED_WORKERS);$(ENABLE_SVG);$(ENABLE_SVG_ANIMATION);$(ENABLE_SVG_AS_IMAGE);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_FOREIGN_OBJECT);$(ENABLE_SVG_USE);$(ENABLE_VIDEO);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WORKERS);$(ENABLE_XHTMLMP);$(ENABLE_XPATH);$(ENABLE_XSLT)"
+               PreprocessorDefinitions="$(ENABLE_3D_CANVAS);$(ENABLE_3D_RENDERING);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_BLOB);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CLIENT_BASED_GEOLOCATION);$(ENABLE_DATABASE);$(ENABLE_DATAGRID);$(ENABLE_DATALIST);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM_STORAGE);$(ENABLE_EVENTSOURCE);$(ENABLE_FILTERS);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GEOLOCATION);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_JAVASCRIPT_DEBUGGER);$(ENABLE_LINK_PREFETCH);$(ENABLE_MATHML);$(ENABLE_METER_TAG);$(ENABLE_NOTIFICATIONS);$(ENABLE_OFFLINE_WEB_APPLICATIONS);$(ENABLE_PAGE_VISIBILITY_API);$(ENABLE_PROGRESS_TAG);$(ENABLE_QUOTA);$(ENABLE_REGISTER_PROTOCOL_HANDLER);$(ENABLE_SHARED_WORKERS);$(ENABLE_SVG);$(ENABLE_SVG_ANIMATION);$(ENABLE_SVG_AS_IMAGE);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_FOREIGN_OBJECT);$(ENABLE_SVG_USE);$(ENABLE_VIDEO);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WORKERS);$(ENABLE_XHTMLMP);$(ENABLE_XPATH);$(ENABLE_XSLT)"
        />
   <UserMacro
                Name="ENABLE_3D_CANVAS"
                PerformEnvironmentSet="true"
        />
   <UserMacro
+               Name="ENABLE_INPUT_COLOR"
+               Value=""
+               PerformEnvironmentSet="true"
+       />
+  <UserMacro
                Name="ENABLE_INPUT_SPEECH"
                Value=""
                PerformEnvironmentSet="true"
index f8f11cf..039e505 100644 (file)
@@ -9,7 +9,7 @@
        >
   <Tool
                Name="VCCLCompilerTool"
-               PreprocessorDefinitions="$(ENABLE_3D_CANVAS);$(ENABLE_3D_RENDERING);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_BLOB);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CLIENT_BASED_GEOLOCATION);$(ENABLE_DATABASE);$(ENABLE_DATAGRID);$(ENABLE_DATALIST);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM_STORAGE);$(ENABLE_EVENTSOURCE);$(ENABLE_FILTERS);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GEOLOCATION);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_SPEECH);$(ENABLE_JAVASCRIPT_DEBUGGER);$(ENABLE_LINK_PREFETCH);$(ENABLE_MATHML);$(ENABLE_METER_TAG);$(ENABLE_NOTIFICATIONS);$(ENABLE_OFFLINE_WEB_APPLICATIONS);$(ENABLE_PAGE_VISIBILITY_API);$(ENABLE_PROGRESS_TAG);$(ENABLE_QUOTA);$(ENABLE_REGISTER_PROTOCOL_HANDLER);$(ENABLE_SHARED_WORKERS);$(ENABLE_SVG);$(ENABLE_SVG_ANIMATION);$(ENABLE_SVG_AS_IMAGE);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_FOREIGN_OBJECT);$(ENABLE_SVG_USE);$(ENABLE_VIDEO);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WORKERS);$(ENABLE_XHTMLMP);$(ENABLE_XPATH);$(ENABLE_XSLT)"
+               PreprocessorDefinitions="$(ENABLE_3D_CANVAS);$(ENABLE_3D_RENDERING);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_BLOB);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CLIENT_BASED_GEOLOCATION);$(ENABLE_DATABASE);$(ENABLE_DATAGRID);$(ENABLE_DATALIST);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM_STORAGE);$(ENABLE_EVENTSOURCE);$(ENABLE_FILTERS);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GEOLOCATION);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_JAVASCRIPT_DEBUGGER);$(ENABLE_LINK_PREFETCH);$(ENABLE_MATHML);$(ENABLE_METER_TAG);$(ENABLE_NOTIFICATIONS);$(ENABLE_OFFLINE_WEB_APPLICATIONS);$(ENABLE_PAGE_VISIBILITY_API);$(ENABLE_PROGRESS_TAG);$(ENABLE_QUOTA);$(ENABLE_REGISTER_PROTOCOL_HANDLER);$(ENABLE_SHARED_WORKERS);$(ENABLE_SVG);$(ENABLE_SVG_ANIMATION);$(ENABLE_SVG_AS_IMAGE);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_FOREIGN_OBJECT);$(ENABLE_SVG_USE);$(ENABLE_VIDEO);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WORKERS);$(ENABLE_XHTMLMP);$(ENABLE_XPATH);$(ENABLE_XSLT)"
        />
   <UserMacro
                Name="ENABLE_3D_CANVAS"
                PerformEnvironmentSet="true"
        />
   <UserMacro
+               Name="ENABLE_INPUT_COLOR"
+               Value=""
+               PerformEnvironmentSet="true"
+       />
+  <UserMacro
                Name="ENABLE_INPUT_SPEECH"
                Value=""
                PerformEnvironmentSet="true"
index 51f30df..be4074a 100644 (file)
@@ -473,6 +473,14 @@ AC_ARG_ENABLE(indexed_database,
               [],[enable_indexed_database="no"])
 AC_MSG_RESULT([$enable_indexed_database])
 
+# check whether to enable the color input
+AC_MSG_CHECKING([whether to enable the color input])
+AC_ARG_ENABLE(input_color,
+              AC_HELP_STRING([--enable-input-color],
+                             [enable the color input [default=no]]),
+              [],[enable_input_color="no"])
+AC_MSG_RESULT([$enable_input_color])
+
 # check whether to enable the speech input API
 AC_MSG_CHECKING([whether to enable the speech input API])
 AC_ARG_ENABLE(input_speech,
@@ -1108,6 +1116,7 @@ AM_CONDITIONAL([ENABLE_QUOTA],[test "$enable_quota" = "yes"])
 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
 AM_CONDITIONAL([ENABLE_IMAGE_RESIZER],[test "$enable_image_resizer" = "yes"])
 AM_CONDITIONAL([ENABLE_INDEXED_DATABASE],[test "$enable_indexed_database" = "yes"])
+AM_CONDITIONAL([ENABLE_INPUT_COLOR],[test "$enable_input_color" = "yes"])
 AM_CONDITIONAL([ENABLE_INPUT_SPEECH],[test "$enable_input_speech" = "yes"])
 AM_CONDITIONAL([ENABLE_XHTMLMP],[test "$enable_xhtmlmp" = "yes"])
 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
@@ -1223,6 +1232,7 @@ Features:
  Link prefetch support                                    : $enable_link_prefetch
  Opcode stats                                             : $enable_opcode_stats
  SharedWorkers support                                    : $enable_shared_workers
+ Color input support                                      : $enable_input_color
  Speech input support                                     : $enable_input_speech
  SVG support                                              : $enable_svg
  SVG animation support                                    : $enable_svg_animation