| Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| index 01fc2ac62b9849ede2e4d98b0d73447fdedc8672..c8345450b69bf1bea37d00f6a76e608314ea8570 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
|
| @@ -33,7 +33,7 @@
|
| #include "core/dom/Attribute.h"
|
| #include "core/dom/NodeTraversal.h"
|
| #include "core/dom/shadow/ShadowRoot.h"
|
| -#include "core/fetch/ImageResource.h"
|
| +#include "core/fetch/ImageResourceContent.h"
|
| #include "core/frame/Deprecation.h"
|
| #include "core/frame/ImageBitmap.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| @@ -367,9 +367,9 @@ void HTMLImageElement::attachLayoutTree(const AttachContext& context) {
|
| if (m_isFallbackImage) {
|
| float deviceScaleFactor = blink::deviceScaleFactor(layoutImage->frame());
|
| std::pair<Image*, float> brokenImageAndImageScaleFactor =
|
| - ImageResource::brokenImage(deviceScaleFactor);
|
| - ImageResource* newImageResource =
|
| - ImageResource::create(brokenImageAndImageScaleFactor.first);
|
| + ImageResourceContent::brokenImage(deviceScaleFactor);
|
| + ImageResourceContent* newImageResource =
|
| + ImageResourceContent::create(brokenImageAndImageScaleFactor.first);
|
| layoutImage->imageResource()->setImageResource(newImageResource);
|
| }
|
| if (layoutImageResource->hasImage())
|
| @@ -488,7 +488,7 @@ unsigned HTMLImageElement::naturalWidth() const {
|
| .image()
|
| ->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()),
|
| m_imageDevicePixelRatio,
|
| - ImageResource::IntrinsicCorrectedToDPR)
|
| + ImageResourceContent::IntrinsicCorrectedToDPR)
|
| .width()
|
| .toUnsigned();
|
| }
|
| @@ -501,7 +501,7 @@ unsigned HTMLImageElement::naturalHeight() const {
|
| .image()
|
| ->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()),
|
| m_imageDevicePixelRatio,
|
| - ImageResource::IntrinsicCorrectedToDPR)
|
| + ImageResourceContent::IntrinsicCorrectedToDPR)
|
| .height()
|
| .toUnsigned();
|
| }
|
| @@ -655,7 +655,7 @@ bool HTMLImageElement::isSVGSource() const {
|
|
|
| bool HTMLImageElement::wouldTaintOrigin(
|
| SecurityOrigin* destinationSecurityOrigin) const {
|
| - ImageResource* image = cachedImage();
|
| + ImageResourceContent* image = cachedImage();
|
| if (!image)
|
| return false;
|
| return !image->isAccessAllowed(destinationSecurityOrigin);
|
| @@ -663,7 +663,7 @@ bool HTMLImageElement::wouldTaintOrigin(
|
|
|
| FloatSize HTMLImageElement::elementSize(
|
| const FloatSize& defaultObjectSize) const {
|
| - ImageResource* image = cachedImage();
|
| + ImageResourceContent* image = cachedImage();
|
| if (!image)
|
| return FloatSize();
|
|
|
| @@ -677,7 +677,7 @@ FloatSize HTMLImageElement::elementSize(
|
|
|
| FloatSize HTMLImageElement::defaultDestinationSize(
|
| const FloatSize& defaultObjectSize) const {
|
| - ImageResource* image = cachedImage();
|
| + ImageResourceContent* image = cachedImage();
|
| if (!image)
|
| return FloatSize();
|
|
|
| @@ -788,7 +788,7 @@ void HTMLImageElement::selectSourceURL(
|
|
|
| // Icky special case for deferred images:
|
| // A deferred image is not loading, does have pending activity, does not
|
| - // have an error, but it does have an ImageResource associated
|
| + // have an error, but it does have an ImageResourceContent associated
|
| // with it, so imageHasLoaded will be true even though the image hasn't
|
| // actually loaded. Fixing the definition of imageHasLoaded isn't
|
| // sufficient, because a deferred image does have pending activity, does not
|
| @@ -796,8 +796,8 @@ void HTMLImageElement::selectSourceURL(
|
| // was correct, imageStillLoading would become wrong.
|
| //
|
| // Instead of dealing with that, there's a separate check that the
|
| - // ImageResource has non-null image data associated with it, which isn't
|
| - // folded into imageHasLoaded above.
|
| + // ImageResourceContent has non-null image data associated with it, which
|
| + // isn't folded into imageHasLoaded above.
|
| if ((imageHasLoaded && imageHasImage) || imageStillLoading || imageIsDocument)
|
| ensurePrimaryContent();
|
| else
|
| @@ -882,7 +882,7 @@ int HTMLImageElement::sourceHeight() {
|
| }
|
|
|
| IntSize HTMLImageElement::bitmapSourceSize() const {
|
| - ImageResource* image = cachedImage();
|
| + ImageResourceContent* image = cachedImage();
|
| if (!image)
|
| return IntSize();
|
| LayoutSize lSize = image->imageSize(
|
|
|