[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 17:54:48 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6f0f522c728875f8cef5f473a66943e8d8ffffd1
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 2 17:11:07 2010 +0000
2010-12-02 Dai Mikurube <dmikurube at google.com>
Reviewed by Kent Tamura.
Reject named colors, accept only #rrggbb in <input type=color />
https://bugs.webkit.org/show_bug.cgi?id=50308
* fast/forms/ValidityState-typeMismatch-color-expected.txt:
* fast/forms/script-tests/ValidityState-typeMismatch-color.js: Changed to reject English color names.
2010-12-02 Dai Mikurube <dmikurube at google.com>
Reviewed by Kent Tamura.
Reject named colors, accept only #rrggbb in <input type=color />
https://bugs.webkit.org/show_bug.cgi?id=50308
* html/ColorInputType.cpp: Modified to accept only simple colors like #xxxxxx.
(WebCore::isValidColorString):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8cdaec1..d9a6a34 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-02 Dai Mikurube <dmikurube at google.com>
+
+ Reviewed by Kent Tamura.
+
+ Reject named colors, accept only #rrggbb in <input type=color />
+ https://bugs.webkit.org/show_bug.cgi?id=50308
+
+ * fast/forms/ValidityState-typeMismatch-color-expected.txt:
+ * fast/forms/script-tests/ValidityState-typeMismatch-color.js: Changed to reject English color names.
+
2010-12-02 Philippe Normand <pnormand at igalia.com>
Unreviewed, skip failing test.
diff --git a/LayoutTests/fast/forms/ValidityState-typeMismatch-color-expected.txt b/LayoutTests/fast/forms/ValidityState-typeMismatch-color-expected.txt
index f97927c..1db07f5 100644
--- a/LayoutTests/fast/forms/ValidityState-typeMismatch-color-expected.txt
+++ b/LayoutTests/fast/forms/ValidityState-typeMismatch-color-expected.txt
@@ -9,16 +9,16 @@ 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 valid color.
-PASS "blue" is a correct valid color.
-PASS "red" is a correct valid color.
-PASS "purple" is a correct valid color.
-PASS "green" is a correct valid color.
-PASS "cyan" is a correct valid color.
-PASS "yellow" is a correct valid color.
-PASS "white" is a correct valid color.
-PASS "White" is a correct valid color.
-PASS "WHITE" 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.
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-color.js b/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-color.js
index 47b147e..bfda501 100644
--- a/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-color.js
+++ b/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-color.js
@@ -22,17 +22,17 @@ check('#789abc', false);
check('#defABC', false);
check('#DEF012', false);
-// Extension: named colors
-check('black', false);
-check('blue', false);
-check('red', false);
-check('purple', false);
-check('green', false);
-check('cyan', false);
-check('yellow', false);
-check('white', false);
-check('White', false);
-check('WHITE', 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);
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3a8f9dd..74f868c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-02 Dai Mikurube <dmikurube at google.com>
+
+ Reviewed by Kent Tamura.
+
+ Reject named colors, accept only #rrggbb in <input type=color />
+ https://bugs.webkit.org/show_bug.cgi?id=50308
+
+ * html/ColorInputType.cpp: Modified to accept only simple colors like #xxxxxx.
+ (WebCore::isValidColorString):
+
2010-12-02 Vincent Scheib <scheib at chromium.org>
Reviewed by Darin Fisher.
diff --git a/WebCore/html/ColorInputType.cpp b/WebCore/html/ColorInputType.cpp
index 56bfd08..c55eba2 100644
--- a/WebCore/html/ColorInputType.cpp
+++ b/WebCore/html/ColorInputType.cpp
@@ -42,13 +42,12 @@ static bool isValidColorString(const String& value)
{
if (value.isEmpty())
return false;
- if (value[0] == '#') {
- // We don't accept #rgb and #aarrggbb formats.
- if (value.length() != 7)
- return false;
- }
- // This accepts named colors such as "white".
- // FIXME: Reject named colors, accept only #rrggbb.
+ if (value[0] != '#')
+ return false;
+
+ // We don't accept #rgb and #aarrggbb formats.
+ if (value.length() != 7)
+ return false;
Color color(value);
return color.isValid() && !color.hasAlpha();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list