| Index: third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| index 41c0b148ca7bd05287de48a2787909a569a2a56f..14ec0a3ee1b002fa1625233b2801dc8199caa147 100644
|
| --- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
|
| @@ -467,15 +467,19 @@ void BackgroundImageGeometry::Calculate(
|
| LayoutUnit bottom;
|
| // Scroll and Local.
|
| if (fill_layer.Origin() != kBorderFillBox) {
|
| - left = LayoutUnit(positioning_box.BorderLeft());
|
| - right = LayoutUnit(positioning_box.BorderRight());
|
| - top = LayoutUnit(positioning_box.BorderTop());
|
| - bottom = LayoutUnit(positioning_box.BorderBottom());
|
| + left = LayoutUnit(positioning_box.BorderLeft().Round());
|
| + right = LayoutUnit(positioning_box.BorderRight().Round());
|
| + top = LayoutUnit(positioning_box.BorderTop().Round());
|
| + bottom = LayoutUnit(positioning_box.BorderBottom().Round());
|
| if (fill_layer.Origin() == kContentFillBox) {
|
| - left += positioning_box.PaddingLeft();
|
| - right += positioning_box.PaddingRight();
|
| - top += positioning_box.PaddingTop();
|
| - bottom += positioning_box.PaddingBottom();
|
| + left = std::max(
|
| + left, positioning_box.BorderLeft() + positioning_box.PaddingLeft());
|
| + right = std::max(right, positioning_box.BorderRight() +
|
| + positioning_box.PaddingRight());
|
| + top = std::max(
|
| + top, positioning_box.BorderTop() + positioning_box.PaddingTop());
|
| + bottom = std::max(bottom, positioning_box.BorderBottom() +
|
| + positioning_box.PaddingBottom());
|
| }
|
| }
|
|
|
| @@ -604,7 +608,9 @@ void BackgroundImageGeometry::Calculate(
|
|
|
| if (background_repeat_x == kRepeatFill) {
|
| SetRepeatX(fill_layer, fill_tile_size.Width(), available_width,
|
| - unsnapped_available_width, left, offset_in_background.X());
|
| + unsnapped_available_width,
|
| + LayoutUnit(SnapSizeToPixel(left, dest_rect_.X())),
|
| + offset_in_background.X());
|
| } else if (background_repeat_x == kSpaceFill &&
|
| TileSize().Width() > LayoutUnit()) {
|
| LayoutUnit space = GetSpaceBetweenImageTiles(positioning_area_size.Width(),
|
| @@ -625,7 +631,9 @@ void BackgroundImageGeometry::Calculate(
|
|
|
| if (background_repeat_y == kRepeatFill) {
|
| SetRepeatY(fill_layer, fill_tile_size.Height(), available_height,
|
| - unsnapped_available_height, top, offset_in_background.Y());
|
| + unsnapped_available_height,
|
| + LayoutUnit(SnapSizeToPixel(top, dest_rect_.Y())),
|
| + offset_in_background.Y());
|
| } else if (background_repeat_y == kSpaceFill &&
|
| TileSize().Height() > LayoutUnit()) {
|
| LayoutUnit space = GetSpaceBetweenImageTiles(positioning_area_size.Height(),
|
|
|