Summary: | Wrap input color in feature flag | ||
---|---|---|---|
Product: | WebKit | Reporter: | Keishi Hattori <keishi> |
Component: | Forms | Assignee: | Keishi Hattori <keishi> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | cmarcelo, commit-queue, dglazkov, joepeck, rasamassen, tkent, webkit.review.bot |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 29358, 37024 | ||
Attachments: |
Description
Keishi Hattori
2011-05-23 05:38:22 PDT
Created attachment 94404 [details]
Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer.
This patch does the following
- disables the current input type=color implementation
- adds ENABLE_INPUT_COLOR feature flag
- replace typemismatch with value sanitization
Comment on attachment 94404 [details] Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer. Attachment 94404 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/8729188 New failing tests: fast/forms/color/input-value-sanitization-color.html fast/forms/ValidityState-patternMismatch-unsupported.html fast/forms/input-type-change3.html Created attachment 94416 [details]
Archive of layout-test-results from ec2-cr-linux-02
The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-02 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment on attachment 94404 [details] Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer. View in context: https://bugs.webkit.org/attachment.cgi?id=94404&action=review r- because of Chromium Linux test failures. > LayoutTests/fast/forms/color/input-value-sanitization-color.html:10 > +<script src="input-value-sanitization-color.js"></script> You don't need to separate the JS code to another file. Please embed it here. > Source/WebCore/ChangeLog:7 > + Disable input color. Add INPUT_COLOR feature flag. Implement input color sanitizer. > + https://bugs.webkit.org/show_bug.cgi?id=29358 > + You need more words for "Disable input color". e.g. Disable textfield implementation of <input type=color>. nit: you can split the patch into three: - Introduce INPUT_COLOR flag - Disabled textfield implementation - Implement value sanitization You may proceed this patch without splitting because I'm very familiar with the code around there. But smaller patch is better in general. Created attachment 94545 [details]
fixed tests. enabled flag for chromium port
Created attachment 94547 [details]
fixed mistake
Comment on attachment 94547 [details] fixed mistake View in context: https://bugs.webkit.org/attachment.cgi?id=94547&action=review > LayoutTests/ChangeLog:20 > + * 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/color/input-value-sanitization-color.js: Added. > + * 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-typeMismatch-color.js: Removed. > + * platform/gtk/Skipped: Skip fast/forms/color. > + * platform/qt/Skipped: Skip fast/forms/color. > + * platform/win/Skipped: Skip fast/forms/color. This file list is out-of-sync. > LayoutTests/fast/forms/ValidityState-patternMismatch-unsupported.html:-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/ValidityState-patternMismatch-unsupported.js"></script> > -<script src="../../fast/js/resources/js-test-post.js"></script> > -</body> > -</html> Please don't remove it. We should change the type=color usage to another type which doesn't support the pattern attribute. Created attachment 94562 [details]
fixed test & changelog
Comment on attachment 94562 [details] fixed test & changelog View in context: https://bugs.webkit.org/attachment.cgi?id=94562&action=review r- because of a wrong test. > LayoutTests/fast/forms/script-tests/ValidityState-patternMismatch-unsupported.js:6 > -input.type = 'color'; > +input.type = 'range'; > input.pattern = '#[0-9A-F]{6}'; // Restrict to capital letters > input.value = '#0099ff'; The intention of this test is to try to restrict valid values by pattern attribute. #0099ff is invalid for type=range, and pattern='#[0-9A-F]{6}' makes no sense for type=range. The 8th line still has 'type=color' in the comment. Created attachment 94566 [details]
fixed ValidityState-patternMismatch-unsupported test
(In reply to comment #9) > (From update of attachment 94562 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=94562&action=review > > r- because of a wrong test. I'm sorry. I hope this fixes it. Comment on attachment 94566 [details]
fixed ValidityState-patternMismatch-unsupported test
Looks good!
Created attachment 94736 [details]
rebased for commit
Comment on attachment 94736 [details] rebased for commit Clearing flags on attachment: 94736 Committed r87274: <http://trac.webkit.org/changeset/87274> All reviewed patches have been landed. Closing bug. *** Bug 61673 has been marked as a duplicate of this bug. *** |