New issue
Advanced search Search tips

Issue 593861 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

background-repeat: space leaves one pixel gap at top/left

Project Member Reported by schenney@chromium.org, Mar 10 2016

Issue description

Version: ToT
OS: All

Run the attached test and note the background color peeping through on the top and left of repeat space images. By definition, repeat space should have a tile hard up against the left and right edges.

 
background-repeat-with-background-color.html
756 bytes View Download
green-24x24.png
131 bytes View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a75de675cbb8f9f594fabc68236a4547975ad7fe

commit a75de675cbb8f9f594fabc68236a4547975ad7fe
Author: schenney <schenney@chromium.org>
Date: Mon Mar 14 14:34:18 2016

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 

Review URL: https://codereview.chromium.org/1780893004

Cr-Commit-Position: refs/heads/master@{#380972}

[modify] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/LayoutTests/css3/background/background-repeat-round-content-expected.html
[modify] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/LayoutTests/fast/backgrounds/background-position-zoomed.html
[add] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/LayoutTests/fast/backgrounds/background-repeat-with-background-color.html
[add] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/LayoutTests/fast/backgrounds/resources/green-24x24.png
[add] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/LayoutTests/platform/linux/fast/backgrounds/background-repeat-with-background-color-expected.png
[add] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/LayoutTests/platform/linux/fast/backgrounds/background-repeat-with-background-color-expected.txt
[modify] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
[modify] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.h
[modify] https://crrev.com/a75de675cbb8f9f594fabc68236a4547975ad7fe/third_party/WebKit/Source/core/paint/BoxPainter.cpp

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9a88a4d6744bd1360799c4491debbf8762b38b9f

commit 9a88a4d6744bd1360799c4491debbf8762b38b9f
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Mon Mar 14 18:41:20 2016

Auto-rebaseline for r380972

https://chromium.googlesource.com/chromium/src/+/a75de675c

BUG= 593861 
TBR=schenney@chromium.org

Review URL: https://codereview.chromium.org/1801893002 .

Cr-Commit-Position: refs/heads/master@{#381023}

[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/fast/backgrounds/background-repeat-with-background-color-expected.png
[add] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/android/css3/masking/mask-repeat-round-content-expected.png
[delete] https://crrev.com/0f8c02a65250bae6b6c1f156d5e031c89336eb37/third_party/WebKit/LayoutTests/platform/android/css3/masking/mask-repeat-space-content-expected.png
[add] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/android/fast/backgrounds/background-repeat-with-background-color-expected.png
[add] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/android/fast/images/color-profile-mask-image-svg-expected.png
[delete] https://crrev.com/0f8c02a65250bae6b6c1f156d5e031c89336eb37/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/css3/masking/mask-repeat-round-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/css3/masking/mask-repeat-space-border-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/css3/masking/mask-repeat-space-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/css3/masking/mask-repeat-space-padding-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/fast/backgrounds/background-repeat-with-background-color-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/fast/images/color-profile-mask-image-svg-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/linux/svg/as-background-image/background-repeat-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/css3/masking/mask-repeat-round-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/css3/masking/mask-repeat-space-border-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/css3/masking/mask-repeat-space-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac-mac10.9/css3/masking/mask-repeat-space-padding-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac/css3/masking/mask-repeat-round-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac/css3/masking/mask-repeat-space-border-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac/css3/masking/mask-repeat-space-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac/css3/masking/mask-repeat-space-padding-expected.png
[add] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/background-repeat-with-background-color-expected.txt
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac/fast/images/color-profile-mask-image-svg-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/win/css3/masking/mask-repeat-round-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/win/css3/masking/mask-repeat-space-border-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/win/css3/masking/mask-repeat-space-content-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/win/css3/masking/mask-repeat-space-padding-expected.png
[add] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/background-repeat-with-background-color-expected.txt
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/win/fast/images/color-profile-mask-image-svg-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.png
[modify] https://crrev.com/9a88a4d6744bd1360799c4491debbf8762b38b9f/third_party/WebKit/LayoutTests/svg/as-background-image/background-repeat-expected.png

Status: Fixed (was: Assigned)

Sign in to add a comment