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

Issue 23788011: Round off error while calculating the background-size: contain/cover. (Closed)

Created:
7 years, 3 months ago by pravind
Modified:
7 years, 3 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Round off error while calculating the background-size: contain/cover. While calculating the height and width of a background image for container with the background-size: contain/cover, on some platforms these values(height and width) are not properly rounded off. Converting these values to integer always takes the floor value rather than rounding it off. BUG=257402 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=158044

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : Rebaseline test case #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M LayoutTests/TestExpectations View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/background-size-cover-and-contain.html View 1 chunk +6 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/background-size-cover-and-contain-expected.html View 1 chunk +6 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/resources/contain-cover.png View 1 2 Binary file 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
pravind
7 years, 3 months ago (2013-09-18 18:33:32 UTC) #1
eseidel
This feels very related to https://codereview.chromium.org/24066007/
7 years, 3 months ago (2013-09-18 18:59:17 UTC) #2
eseidel
https://codereview.chromium.org/23788011/diff/1/Source/core/rendering/RenderBoxModelObject.cpp File Source/core/rendering/RenderBoxModelObject.cpp (right): https://codereview.chromium.org/23788011/diff/1/Source/core/rendering/RenderBoxModelObject.cpp#newcode937 Source/core/rendering/RenderBoxModelObject.cpp:937: return IntSize(max(1, static_cast<int>(round(imageIntrinsicSize.width() * scaleFactor))), max(1, static_cast<int>(round(imageIntrinsicSize.height() * scaleFactor)))); ...
7 years, 3 months ago (2013-09-18 18:59:44 UTC) #3
pravind
On 2013/09/18 18:59:44, eseidel wrote: > https://codereview.chromium.org/23788011/diff/1/Source/core/rendering/RenderBoxModelObject.cpp > File Source/core/rendering/RenderBoxModelObject.cpp (right): > > https://codereview.chromium.org/23788011/diff/1/Source/core/rendering/RenderBoxModelObject.cpp#newcode937 > ...
7 years, 3 months ago (2013-09-18 19:35:55 UTC) #4
eseidel
lgtm
7 years, 3 months ago (2013-09-18 19:56:49 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pravin.d@samsung.com/23788011/7001
7 years, 3 months ago (2013-09-18 20:15:41 UTC) #6
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=5232
7 years, 3 months ago (2013-09-18 21:55:03 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pravin.d@samsung.com/23788011/22001
7 years, 3 months ago (2013-09-19 17:43:55 UTC) #8
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 3 months ago (2013-09-19 17:43:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pravin.d@samsung.com/23788011/28001
7 years, 3 months ago (2013-09-19 18:03:40 UTC) #10
commit-bot: I haz the power
7 years, 3 months ago (2013-09-19 19:02:08 UTC) #11
Message was sent while issue was closed.
Change committed as 158044

Powered by Google App Engine
This is Rietveld 408576698