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

Issue 1914693002: Clamp CSS numbers to float range at parsing. (Closed)

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

Description

Clamp CSS numbers to float range at parsing. The CSS parser previously did late checks that all number-type tokens were in the range of a float, and treated them as invalid if not. Instead, this CL clamps CSS number-type values to float range at parse- time, and removes the now-extraneous checks. This should be faster that iterating over already-parsed tokens, and treats a wider range of values as valid (anything that successfully parses as a double is now valid).

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -24 lines) Patch
M third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp View 1 chunk +6 lines, -1 line 1 comment Download
M third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp View 1 chunk +5 lines, -1 line 1 comment Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 3 chunks +0 lines, -22 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Tab Atkins
While I'm here in this code, I'm not 100% certain why we were limiting it ...
4 years, 8 months ago (2016-04-22 21:07:14 UTC) #3
rune
This CL needs tests. timloh@ should have a look as well. https://codereview.chromium.org/1914693002/diff/1/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp File third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp (right): ...
4 years, 8 months ago (2016-04-25 12:24:29 UTC) #5
Timothy Loh
On 2016/04/22 21:07:14, Tab Atkins wrote: > While I'm here in this code, I'm not ...
4 years, 7 months ago (2016-04-28 08:11:50 UTC) #6
rune
This stalled. Tab, do you want to follow up, or should someone take over?
4 years, 5 months ago (2016-06-28 10:52:34 UTC) #7
rwlbuis
On 2016/06/28 10:52:34, rune wrote: > This stalled. Tab, do you want to follow up, ...
4 years, 5 months ago (2016-06-29 14:25:08 UTC) #8
rwlbuis
4 years, 4 months ago (2016-08-15 15:09:20 UTC) #9
On 2016/06/29 14:25:08, rwlbuis wrote:
> On 2016/06/28 10:52:34, rune wrote:
> > This stalled. Tab, do you want to follow up, or should someone take over?
> 
> I am willing to work on this, as I already kind of touching this area:
> https://codereview.chromium.org/2056593005/

I think this CL can be closed now since the comparable patch went in:
https://codereview.chromium.org/2115923002/

Powered by Google App Engine
This is Rietveld 408576698