Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
index fdcfd12a44b4b55eb6ac77b05aa4155e49ea5428..ecb58ef86d6ff9e10daf234b3bf0629acaec1f4a 100644 |
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
@@ -1267,6 +1267,7 @@ static inline CanvasImageSource* toImageSourceInternal(const CanvasImageSourceUn |
void CanvasRenderingContext2D::drawImage(const CanvasImageSourceUnion& imageSource, double x, double y, ExceptionState& exceptionState) |
{ |
CanvasImageSource* imageSourceInternal = toImageSourceInternal(imageSource); |
+ imageSourceInternal->updateConcreteObjectSize(FloatSize(canvas()->width(), canvas()->height())); |
Justin Novosad
2016/02/23 15:53:04
I did some spec analysis on this.
The spec for dra
davve
2016/02/23 18:40:31
The contain constraint is actually not added yet,
|
FloatSize sourceRectSize = imageSourceInternal->elementSize(); |
FloatSize destRectSize = imageSourceInternal->defaultDestinationSize(); |
drawImage(imageSourceInternal, 0, 0, sourceRectSize.width(), sourceRectSize.height(), x, y, destRectSize.width(), destRectSize.height(), exceptionState); |
@@ -1276,6 +1277,7 @@ void CanvasRenderingContext2D::drawImage(const CanvasImageSourceUnion& imageSour |
double x, double y, double width, double height, ExceptionState& exceptionState) |
{ |
CanvasImageSource* imageSourceInternal = toImageSourceInternal(imageSource); |
+ imageSourceInternal->updateConcreteObjectSize(FloatSize(canvas()->width(), canvas()->height())); |
Justin Novosad
2016/02/23 15:53:04
In this case, the change also seem to comply with
davve
2016/02/23 18:40:31
As I said above, this patch is mostly plumbing and
|
FloatSize sourceRectSize = imageSourceInternal->elementSize(); |
drawImage(imageSourceInternal, 0, 0, sourceRectSize.width(), sourceRectSize.height(), x, y, width, height, exceptionState); |
} |