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

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

Issue 1756763004: Merge image sizing algorithms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unused variable 'styleImage' in release 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
Index: third_party/WebKit/Source/core/paint/BoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
index 94500cd32791286854d2637b0012c55a70e1026d..d1d135e1fe64a9a7f238f47947e8341b4cb16388 100644
--- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -136,9 +136,11 @@ void BoxPainter::paintBackground(const PaintInfo& paintInfo, const LayoutRect& p
bool BoxPainter::isFillLayerOpaque(const FillLayer& layer, const LayoutObject& imageClient)
{
+ // The default object size passed down to imageSize is empty with the implication that images
+ // with no intrinsic size are treated as empty.
return layer.hasOpaqueImage(&imageClient)
&& layer.image()->canRender()
- && !layer.image()->imageSize(&imageClient, imageClient.style()->effectiveZoom()).isEmpty()
+ && !layer.image()->imageSize(&imageClient, imageClient.style()->effectiveZoom(), LayoutSize()).isEmpty()
&& layer.hasRepeatXY();
}

Powered by Google App Engine
This is Rietveld 408576698