| 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 ae623aa5b06f2528997fc5596fae464094d7f11b..df90cfc039467bb72bf03e177e01fefd06e07805 100644
 | 
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
 | 
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
 | 
| @@ -439,7 +439,7 @@ int HTMLImageElement::width()
 | 
|  
 | 
|          // if the image is available, use its width
 | 
|          if (imageLoader().image())
 | 
| -            return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1.0f).width();
 | 
| +            return imageLoader().image()->defaultConcreteObjectSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1.0f).width();
 | 
|      }
 | 
|  
 | 
|      LayoutBox* box = layoutBox();
 | 
| @@ -460,7 +460,7 @@ int HTMLImageElement::height()
 | 
|  
 | 
|          // if the image is available, use its height
 | 
|          if (imageLoader().image())
 | 
| -            return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1.0f).height();
 | 
| +            return imageLoader().image()->defaultConcreteObjectSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1.0f).height();
 | 
|      }
 | 
|  
 | 
|      LayoutBox* box = layoutBox();
 | 
| @@ -472,7 +472,7 @@ int HTMLImageElement::naturalWidth() const
 | 
|      if (!imageLoader().image())
 | 
|          return 0;
 | 
|  
 | 
| -    return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).width();
 | 
| +    return imageLoader().image()->defaultConcreteObjectSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).width();
 | 
|  }
 | 
|  
 | 
|  int HTMLImageElement::naturalHeight() const
 | 
| @@ -480,7 +480,7 @@ int HTMLImageElement::naturalHeight() const
 | 
|      if (!imageLoader().image())
 | 
|          return 0;
 | 
|  
 | 
| -    return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).height();
 | 
| +    return imageLoader().image()->defaultConcreteObjectSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).height();
 | 
|  }
 | 
|  
 | 
|  const String& HTMLImageElement::currentSrc() const
 | 
| @@ -489,7 +489,7 @@ const String& HTMLImageElement::currentSrc() const
 | 
|      // The currentSrc IDL attribute must return the img element's current request's current URL.
 | 
|      // Initially, the pending request turns into current request when it is either available or broken.
 | 
|      // We use the image's dimensions as a proxy to it being in any of these states.
 | 
| -    if (!imageLoader().image() || !imageLoader().image()->image() || !imageLoader().image()->image()->width())
 | 
| +    if (!imageLoader().image() || !imageLoader().image()->image() || !imageLoader().image()->image()->defaultConcreteObjectSizeWidth())
 | 
|          return emptyAtom;
 | 
|  
 | 
|      return imageLoader().image()->url().string();
 | 
| @@ -618,7 +618,7 @@ PassRefPtr<Image> HTMLImageElement::getSourceImageForCanvas(SourceImageStatus* s
 | 
|      RefPtr<Image> sourceImage;
 | 
|      if (cachedImage()->image()->isSVGImage()) {
 | 
|          sourceImage = SVGImageForContainer::create(toSVGImage(cachedImage()->image()),
 | 
| -            cachedImage()->image()->size(), 1, document().completeURL(imageSourceURL()));
 | 
| +            cachedImage()->image()->defaultConcreteObjectSize(), 1, document().completeURL(imageSourceURL()));
 | 
|      } else {
 | 
|          sourceImage = cachedImage()->image();
 | 
|      }
 | 
| @@ -640,22 +640,22 @@ bool HTMLImageElement::wouldTaintOrigin(SecurityOrigin* destinationSecurityOrigi
 | 
|      return !image->isAccessAllowed(destinationSecurityOrigin);
 | 
|  }
 | 
|  
 | 
| -FloatSize HTMLImageElement::elementSize() const
 | 
| +FloatSize HTMLImageElement::elementSize(const FloatSize& defaultObjectSize) const
 | 
|  {
 | 
|      ImageResource* image = cachedImage();
 | 
|      if (!image)
 | 
|          return FloatSize();
 | 
|  
 | 
| -    return FloatSize(image->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f));
 | 
| +    return FloatSize(image->concreteObjectSize(defaultObjectSize, LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f));
 | 
|  }
 | 
|  
 | 
| -FloatSize HTMLImageElement::defaultDestinationSize() const
 | 
| +FloatSize HTMLImageElement::defaultDestinationSize(const FloatSize& defaultObjectSize) const
 | 
|  {
 | 
|      ImageResource* image = cachedImage();
 | 
|      if (!image)
 | 
|          return FloatSize();
 | 
|      LayoutSize size;
 | 
| -    size = image->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f);
 | 
| +    size = image->concreteObjectSize(defaultObjectSize, LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f);
 | 
|      if (layoutObject() && layoutObject()->isLayoutImage() && image->image() && !image->image()->hasRelativeSize())
 | 
|          size.scale(toLayoutImage(layoutObject())->imageDevicePixelRatio());
 | 
|      return FloatSize(size);
 | 
| @@ -813,7 +813,7 @@ IntSize HTMLImageElement::bitmapSourceSize() const
 | 
|      ImageResource* image = cachedImage();
 | 
|      if (!image)
 | 
|          return IntSize();
 | 
| -    LayoutSize lSize = image->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f);
 | 
| +    LayoutSize lSize = image->defaultConcreteObjectSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f);
 | 
|      ASSERT(lSize.fraction().isZero());
 | 
|      return IntSize(lSize.width(), lSize.height());
 | 
|  }
 | 
| 
 |