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

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

Issue 1704493002: Use Image::updateConcreteSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-image-updateconcretesize
Patch Set: Move test here from dependency CL. Created 4 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
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 5de58bf6baff7f948809727fb61ab65e331606cb..c55f8bb9591543fd341902a315f9c6253855e83c 100644
--- a/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
+++ b/third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp
@@ -53,7 +53,11 @@ LayoutSize calculateFillTileSize(const LayoutBoxModelObject& obj, const FillLaye
StyleImage* image = fillLayer.image();
EFillSizeType type = fillLayer.size().type;
- LayoutSize imageIntrinsicSize = obj.calculateImageIntrinsicDimensions(image, positioningAreaSize, LayoutBoxModelObject::ScaleByEffectiveZoom);
+ LayoutSize defaultObjectSize(positioningAreaSize);
+ defaultObjectSize.scale(1 / obj.style()->effectiveZoom());
+ image->updateConcreteObjectSize(defaultObjectSize);
+
+ LayoutSize imageIntrinsicSize = image->imageSize(&obj, obj.style()->effectiveZoom());
imageIntrinsicSize.scale(1 / image->imageScaleFactor(), 1 / image->imageScaleFactor());
switch (type) {
case SizeLength: {

Powered by Google App Engine
This is Rietveld 408576698