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

Issue 1306743003: Fix float parsing in srcset (Closed)

Created:
5 years, 3 months ago by Yoav Weiss
Modified:
5 years, 3 months ago
Reviewers:
tkent, Noel Gordon
CC:
blink-reviews, blink-reviews-w3ctests_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix float parsing in srcset The HTMLSrcsetParser was using a non-compliant float parser (the one used by WTFString::charactersToFloat which is in wtf/dtoa/double-conversion). As a result some tests were failing. This CL switches it to use the decimal parser in HTMLParserIdioms. BUG=523159 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201132

Patch Set 1 #

Patch Set 2 : clamp to float #

Total comments: 3

Patch Set 3 : switched clamp to cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -634 lines) Patch
D LayoutTests/imported/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute-expected.txt View 1 chunk +0 lines, -633 lines 0 comments Download
M Source/core/html/parser/HTMLSrcsetParser.cpp View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/html/parser/HTMLSrcsetParserTest.cpp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (7 generated)
Yoav Weiss
5 years, 3 months ago (2015-08-25 09:24:26 UTC) #2
tkent
lgtm
5 years, 3 months ago (2015-08-25 09:34:46 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306743003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306743003/1
5 years, 3 months ago (2015-08-25 09:35:04 UTC) #5
Yoav Weiss
5 years, 3 months ago (2015-08-25 09:36:41 UTC) #6
Yoav Weiss
On 2015/08/25 09:34:46, tkent wrote: > lgtm Thanks! :) I've updated the CL to properly ...
5 years, 3 months ago (2015-08-25 09:37:18 UTC) #7
tkent
https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp File Source/core/html/parser/HTMLSrcsetParser.cpp (right): https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp#newcode104 Source/core/html/parser/HTMLSrcsetParser.cpp:104: return clampTo<float>(result.toDouble()); This looks to have a behavior change ...
5 years, 3 months ago (2015-08-25 10:02:47 UTC) #8
Yoav Weiss
https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp File Source/core/html/parser/HTMLSrcsetParser.cpp (right): https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp#newcode104 Source/core/html/parser/HTMLSrcsetParser.cpp:104: return clampTo<float>(result.toDouble()); On 2015/08/25 10:02:46, tkent wrote: > This ...
5 years, 3 months ago (2015-08-25 10:07:58 UTC) #9
tkent
https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp File Source/core/html/parser/HTMLSrcsetParser.cpp (right): https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp#newcode104 Source/core/html/parser/HTMLSrcsetParser.cpp:104: return clampTo<float>(result.toDouble()); On 2015/08/25 10:07:58, Yoav Weiss wrote: > ...
5 years, 3 months ago (2015-08-25 10:14:23 UTC) #10
Yoav Weiss
On 2015/08/25 10:14:23, tkent wrote: > https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp > File Source/core/html/parser/HTMLSrcsetParser.cpp (right): > > https://codereview.chromium.org/1306743003/diff/20001/Source/core/html/parser/HTMLSrcsetParser.cpp#newcode104 > ...
5 years, 3 months ago (2015-08-25 11:05:05 UTC) #11
tkent
lgtm
5 years, 3 months ago (2015-08-25 11:05:56 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306743003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306743003/40001
5 years, 3 months ago (2015-08-25 11:08:59 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/103803)
5 years, 3 months ago (2015-08-25 12:05:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306743003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306743003/40001
5 years, 3 months ago (2015-08-25 12:13:51 UTC) #18
Noel Gordon
LGTM
5 years, 3 months ago (2015-08-25 12:51:00 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/103823)
5 years, 3 months ago (2015-08-25 13:01:06 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306743003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306743003/40001
5 years, 3 months ago (2015-08-25 13:22:19 UTC) #23
commit-bot: I haz the power
5 years, 3 months ago (2015-08-25 14:50:52 UTC) #24
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201132

Powered by Google App Engine
This is Rietveld 408576698