Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2016 01:03:48 +0000 (01:03 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2016 01:03:48 +0000 (01:03 +0000)
commit4bf10eaf4953c609149da218a5c5a6c8321d4810
tree3645efb30fde96487bdb97445f71afd79eee6bb9
parent894a2e18cc6474cd3a8e7ebc541d606a6fd492b5
Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and drawImage
https://bugs.webkit.org/show_bug.cgi?id=165086

Reviewed by Darin Adler.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
Add overloads of size for each type of CanvasSource.
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::createPattern):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:
Use variants to reduce code duplication and match spec language in drawImage and createPattern.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl