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

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

Issue 1812893002: Fix the check for divide-by-zero in background image tiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/background-repeat-space-zero-tile-size-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 d403ec761ee292d5ddeb428a020ef3dc56d9a926..3015c25d4a19634db0f35c657bfe56596642acc8 100644
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
@@ -301,7 +301,7 @@ void BackgroundImageGeometry::calculate(const LayoutBoxModelObject& obj, const L
setPhaseX(tileSize().width() ? LayoutUnit(tileSize().width() - fmodf((xOffset + left), tileSize().width()))
: LayoutUnit());
setSpaceSize(LayoutSize());
- } else if (backgroundRepeatX == SpaceFill && fillTileSize.width() > LayoutUnit()) {
+ } else if (backgroundRepeatX == SpaceFill && tileSize().width() > LayoutUnit()) {
LayoutUnit space = getSpaceBetweenImageTiles(positioningAreaSize.width(), tileSize().width());
LayoutUnit actualWidth = tileSize().width() + space;
@@ -324,7 +324,7 @@ void BackgroundImageGeometry::calculate(const LayoutBoxModelObject& obj, const L
setPhaseY(tileSize().height() ? LayoutUnit(tileSize().height() - fmodf((yOffset + top), tileSize().height()))
: LayoutUnit());
setSpaceSize(LayoutSize(spaceSize().width(), LayoutUnit()));
- } else if (backgroundRepeatY == SpaceFill && fillTileSize.height() > LayoutUnit()) {
+ } else if (backgroundRepeatY == SpaceFill && tileSize().height() > LayoutUnit()) {
LayoutUnit space = getSpaceBetweenImageTiles(positioningAreaSize.height(), tileSize().height());
LayoutUnit actualHeight = tileSize().height() + space;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/backgrounds/background-repeat-space-zero-tile-size-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698