WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
50308
Reject named colors, accept only #rrggbb in <input type=color />
https://bugs.webkit.org/show_bug.cgi?id=50308
Summary
Reject named colors, accept only #rrggbb in <input type=color />
Dai Mikurube
Reported
2010-11-30 21:25:50 PST
Due to HTML5 "4.10.7.1.15 Color state," <input type=color /> accepts only "simple colors" in the style of #xxxxxx.
>
http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#color-state
Attachments
Patch
(4.67 KB, patch)
2010-11-30 21:40 PST
,
Dai Mikurube
no flags
Details
Formatted Diff
Diff
Patch
(4.72 KB, patch)
2010-11-30 21:50 PST
,
Dai Mikurube
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dai Mikurube
Comment 1
2010-11-30 21:40:08 PST
Created
attachment 75247
[details]
Patch
Kent Tamura
Comment 2
2010-11-30 21:43:17 PST
Comment on
attachment 75247
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=75247&action=review
> WebCore/html/ColorInputType.cpp:53 > } > - // This accepts named colors such as "white". > - // FIXME: Reject named colors, accept only #rrggbb. > - Color color(value); > - return color.isValid() && !color.hasAlpha(); > + return false; > }
We prefer early exit. So this should be if (value[0] != '#') return false; // We don't accept #rgb .....
Dai Mikurube
Comment 3
2010-11-30 21:50:20 PST
Created
attachment 75249
[details]
Patch
Kent Tamura
Comment 4
2010-11-30 21:51:46 PST
Comment on
attachment 75249
[details]
Patch ok
WebKit Commit Bot
Comment 5
2010-12-02 09:11:28 PST
Comment on
attachment 75249
[details]
Patch Clearing flags on attachment: 75249 Committed
r73139
: <
http://trac.webkit.org/changeset/73139
>
WebKit Commit Bot
Comment 6
2010-12-02 09:11:33 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug