ImageBitmap API stubs
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2017 16:51:47 +0000 (16:51 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2017 16:51:47 +0000 (16:51 +0000)
commitc035b3c7df5ea55194448ea7a7a0fe98a73c8f3a
treec9c498d0b14d37b47a75ad679fc5b48f023ff441
parent5ecfd946926225e2ebad8c7619a317a4cad39d6f
ImageBitmap API stubs
https://bugs.webkit.org/show_bug.cgi?id=177984
<rdar://problem/34848023>

Patch by Sam and Dean.
Reviewed by Dean and Sam.

Source/WebCore:

Add the IDL for ImageBitmap and ImageBitmapOptions, plus some
stub implementations (complete with all the algorithms from
the HTML specification as comments).

* CMakeLists.txt: Add the new files.
* DerivedSources.make: Create the JS bindings for ImageBitmap and ImageBitmapOptions.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/CallTracerTypes.h:
* html/ImageBitmap.cpp: Added.
(WebCore::ImageBitmap::create):
(WebCore::ImageBitmap::createPromise):
(WebCore::ImageBitmap::ImageBitmap):
(WebCore::ImageBitmap::~ImageBitmap):
(WebCore::ImageBitmap::width const):
(WebCore::ImageBitmap::height const):
(WebCore::ImageBitmap::close):
* html/ImageBitmap.h: Added.
(WebCore::ImageBitmap::isDetached const):
* html/ImageBitmap.idl: Copied from Source/WebCore/html/canvas/CanvasDrawImage.idl.
* html/ImageBitmapOptions.h: Copied from Source/WebCore/html/canvas/CanvasDrawImage.idl.
* html/ImageBitmapOptions.idl: Copied from Source/WebCore/html/canvas/CanvasDrawImage.idl.
* html/canvas/CanvasDrawImage.idl:
* html/canvas/CanvasFillStrokeStyles.idl:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::createPattern):
* html/canvas/CanvasRenderingContext2D.h:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::indexForData):
(WebCore::InspectorCanvas::buildAction):
(WebCore::InspectorCanvas::buildArrayForImageBitmap):
* inspector/InspectorCanvas.h:
* inspector/RecordingSwizzleTypes.h:

LayoutTests:

New global constructors, so go through the pain of updating all
the platform results :(

* js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-elcapitan-wk2/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-sierra-wk2/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-sierra/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk2/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
* platform/wpe/js/dom/global-constructors-attributes-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
LayoutTests/ChangeLog
LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-elcapitan-wk2/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-sierra-wk1/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-sierra/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/wpe/js/dom/global-constructors-attributes-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/CallTracerTypes.h
Source/WebCore/html/ImageBitmap.cpp [new file with mode: 0644]
Source/WebCore/html/ImageBitmap.h [new file with mode: 0644]
Source/WebCore/html/ImageBitmap.idl [new file with mode: 0644]
Source/WebCore/html/ImageBitmapOptions.h [new file with mode: 0644]
Source/WebCore/html/ImageBitmapOptions.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasDrawImage.idl
Source/WebCore/html/canvas/CanvasFillStrokeStyles.idl
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/inspector/InspectorCanvas.cpp
Source/WebCore/inspector/InspectorCanvas.h
Source/WebCore/inspector/RecordingSwizzleTypes.h