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

Issue 545173003: Support scientific notation in CSS numbers/percentages/dimensions (Closed)

Created:
6 years, 3 months ago by fs
Modified:
6 years, 3 months ago
Reviewers:
pdr., Timothy Loh
CC:
blink-reviews, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis
Project:
blink
Visibility:
Public.

Description

Support scientific notation in CSS numbers/percentages/dimensions Previously, scientific notation (scinot) was only supported for SVG presentation attributes through a special tokenizer quirk. Since scinot has now been added to the CSS syntax spec [1][2][3] and is already supported by Gecko [4] and IE(11). To harmonize, the call to parseSVGNumber(...) is replaced with a call to charactersToDouble(...). This results in a small behavioral change, since the former would reject numbers that were too large. These will now parse as "Infinity" [5]. Since this removes the last caller of isSVGNumberParsingEnabledForMode() that function is removed as well. [1] http://dev.w3.org/csswg/css-syntax/#number-token-diagram [2] http://lists.w3.org/Archives/Public/www-style/2012Aug/0900.html [3] http://lists.w3.org/Archives/Public/www-style/2013Apr/0428.html [4] https://bugzilla.mozilla.org/show_bug.cgi?id=964529 [5] Tested browsers were not entirely consistent in their treatment of infinities (Gecko: Infinity, IE: FLT_MAX). BUG=388161 BUG=344645 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181560

Patch Set 1 #

Patch Set 2 : Drop parseSVGNumber; Add additional TC. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -43 lines) Patch
M LayoutTests/css-parser/counter-parsing.html View 1 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/css-parser/resources/property-parsing-test.js View 1 2 chunks +5 lines, -1 line 0 comments Download
A LayoutTests/css-parser/scientific-notation.html View 1 1 chunk +64 lines, -0 lines 0 comments Download
M LayoutTests/svg/css/scientific-numbers-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/svg/css/script-tests/scientific-numbers.js View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/parser/CSSParserMode.h View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/css/parser/CSSTokenizer-in.cpp View 1 chunk +12 lines, -17 lines 0 comments Download
M Source/core/svg/SVGParserUtilities.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/svg/SVGParserUtilities.cpp View 1 1 chunk +0 lines, -12 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
fs
@timloh: I noticed your comment on issue 344645, but at that point I was pretty ...
6 years, 3 months ago (2014-09-08 08:28:39 UTC) #2
Timothy Loh
On 2014/09/08 08:28:39, fs wrote: > @timloh: I noticed your comment on issue 344645, but ...
6 years, 3 months ago (2014-09-08 09:24:06 UTC) #3
fs
On 2014/09/08 09:24:06, Timothy Loh wrote: > On 2014/09/08 08:28:39, fs wrote: > > @timloh: ...
6 years, 3 months ago (2014-09-08 11:10:07 UTC) #4
Timothy Loh
lgtm
6 years, 3 months ago (2014-09-08 11:29:26 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/545173003/20001
6 years, 3 months ago (2014-09-08 13:55:19 UTC) #7
commit-bot: I haz the power
6 years, 3 months ago (2014-09-08 13:59:16 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as 181560

Powered by Google App Engine
This is Rietveld 408576698