| Index: third_party/WebKit/Source/core/paint/ImagePainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/ImagePainter.cpp b/third_party/WebKit/Source/core/paint/ImagePainter.cpp
|
| index 8a94b3c108c128b85f556f2745cfddacba8a92be..2febc6cd9c59f7fff11452e5cc5c3c1c0e5c1228 100644
|
| --- a/third_party/WebKit/Source/core/paint/ImagePainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/ImagePainter.cpp
|
| @@ -11,6 +11,7 @@
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/html/HTMLAreaElement.h"
|
| #include "core/html/HTMLImageElement.h"
|
| +#include "core/html/parser/HTMLParserIdioms.h"
|
| #include "core/layout/LayoutImage.h"
|
| #include "core/layout/LayoutReplaced.h"
|
| #include "core/layout/TextRunConstructor.h"
|
| @@ -21,6 +22,7 @@
|
| #include "platform/geometry/LayoutPoint.h"
|
| #include "platform/graphics/Path.h"
|
| #include "platform/graphics/paint/ClipRecorder.h"
|
| +#include "platform/weborigin/KURL.h"
|
|
|
| namespace blink {
|
|
|
| @@ -128,7 +130,15 @@ void ImagePainter::paintIntoRect(GraphicsContext* context, const LayoutRect& rec
|
| if (alignedRect.width() <= 0 || alignedRect.height() <= 0)
|
| return;
|
|
|
| - RefPtr<Image> image = m_layoutImage.imageResource()->image(alignedRect.width(), alignedRect.height());
|
| + KURL url;
|
| + Node* node = m_layoutImage.node();
|
| + if (node && node->isElementNode()) {
|
| + AtomicString urlString = toElement(node)->imageSourceURL();
|
| + if (!urlString.isEmpty())
|
| + url = node->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
|
| + }
|
| +
|
| + RefPtr<Image> image = m_layoutImage.imageResource()->image(alignedRect.size(), m_layoutImage.style()->effectiveZoom(), url);
|
| if (!image || image->isNull())
|
| return;
|
|
|
|
|