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

Unified Diff: third_party/WebKit/Source/core/html/HTMLImageElement.cpp

Issue 1455763002: Use union type in ImageBitmapFactories.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix errors Created 5 years, 1 month 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/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();

Powered by Google App Engine
This is Rietveld 408576698