Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Issue 1963843002: Implement stricter hashless hex color parsing (Closed)

Created:
4 years, 7 months ago by rwlbuis
Modified:
4 years, 7 months ago
Reviewers:
Timothy Loh, rune
CC:
chromium-reviews, blink-reviews-css, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement stricter hashless hex color parsing According to the spec[1] for both <number> and <dimension> we need to check that the component values are non-negative and integers. Implement that and add some subtests for it. With this change we are passing the official test[2] linked from the spec. BUG=611442 [1] https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk [2] http://w3c-test.org/quirks-mode/hashless-hex-color.html Committed: https://crrev.com/08ced96eadd5a34cdd251a02e68d686d556f8a12 Cr-Commit-Position: refs/heads/master@{#393502}

Patch Set 1 #

Patch Set 2 : V2 #

Patch Set 3 : Add more subtests #

Total comments: 4

Patch Set 4 : Address review comments #

Total comments: 2

Patch Set 5 : Address timloh review comments #

Patch Set 6 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -8 lines) Patch
M third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html View 1 2 3 4 5 3 chunks +27 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp View 1 2 3 4 5 1 chunk +7 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (9 generated)
rwlbuis
PTAL. I don't think this conflicts with Noel's patch. @timloh note that something like -0000FF ...
4 years, 7 months ago (2016-05-10 18:16:05 UTC) #4
rune
https://codereview.chromium.org/1963843002/diff/60001/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html File third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html (left): https://codereview.chromium.org/1963843002/diff/60001/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html#oldcode193 third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html:193: </script> What's the pass rate of http://w3c-test.org/quirks-mode/hashless-hex-color.html now? Would ...
4 years, 7 months ago (2016-05-10 21:27:32 UTC) #5
rwlbuis
https://codereview.chromium.org/1963843002/diff/60001/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html File third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html (left): https://codereview.chromium.org/1963843002/diff/60001/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html#oldcode193 third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html:193: </script> On 2016/05/10 21:27:32, rune wrote: > What's the ...
4 years, 7 months ago (2016-05-10 21:34:32 UTC) #6
Timothy Loh
I guess the -0000FF case can just stay as-is since this way we match spec. ...
4 years, 7 months ago (2016-05-11 02:12:55 UTC) #7
rwlbuis
Ok I'll bring back the old test change and won't import the w3c test in ...
4 years, 7 months ago (2016-05-11 02:28:48 UTC) #8
rune
lgtm
4 years, 7 months ago (2016-05-11 23:08:18 UTC) #9
Timothy Loh
lgtm, but I'd wait for Noel to land his patch first and rebase over it ...
4 years, 7 months ago (2016-05-12 07:06:42 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1963843002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1963843002/120001
4 years, 7 months ago (2016-05-13 10:46:54 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years, 7 months ago (2016-05-13 11:53:51 UTC) #17
commit-bot: I haz the power
4 years, 7 months ago (2016-05-13 11:55:19 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/08ced96eadd5a34cdd251a02e68d686d556f8a12
Cr-Commit-Position: refs/heads/master@{#393502}

Powered by Google App Engine
This is Rietveld 408576698