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

Issue 1780893004: Adjust the rounding methodology for tiled background phase (Closed)

Created:
4 years, 9 months ago by Stephen Chennney
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dshwang, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adjust the pixel snapping methodology for tiled backgrounds The BackgroundImageGeometry::pixelSnapGeometry method was using rounding for tile spacing and flooring for phase, resulting in one pixel gaps in coverage on the top/left of a repeat: space tiled image. This results in incompatible rounding for phase, space and tilesize, the combination of which leads to sub-optimal tiling for background-repeat: space; content, including missing coverage at the edge of a tiled area. The new test explicitly shows this issue. Existing results for svg/as-background-image/background-repeat.html, ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box.htm and fast/images/color-profile-mask-image-svg.html are noticeably better. Other results move the background by a pixel or less with no negative impact on the quality of the result. The test fast/backgrounds/background-position-zoomed.html was relying on the floor behavior due to the test zooming odd numbers by 0.5. A minor test change fixes the problem. Note that any test relying on pulling exact pixels from the image will fail at some zoom level due to the fact we are rounding to integers. This patch also removes the redundant imageContainerSize member and accessor, because it is always the same as the tile size. R=trchen@chromium.org, leviw@chromium.org BUG=593861 Committed: https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe Cr-Commit-Position: refs/heads/master@{#380972}

Patch Set 1 #

Patch Set 2 : Snap as we go #

Total comments: 2

Patch Set 3 : Best solution so far #

Patch Set 4 : Fix expectation #

Patch Set 5 : Removed bad comment #

Messages

Total messages: 36 (17 generated)
Stephen Chennney
I need to add TestExpectations, but first I want to try one other scheme, and ...
4 years, 9 months ago (2016-03-10 19:52:05 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1780893004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1780893004/1
4 years, 9 months ago (2016-03-10 19:53:09 UTC) #3
Stephen Chennney
Better not to round the results at all. New patch coming once I figure out ...
4 years, 9 months ago (2016-03-10 20:21:14 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/128865) linux_chromium_chromeos_rel_ng on ...
4 years, 9 months ago (2016-03-10 20:33:25 UTC) #9
trchen
The math doesn't feel right to me. The unsnapped phase value depends on fmodf(leftEdgeOfFirstTile, unsnappedTileSize), ...
4 years, 9 months ago (2016-03-11 00:31:16 UTC) #10
Stephen Chennney
On 2016/03/11 00:31:16, trchen wrote: > The math doesn't feel right to me. The unsnapped ...
4 years, 9 months ago (2016-03-11 15:37:42 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1780893004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1780893004/20001
4 years, 9 months ago (2016-03-11 17:36:37 UTC) #13
Stephen Chennney
This version snaps as we go, and removes a couple of methods and verifies that ...
4 years, 9 months ago (2016-03-11 17:37:05 UTC) #14
Stephen Chennney
https://codereview.chromium.org/1780893004/diff/20001/third_party/WebKit/LayoutTests/fast/backgrounds/background-position-zoomed.html File third_party/WebKit/LayoutTests/fast/backgrounds/background-position-zoomed.html (right): https://codereview.chromium.org/1780893004/diff/20001/third_party/WebKit/LayoutTests/fast/backgrounds/background-position-zoomed.html#newcode6 third_party/WebKit/LayoutTests/fast/backgrounds/background-position-zoomed.html:6: height: 26px; I might not need this now. Have ...
4 years, 9 months ago (2016-03-11 17:39:01 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/195521)
4 years, 9 months ago (2016-03-11 18:41:30 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1780893004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1780893004/40001
4 years, 9 months ago (2016-03-11 20:02:56 UTC) #19
Stephen Chennney
Ready for review now. Take a look at the layout test results from the second ...
4 years, 9 months ago (2016-03-11 20:09:36 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1780893004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1780893004/100001
4 years, 9 months ago (2016-03-11 21:02:31 UTC) #25
leviw_travelin_and_unemployed
LGTM. Thanks for looking into this!
4 years, 9 months ago (2016-03-11 21:47:32 UTC) #26
trchen
On 2016/03/11 21:47:32, leviw wrote: > LGTM. > > Thanks for looking into this! lgtm ...
4 years, 9 months ago (2016-03-11 22:24:22 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-11 23:33:57 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1780893004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1780893004/100001
4 years, 9 months ago (2016-03-14 13:17:58 UTC) #32
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 9 months ago (2016-03-14 14:34:27 UTC) #34
commit-bot: I haz the power
4 years, 9 months ago (2016-03-14 14:36:07 UTC) #36
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe
Cr-Commit-Position: refs/heads/master@{#380972}

Powered by Google App Engine
This is Rietveld 408576698