Index: third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp |
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp |
index 3f6a5c0ba3b60ddc465ce67fd99193080fca459a..8fb112804c0a2abd7e6cab6bae5895852883463d 100644 |
--- a/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp |
+++ b/third_party/WebKit/Source/core/css/cssom/CSSStyleImageValue.cpp |
@@ -6,7 +6,7 @@ |
namespace blink { |
-double CSSStyleImageValue::intrinsicWidth(bool& isNull) |
+double CSSStyleImageValue::intrinsicWidth(bool& isNull) const |
{ |
isNull = isCachePending(); |
if (isNull) |
@@ -14,7 +14,7 @@ double CSSStyleImageValue::intrinsicWidth(bool& isNull) |
return imageLayoutSize().width().toDouble(); |
} |
-double CSSStyleImageValue::intrinsicHeight(bool& isNull) |
+double CSSStyleImageValue::intrinsicHeight(bool& isNull) const |
{ |
isNull = isCachePending(); |
if (isNull) |
@@ -35,4 +35,30 @@ double CSSStyleImageValue::intrinsicRatio(bool& isNull) |
return intrinsicWidth(isNull) / intrinsicHeight(isNull); |
} |
+FloatSize CSSStyleImageValue::elementSize(const FloatSize& defaultObjectSize) const |
+{ |
+ bool notUsed; |
+ return FloatSize(intrinsicWidth(notUsed), intrinsicHeight(notUsed)); |
+} |
+ |
+int CSSStyleImageValue::sourceHeight() |
+{ |
+ bool notUsed; |
+ return intrinsicHeight(notUsed); |
+} |
+ |
+int CSSStyleImageValue::sourceWidth() |
+{ |
+ bool notUsed; |
+ return intrinsicWidth(notUsed); |
+} |
+ |
+PassRefPtr<Image> CSSStyleImageValue::getSourceImageForCanvas(SourceImageStatus* status, AccelerationHint, SnapshotReason, |
ikilpatrick
2016/09/27 18:06:00
would it be better to change this method to accept
Gleb Lanbin
2016/09/27 19:37:18
probably, but this method is not defined here. It'
|
+ const FloatSize&) const |
+{ |
+ if (isCachePending()) |
+ return nullptr; |
+ return m_imageValue->cachedImage()->cachedImage()->getImage()->imageForDefaultFrame(); |
Justin Novosad
2016/09/28 15:41:58
Confident you don't need any nullptr checks anywhe
Gleb Lanbin
2016/09/28 16:58:22
Done.
|
+} |
+ |
} // namespace blink |