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

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: Rebaselined tests again. Created 3 years, 9 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
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 d9c2b1bb690abca582abc5959f5f951b040da350..78701255ca35a84976bddeb855667cabdfc3285c 100644
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
@@ -520,7 +520,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();
@@ -553,7 +553,8 @@ void BackgroundImageGeometry::calculate(
}
fillTileSize.setWidth(roundedWidth);
- setTileSize(applySubPixelHeuristicToImageSize(fillTileSize, m_destRect));
+ setTileSize(
+ applySubPixelHeuristicToImageSize(fillTileSize, positioningArea));
setPhaseX(tileSize().width()
? LayoutUnit(roundf(
tileSize().width() -
@@ -579,7 +580,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/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698