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

Unified Diff: third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp

Issue 2689993003: Account for borders and padding when calculating background tile size. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/background-tiling-sub-pixel-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b99d4c261c8fb26ceab93ca07985b2e888b63a83..8805210bc5144a2758e1c5536eef57f5a2f3b141 100644
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
@@ -528,7 +528,7 @@ void BackgroundImageGeometry::calculate(
// It's necessary to apply the heuristic here prior to any further
// calculations to avoid incorrectly using sub-pixel values that won't be
// present in the painted tile.
- setTileSize(applySubPixelHeuristicToImageSize(fillTileSize, m_destRect));
+ setTileSize(applySubPixelHeuristicToImageSize(fillTileSize, positioningArea));
EFillRepeat backgroundRepeatX = fillLayer.repeatX();
EFillRepeat backgroundRepeatY = fillLayer.repeatY();
@@ -559,7 +559,8 @@ void BackgroundImageGeometry::calculate(
}
fillTileSize.setWidth(roundedWidth);
- setTileSize(applySubPixelHeuristicToImageSize(fillTileSize, m_destRect));
+ setTileSize(
+ applySubPixelHeuristicToImageSize(fillTileSize, positioningArea));
setPhaseX(tileSize().width()
? LayoutUnit(roundf(
tileSize().width() -
@@ -585,7 +586,8 @@ void BackgroundImageGeometry::calculate(
}
fillTileSize.setHeight(roundedHeight);
- setTileSize(applySubPixelHeuristicToImageSize(fillTileSize, m_destRect));
+ setTileSize(
+ applySubPixelHeuristicToImageSize(fillTileSize, positioningArea));
setPhaseY(tileSize().height()
? LayoutUnit(roundf(
tileSize().height() -
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/background-tiling-sub-pixel-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698