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

Issue 74533004: Make HTMLCanvasElement::convertLogicalToDevice() clamp float to integer. (Closed)

Created:
7 years, 1 month ago by dshwang
Modified:
7 years, 1 month ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Make HTMLCanvasElement::convertLogicalToDevice() clamp float to integer. convertLogicalToDevice() has a potential issue to return a falsely negative value due to integer precison.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -3 lines) Patch
M Source/core/html/HTMLCanvasElement.cpp View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
dshwang
7 years, 1 month ago (2013-11-19 10:59:26 UTC) #1
dshwang
expandedIntSize() implementation is as follows: inline IntSize expandedIntSize(const FloatSize& p) { return IntSize(clampToInteger(ceilf(p.width())), clampToInteger(ceilf(p.height()))); } ...
7 years, 1 month ago (2013-11-19 11:04:04 UTC) #2
Stephen White
On 2013/11/19 11:04:04, dshwang wrote: > expandedIntSize() implementation is as follows: > > inline IntSize ...
7 years, 1 month ago (2013-11-19 16:59:40 UTC) #3
dshwang
7 years, 1 month ago (2013-11-19 17:15:08 UTC) #4
On 2013/11/19 16:59:40, Stephen White wrote:
> Could you fold this change into the other one, so it is tested there?

Yes, I updated https://codereview.chromium.org/44253005/ to merge this CL with
it.

Powered by Google App Engine
This is Rietveld 408576698