Chromium Code Reviews| 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 ae94760df80dc15558cfd47ca4327036312ba7e1..9d7990d5b179b32f8012339968a71f0f3c290190 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
| @@ -630,6 +630,15 @@ FloatSize HTMLImageElement::elementSize() const |
| return FloatSize(image->imageSizeForLayoutObject(layoutObject(), 1.0f)); |
| } |
| +IntSize HTMLImageElement::bitmapSourceSize() const |
| +{ |
| + ImageResource* image = cachedImage(); |
| + if (!image) |
| + return IntSize(); |
| + LayoutSize lSize = image->imageSizeForLayoutObject(layoutObject(), 1.0f); |
|
Justin Novosad
2015/11/24 17:03:13
This should not depend on layout. We want access t
davve
2015/11/24 19:51:30
ImageResource::imageSizeForLayoutObject() doesn't
Justin Novosad
2015/11/24 20:14:58
Ah, that CL is a great readability improvement. X
xidachen
2015/11/25 17:01:54
Done.
|
| + return IntSize(lSize.width(), lSize.height()); |
| +} |
| + |
| FloatSize HTMLImageElement::defaultDestinationSize() const |
| { |
| ImageResource* image = cachedImage(); |