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

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

Issue 1367193003: NOT FOR LANDING Allocate SVGImageForContainer on demand (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some NeedsRebaseline and revived some LayoutListMarker code that turned out to be important Created 5 years, 2 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/NinePieceImagePainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp b/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
index c72e025e71b6011abc6bfd8bf04bb923ded1f844..af21e1affac7836cc3da613d698ce18278787dc1 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
@@ -11,6 +11,7 @@
#include "core/paint/NinePieceImageGrid.h"
#include "core/style/ComputedStyle.h"
#include "core/style/NinePieceImage.h"
+#include "core/svg/graphics/SVGImageForContainer.h"
#include "platform/geometry/IntSize.h"
#include "platform/geometry/LayoutRect.h"
#include "platform/graphics/GraphicsContext.h"
@@ -44,14 +45,11 @@ bool NinePieceImagePainter::paint(GraphicsContext* graphicsContext, const Layout
IntSize imageSize = m_layoutObject.calculateImageIntrinsicDimensions(styleImage, borderImageRect.size(),
LayoutBoxModelObject::DoNotScaleByEffectiveZoom);
- // If both values are 'auto' then the intrinsic width and/or height of the image should be used, if any.
- styleImage->setContainerSizeForLayoutObject(&m_layoutObject, imageSize, style.effectiveZoom());
-
IntRectOutsets borderWidths(style.borderTopWidth(), style.borderRightWidth(),
style.borderBottomWidth(), style.borderLeftWidth());
NinePieceImageGrid grid(ninePieceImage, imageSize, borderImageRect, borderWidths);
- RefPtr<Image> image = styleImage->image(&m_layoutObject, imageSize);
+ RefPtr<Image> image = styleImage->image(&m_layoutObject, imageSize, style.effectiveZoom(), styleImage->url());
InterpolationQuality interpolationQuality = BoxPainter::chooseInterpolationQuality(m_layoutObject,
graphicsContext, image.get(), 0, rectWithOutsets.size());
« no previous file with comments | « third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698