haikuwebkit/Source/WebCore/html/canvas/OffscreenCanvasRenderingCon...

61 lines
2.8 KiB
Plaintext
Raw Permalink Normal View History

Add CanvasRenderingContext2DBase class and OffscreenCanvasRenderingContext2D https://bugs.webkit.org/show_bug.cgi?id=180718 <rdar://problem/36004015> Reviewed by Sam Weinig. Add an OffscreenCanvasRenderingContext2D class, and in the process create a shared base class for it and CanvasRenderingContext2D, called CanvasRenderingContext2DBase. The base class has nearly all the functionality, with the exception of the text and focus rendering APIs, which are only exposed on CanvasRenderingContext2D. At the moment CanvasRenderingContext2DBase's implementation still expects the attached canvas to be an HTMLCanvasElement, but that's ok since you can't yet create an OffscreenCanvasRenderingContext2D. A subsequent patch will do the right thing. No change in functionality at the moment, so covered by the existing tests. * DerivedSources.make: Add the new IDL file. * Sources.txt: Add all the new files to compile. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Removed some unnecessary headers, and added JSC:: where appropriate. (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp: Copied from Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp. (WebCore::root): New root function that just returns the address of the OffscreenCanvas. (WebCore::JSOffscreenCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSOffscreenCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSWorkerNavigatorCustom.cpp: Add JSC:: to fix a compilation error. (WebCore::JSWorkerNavigator::visitAdditionalChildren): * bindings/js/WebCoreBuiltinNames.h: New IDL types. * html/OffscreenCanvas.idl: Explicitly generates an IsReachable. * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::isOffscreen2d const): Helper for is<> trait. * html/canvas/CanvasRenderingContext2D.cpp: Nearly everything has been moved to the Base class. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp. * html/canvas/CanvasRenderingContext2DBase.h: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.h. * html/canvas/OffscreenCanvasRenderingContext2D.cpp: Added. Basic implementation that just uses the Base class. (WebCore::OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D): * html/canvas/OffscreenCanvasRenderingContext2D.h: Added. * html/canvas/OffscreenCanvasRenderingContext2D.idl: Added. Canonical link: https://commits.webkit.org/196630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 23:35:51 +00:00
/*
* Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
[
CustomIsReachable,
Put OffscreenCanvas behind a build flag https://bugs.webkit.org/show_bug.cgi?id=203146 Patch by Chris Lord <clord@igalia.com> on 2019-10-26 Reviewed by Ryosuke Niwa. .: Put OffscreenCanvas behind a build flag and enable building with experimental features on GTK and WPE. * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/WebKitFeatures.cmake: LayoutTests/imported/w3c: OffscreenCanvas is disabled by default, adjust expectations accordingly. * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt: * web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt: * web-platform-tests/html/dom/idlharness.https-expected.txt: * web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt: PerformanceTests: * StitchMarker/wtf/FeatureDefines.h: Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: No new tests. No behavior changes. * Configurations/FeatureDefines.xcconfig: * bindings/js/JSEventTargetCustom.cpp: * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp: * dom/EventTargetFactory.in: * html/ImageBitmap.idl: * html/OffscreenCanvas.cpp: * html/OffscreenCanvas.h: * html/OffscreenCanvas.idl: * html/canvas/CanvasRenderingContext.cpp: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/OffscreenCanvasRenderingContext2D.cpp: * html/canvas/OffscreenCanvasRenderingContext2D.h: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::canvas): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLRenderingContextBase.idl: * inspector/agents/InspectorCanvasAgent.cpp: * page/PageConsoleClient.cpp: (WebCore::canvasRenderingContext): * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setImageBitmapEnabled): (WebCore::RuntimeEnabledFeatures::imageBitmapEnabled const): (WebCore::RuntimeEnabledFeatures::setOffscreenCanvasEnabled): (WebCore::RuntimeEnabledFeatures::offscreenCanvasEnabled const): * page/WindowOrWorkerGlobalScope.idl: Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: Split the ImageBitmapOffscreenCanvas setting into two separate settings so OffscreenCanvas can be disabled at build time. * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferences.yaml: * Shared/WebPreferencesDefaultValues.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/WebPage/WebInspectorUI.cpp: (WebKit::WebInspectorUI::WebInspectorUI): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Source/WTF: * wtf/FeatureDefines.h: Tools: Put OffscreenCanvas behind a build flag and enable the runtime setting when running tests on platforms where it's built (GTK and WPE). * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setOffscreenCanvasEnabled): * WebKitTestRunner/InjectedBundle/TestRunner.h: Websites/webkit.org: Update to reflect split ImageBitmapOffscreenCanvas settings. * experimental-features.html: LayoutTests: OffscreenCanvas is disabled by default except on GTK/WPE. Adjust test expectations accordingly. * TestExpectations: * platform/gtk/TestExpectations: * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt. * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt. * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt. * platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt: Renamed from LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt. * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt. * platform/gtk/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt. * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/ios/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/wpe/TestExpectations: * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt. * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt. * platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt: Renamed from LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt. * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt. * platform/wpe/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt. Canonical link: https://commits.webkit.org/216857@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-26 07:12:47 +00:00
EnabledAtRuntime=OffscreenCanvas,
Conditional=OFFSCREEN_CANVAS,
ConditionalForWorker=OFFSCREEN_CANVAS_IN_WORKERS,
Allow conditionally enabling OffscreenCanvas only for non-worker contexts https://bugs.webkit.org/show_bug.cgi?id=225845 Reviewed by Darin Adler. .: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/WebKitFeatures.cmake: Match current behavior of ENABLE_OFFSCREEN_CANVAS for ENABLE_OFFSCREEN_CANVAS_IN_WORKERS. Source/WebCore: Enable both compile time and runtime conditional enablement of just the non-worker OffscreenCanvas code path. To make this work a new IDL extended attribute was needed, ConditionalForWorker=FOO, which allows specifying an additional macro to check for whether the constructor should be exposed on workers. Ideally this would be generic for any context type, but at the moment, the limited syntax of extended attributes makes that hard. If generalization is needed (or a similar syntax is needed for something else) this can be revisited. To support runtime conditional exposure, the existing EnabledForContext, which calls a static function on the implementation class passing the ScriptExecutationContext is used. If conditional per context type ever becomes a common thing, we should add another extended attribute (and add syntax to support like above) that allows specifying both the context type and the setting name. Other than that, uses of ENABLE_OFFSCREEN_CANVAS that guarded worker specific functionality were replaced by ENABLE_OFFSCREEN_CANVAS_IN_WORKERS. * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::serialize): (WebCore::CloneSerializer::CloneSerializer): (WebCore::CloneSerializer::dumpIfTerminal): (WebCore::CloneDeserializer::deserialize): (WebCore::CloneDeserializer::CloneDeserializer): (WebCore::CloneDeserializer::readTerminal): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::computeMemoryCost const): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::deserialize): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/scripts/IDLAttributes.json: * bindings/scripts/preprocess-idls.pl: (GenerateConstructorAttributes): * html/HTMLCanvasElement.idl: * html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::enabledForContext): * html/OffscreenCanvas.h: * html/OffscreenCanvas.idl: * html/canvas/OffscreenCanvasRenderingContext2D.cpp: (WebCore::OffscreenCanvasRenderingContext2D::enabledForContext): * html/canvas/OffscreenCanvasRenderingContext2D.h: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setOffscreenCanvasInWorkersEnabled): (WebCore::RuntimeEnabledFeatures::offscreenCanvasInWorkersEnabled const): * workers/DedicatedWorkerGlobalScope.h: * workers/DedicatedWorkerGlobalScope.idl: * workers/WorkerAnimationController.cpp: * workers/WorkerAnimationController.h: Source/WTF: * Scripts/Preferences/WebPreferencesInternal.yaml: Add new OffscreenCanvasInWorkersEnabled preference. * wtf/PlatformEnable.h: Add new ENABLE_OFFSCREEN_CANVAS_IN_WORKERS macro. Tools: * Scripts/webkitperl/FeatureList.pm: * WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): Match current behavior of ENABLE_OFFSCREEN_CANVAS and OffscreenCanvasEnabled for ENABLE_OFFSCREEN_CANVAS_IN_WORKERS and OffscreenCanvasInWorkersEnabled. Canonical link: https://commits.webkit.org/237788@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-16 03:14:57 +00:00
EnabledForContext,
Implement Canvas.transferControlToOffscreen and OffscreenCanvasRenderingContext2D.commit https://bugs.webkit.org/show_bug.cgi?id=202797 Reviewed by Dean Jackson. LayoutTests/imported/w3c: * web-platform-tests/html/canvas/offscreen/filter/offscreencanvas.filter.w-expected.txt: * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt: * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt: * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt: * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt: * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt: * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt: * web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt: Source/WebCore: Implement HTMLCanvasElement.transferControlToOffscreen and OffscreenCanvasRenderingContext2D.commit. This allows for (synchronous) display of asynchronously rendered OffscreenCanvas content. No new tests. Covered by existing tests. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::setHeight): (WebCore::HTMLCanvasElement::setWidth): (WebCore::HTMLCanvasElement::reset): (WebCore::HTMLCanvasElement::transferControlToOffscreen): (WebCore::HTMLCanvasElement::setImageBufferAndMarkDirty): (WebCore::HTMLCanvasElement::isControlledByOffscreen const): * html/HTMLCanvasElement.h: * html/HTMLCanvasElement.idl: * html/OffscreenCanvas.cpp: (WebCore::DetachedOffscreenCanvas::takePlaceholderCanvas): (WebCore::OffscreenCanvas::create): (WebCore::OffscreenCanvas::getContext): (WebCore::OffscreenCanvas::didDraw): (WebCore::OffscreenCanvas::detach): (WebCore::OffscreenCanvas::setPlaceholderCanvas): (WebCore::OffscreenCanvas::pushBufferToPlaceholder): (WebCore::OffscreenCanvas::commitToPlaceholderCanvas): (WebCore::OffscreenCanvas::scheduleCommitToPlaceholderCanvas): (WebCore::OffscreenCanvas::reset): * html/OffscreenCanvas.h: * html/canvas/OffscreenCanvasRenderingContext2D.cpp: (WebCore::OffscreenCanvasRenderingContext2D::commit): * html/canvas/OffscreenCanvasRenderingContext2D.h: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/PlaceholderRenderingContext.cpp: (WebCore::PlaceholderRenderingContext::canvas const): * html/canvas/PlaceholderRenderingContext.h: LayoutTests: * platform/glib/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt: Removed. Canonical link: https://commits.webkit.org/228186@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-12 09:05:54 +00:00
Exposed=(Window,Worker),
Add CanvasRenderingContext2DBase class and OffscreenCanvasRenderingContext2D https://bugs.webkit.org/show_bug.cgi?id=180718 <rdar://problem/36004015> Reviewed by Sam Weinig. Add an OffscreenCanvasRenderingContext2D class, and in the process create a shared base class for it and CanvasRenderingContext2D, called CanvasRenderingContext2DBase. The base class has nearly all the functionality, with the exception of the text and focus rendering APIs, which are only exposed on CanvasRenderingContext2D. At the moment CanvasRenderingContext2DBase's implementation still expects the attached canvas to be an HTMLCanvasElement, but that's ok since you can't yet create an OffscreenCanvasRenderingContext2D. A subsequent patch will do the right thing. No change in functionality at the moment, so covered by the existing tests. * DerivedSources.make: Add the new IDL file. * Sources.txt: Add all the new files to compile. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Removed some unnecessary headers, and added JSC:: where appropriate. (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp: Copied from Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp. (WebCore::root): New root function that just returns the address of the OffscreenCanvas. (WebCore::JSOffscreenCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSOffscreenCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSWorkerNavigatorCustom.cpp: Add JSC:: to fix a compilation error. (WebCore::JSWorkerNavigator::visitAdditionalChildren): * bindings/js/WebCoreBuiltinNames.h: New IDL types. * html/OffscreenCanvas.idl: Explicitly generates an IsReachable. * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::isOffscreen2d const): Helper for is<> trait. * html/canvas/CanvasRenderingContext2D.cpp: Nearly everything has been moved to the Base class. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp. * html/canvas/CanvasRenderingContext2DBase.h: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.h. * html/canvas/OffscreenCanvasRenderingContext2D.cpp: Added. Basic implementation that just uses the Base class. (WebCore::OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D): * html/canvas/OffscreenCanvasRenderingContext2D.h: Added. * html/canvas/OffscreenCanvasRenderingContext2D.idl: Added. Canonical link: https://commits.webkit.org/196630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 23:35:51 +00:00
JSGenerateToJSObject,
JSCustomMarkFunction,
Web Inspector: `RecordCanvasActionVariant` causes a huge symbol to be created in WebCore https://bugs.webkit.org/show_bug.cgi?id=222639 <rdar://problem/73728057> Reviewed by Tim Horton and Brian Burg. Source/JavaScriptCore: * inspector/protocol/Recording.json: Drive-by: Add info about `snapshot` to the `"description"` of `"actions"` in `"Frame"`. Source/WebCore: The only reason that `RecordCanvasActionVariant` exists is so that the generated IDL code can pass all arguments at once to the function defined by `CallTracingCallback`. Instead, change `CallTracingCallback` (which expects a `static` function on `CallTracer`) to be `CallTracer` (which expects a `class`) so that more than one function can be used in the generated IDL code (and so that not every usage has to be part of `CallTracer). These new functions are: - `processArgument`, which is used to convert the argument to a more generic type - `recordAction`, which is basically what `CallTracingCallback` used to be In the case of `InspectorCanvasCallTracer` (which is what `recordCanvasAction` used to be), `processArgument` converts to a `struct` of `JSON::Value` and `RecordingSwizzleType`, which used to happen way later in `InspectorCanvas::buildAction` (which is why there used to be `RecordCanvasActionVariant` as there was no other good way of handling all the various arguments of all the various functions). The only effect that this change has is that now the deduplicated `data` in the `Recording` payload might have a different order, as arguments are deduplicated before action names, but this shouldn't have any noticable effect as the Web Inspector frontend handles the "unpacking" of the deduplicated `data` in the same way (and the tests confirm it). * bindings/scripts/CodeGeneratorJS.pm: (GenerateAttributeGetterBodyDefinition): (GenerateAttributeSetterBodyDefinition): (GenerateImplementationFunctionCall): (GenerateCallTracer): * bindings/scripts/IDLAttributes.json: * bindings/scripts/test/TestCallTracer.idl: * bindings/scripts/test/JS/JSTestCallTracer.cpp: Replace `CallTracingCallback` with `CallTracer` * inspector/InspectorCanvasCallTracer.h: Added. (WebCore::InspectorCanvasCallTracer::recordAction): * inspector/InspectorCanvasCallTracer.cpp: Added. (WebCore::enabledCanvasAgent): (WebCore::InspectorCanvasCallTracer::recordAction): (WebCore::InspectorCanvasCallTracer::processArgument): * bindings/js/CallTracer.h: Removed. * bindings/js/CallTracer.cpp: Removed. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::recordCanvasAction): Deleted. (WebCore::InspectorInstrumentation::recordCanvasActionImpl): Deleted. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::recordCanvasActionImpl): Deleted. Rather than piping through `InspectorInstrumentation` (which would require adding `#include` for all the argument types in the `.h`), just pull out the `InspectorCanvasAgent` and use it locally here. * inspector/InspectorCanvas.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::canvasChanged): (WebCore::InspectorCanvas::resetRecordingData): (WebCore::InspectorCanvas::processArgument): (WebCore::InspectorCanvas::recordAction): (WebCore::InspectorCanvas::valueIndexForData): Added. (WebCore::InspectorCanvas::buildAction): * inspector/agents/InspectorCanvasAgent.h: * inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::startRecording): (WebCore::InspectorCanvasAgent::stopRecording): (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame): (WebCore::InspectorCanvasAgent::recordAction): Added. (WebCore::InspectorCanvasAgent::recordCanvasAction): Deleted. Create individual `processArgument` member function for each type used by the various canvas contexts instead of having one giant `WTF::switchOn` for `RecordCanvasActionVariant`. * html/HTMLCanvasElement.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContext.idl: Replace `CallTracingCallback=recordCanvasAction` with `CallTracer=InspectorCanvasCallTracer`. * html/CanvasBase.h: * html/CanvasBase.cpp: (WebCore::CanvasBase::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::CanvasBase::callTracingActive const): Deleted. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::CanvasRenderingContext::setHasActiveInspectorCanvasCallTracer): Added. (WebCore::CanvasRenderingContext::callTracingActive const): Deleted. (WebCore::CanvasRenderingContext::setCallTracingActive): Deleted. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::didComposite): Replace `callTracingActive` with `hasActiveInspectorCanvasCallTracer`. * inspector/RecordingSwizzleType.h: Renamed from Source/WebCore/inspector/RecordingSwizzleTypes.h. Drive-by: Rename `RecordingSwizzleTypes` to `RecordingSwizzleType`. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGLRenderingContext.cpp: * loader/DocumentThreadableLoader.cpp: * loader/ImageLoader.cpp: * loader/TextTrackLoader.cpp: * page/Page.cpp: Drive-by: unified sources include fixes Source/WebInspectorUI: * UserInterface/Models/RecordingAction.js: (WI.RecordingAction): Don't use `||` for the fallback of `_payloadSnapshot` as it can be `0`. * UserInterface/Models/Recording.js: Drive-by: Rename `RecordingSwizzleTypes` to `RecordingSwizzleType`. LayoutTests: * inspector/canvas/resources/recording-webgl2.js: * inspector/canvas/recording-webgl2-full-expected.txt: Use an actual `uniform` name instead of a random test string. Canonical link: https://commits.webkit.org/234826@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-04 01:34:21 +00:00
// CallTracer=InspectorCanvasCallTracer, // FIXME: OffscreenCanvas.
Add CanvasRenderingContext2DBase class and OffscreenCanvasRenderingContext2D https://bugs.webkit.org/show_bug.cgi?id=180718 <rdar://problem/36004015> Reviewed by Sam Weinig. Add an OffscreenCanvasRenderingContext2D class, and in the process create a shared base class for it and CanvasRenderingContext2D, called CanvasRenderingContext2DBase. The base class has nearly all the functionality, with the exception of the text and focus rendering APIs, which are only exposed on CanvasRenderingContext2D. At the moment CanvasRenderingContext2DBase's implementation still expects the attached canvas to be an HTMLCanvasElement, but that's ok since you can't yet create an OffscreenCanvasRenderingContext2D. A subsequent patch will do the right thing. No change in functionality at the moment, so covered by the existing tests. * DerivedSources.make: Add the new IDL file. * Sources.txt: Add all the new files to compile. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Removed some unnecessary headers, and added JSC:: where appropriate. (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp: Copied from Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp. (WebCore::root): New root function that just returns the address of the OffscreenCanvas. (WebCore::JSOffscreenCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSOffscreenCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSWorkerNavigatorCustom.cpp: Add JSC:: to fix a compilation error. (WebCore::JSWorkerNavigator::visitAdditionalChildren): * bindings/js/WebCoreBuiltinNames.h: New IDL types. * html/OffscreenCanvas.idl: Explicitly generates an IsReachable. * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::isOffscreen2d const): Helper for is<> trait. * html/canvas/CanvasRenderingContext2D.cpp: Nearly everything has been moved to the Base class. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp. * html/canvas/CanvasRenderingContext2DBase.h: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.h. * html/canvas/OffscreenCanvasRenderingContext2D.cpp: Added. Basic implementation that just uses the Base class. (WebCore::OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D): * html/canvas/OffscreenCanvasRenderingContext2D.h: Added. * html/canvas/OffscreenCanvasRenderingContext2D.idl: Added. Canonical link: https://commits.webkit.org/196630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 23:35:51 +00:00
] interface OffscreenCanvasRenderingContext2D {
readonly attribute OffscreenCanvas canvas;
[WebIDL] 'void' type is changing to 'undefined' https://bugs.webkit.org/show_bug.cgi?id=215514 <rdar://problem/67566201> Reviewed by Darin Adler. Update IDLs and IDL parsing / code generation for the switch from 'void' to 'undefined'. Source/WebCore: Also updates the parser to better match current WebIDL grammar, removing the special 'ReturnType' construction and just using 'Type' instead. * Modules/applepay/ApplePaySession.idl: * Modules/async-clipboard/Clipboard.idl: * Modules/cache/DOMCache.idl: * Modules/credentialmanagement/CredentialsContainer.idl: * Modules/encryptedmedia/MediaKeySession.h: * Modules/encryptedmedia/MediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/entriesapi/ErrorCallback.idl: * Modules/entriesapi/FileCallback.idl: * Modules/entriesapi/FileSystemDirectoryEntry.idl: * Modules/entriesapi/FileSystemDirectoryReader.idl: * Modules/entriesapi/FileSystemEntriesCallback.idl: * Modules/entriesapi/FileSystemEntry.idl: * Modules/entriesapi/FileSystemEntryCallback.idl: * Modules/entriesapi/FileSystemFileEntry.idl: * Modules/fetch/FetchHeaders.idl: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/PositionCallback.idl: * Modules/geolocation/PositionErrorCallback.idl: * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBTransaction.idl: * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediarecorder/MediaRecorder.idl: * Modules/mediasession/MediaSession.idl: * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediastream/CanvasCaptureMediaStreamTrack.idl: * Modules/mediastream/MediaStream.idl: * Modules/mediastream/MediaStreamTrack.idl: * Modules/mediastream/NavigatorMediaDevices.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/notifications/Notification.idl: * Modules/notifications/NotificationPermissionCallback.idl: * Modules/paymentrequest/MerchantValidationEvent.idl: * Modules/paymentrequest/PaymentRequest.idl: * Modules/paymentrequest/PaymentRequestUpdateEvent.idl: * Modules/paymentrequest/PaymentResponse.idl: * Modules/pictureinpicture/DocumentPictureInPicture.idl: * Modules/plugins/QuickTimePluginReplacement.idl: * Modules/quota/StorageErrorCallback.idl: * Modules/quota/StorageInfo.idl: * Modules/quota/StorageQuota.idl: * Modules/quota/StorageQuotaCallback.idl: * Modules/quota/StorageUsageCallback.idl: * Modules/remoteplayback/RemotePlayback.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/streams/ReadableByteStreamController.idl: * Modules/streams/ReadableStreamBYOBReader.idl: * Modules/streams/ReadableStreamBYOBRequest.idl: * Modules/streams/ReadableStreamDefaultController.idl: * Modules/streams/ReadableStreamDefaultReader.idl: * Modules/streams/ReadableStreamSink.idl: * Modules/streams/ReadableStreamSource.idl: * Modules/streams/TransformStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultWriter.idl: * Modules/webaudio/AnalyserNode.idl: * Modules/webaudio/AudioBuffer.idl: * Modules/webaudio/AudioBufferCallback.idl: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioListener.idl: * Modules/webaudio/AudioNode.idl: * Modules/webaudio/AudioScheduledSourceNode.idl: * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/IIRFilterNode.idl: * Modules/webaudio/OfflineAudioContext.idl: * Modules/webaudio/OscillatorNode.idl: * Modules/webaudio/PannerNode.idl: * Modules/webaudio/WebKitAudioBufferSourceNode.idl: * Modules/webaudio/WebKitAudioContext.idl: * Modules/webaudio/WebKitAudioListener.idl: * Modules/webaudio/WebKitAudioPannerNode.idl: * Modules/webaudio/WebKitOscillatorNode.idl: * Modules/webdatabase/Database.idl: * Modules/webdatabase/DatabaseCallback.idl: * Modules/webdatabase/SQLStatementCallback.idl: * Modules/webdatabase/SQLTransaction.idl: * Modules/webdatabase/SQLTransactionCallback.idl: * Modules/webdatabase/SQLTransactionErrorCallback.idl: * Modules/webgpu/WebGPUBuffer.idl: * Modules/webgpu/WebGPUCommandEncoder.idl: * Modules/webgpu/WebGPUComputePassEncoder.idl: * Modules/webgpu/WebGPUDeviceErrorScopes.idl: * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: * Modules/webgpu/WebGPUQueue.idl: * Modules/webgpu/WebGPURenderPassEncoder.idl: * Modules/webgpu/WebGPUTexture.idl: * Modules/websockets/WebSocket.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRSystem.idl: * Modules/webxr/XRFrameRequestCallback.idl: * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: * animation/AnimationEffect.idl: * animation/KeyframeEffect.idl: * animation/WebAnimation.idl: * bindings/IDLTypes.h: * bindings/js/DOMPromiseProxy.h: * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorJS.pm: (NeedsExplicitPropagateExceptionCall): (GenerateCallbackImplementationContent): (GenerateImplementationFunctionCall): (GetBaseIDLType): * bindings/scripts/IDLParser.pm: (parseCallbackRest): (parseAttributeOrOperationForStringifierOrStatic): (parseOperation): (parseSpecialOperation): (parseMapLikeProperties): (parseSetLikeProperties): (parseSingleType): (parseUnionMemberType): (parseDistinguishableType): (parseConstType): (parsePrimitiveType): (parseNonAnyType): Deleted. (parseReturnType): Deleted. * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: (WebCore::JSTestCallbackFunctionWithThisObject::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: (WebCore::JSTestCallbackFunctionWithTypedefs::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h: * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: (WebCore::JSTestCallbackInterface::callbackWithNoParam): (WebCore::JSTestCallbackInterface::callbackWithArrayParam): (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam): (WebCore::JSTestCallbackInterface::callbackWithStringList): (WebCore::JSTestCallbackInterface::callbackWithBoolean): (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass): * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestIterable.cpp: * bindings/scripts/test/JS/JSTestNode.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::construct): (WebCore::JSTestObjPrototype::finishCreation): (WebCore::jsTestObjTestReadOnlyVoidPromiseAttributeGetter): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethod): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgsBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody): (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody): (WebCore::jsTestObjPrototypeFunctionVoidMethodBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethod): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): Deleted. * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp: (WebCore::JSTestVoidCallbackFunction::handleEvent): * bindings/scripts/test/JS/JSTestVoidCallbackFunction.h: * bindings/scripts/test/TestCEReactions.idl: * bindings/scripts/test/TestCallTracer.idl: * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: * bindings/scripts/test/TestCallbackFunctionWithTypedefs.idl: * bindings/scripts/test/TestCallbackInterface.idl: * bindings/scripts/test/TestDomainSecurity.idl: * bindings/scripts/test/TestEnabledBySetting.idl: * bindings/scripts/test/TestGlobalObject.idl: * bindings/scripts/test/TestImplements.idl: * bindings/scripts/test/TestIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestIndexedSetterThrowingException.idl: * bindings/scripts/test/TestIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestJSBuiltinConstructor.idl: * bindings/scripts/test/TestNamedAndIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedAndIndexedSetterThrowingException.idl: * bindings/scripts/test/TestNamedAndIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterNoIdentifier.idl: * bindings/scripts/test/TestNamedDeleterThrowingException.idl: * bindings/scripts/test/TestNamedDeleterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedSetterThrowingException.idl: * bindings/scripts/test/TestNamedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetterAndSetter.idl: * bindings/scripts/test/TestNamedSetterWithOverrideBuiltins.idl: * bindings/scripts/test/TestNamedSetterWithUnforgableProperties.idl: * bindings/scripts/test/TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.idl: * bindings/scripts/test/TestNode.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestOperationBase.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/TestSupplemental.idl: * bindings/scripts/test/TestTypedefs.idl: * bindings/scripts/test/TestVoidCallbackFunction.idl: * css/CSSKeyframesRule.idl: * css/CSSMediaRule.idl: * css/CSSPaintCallback.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSSupportsRule.idl: * css/DOMCSSRegisterCustomProperty.idl: * css/DeprecatedCSSOMPrimitiveValue.idl: * css/FontFaceSet.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/WebKitCSSMatrix.idl: * dom/AbortAlgorithm.idl: * dom/AbortController.idl: * dom/AbortSignal.idl: * dom/CharacterData.idl: * dom/ChildNode.idl: * dom/CompositionEvent.idl: * dom/CustomElementRegistry.idl: * dom/CustomEvent.idl: * dom/DOMStringMap.idl: * dom/DataTransfer.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFullscreen.idl: * dom/DocumentStorageAccess.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventListener.idl: * dom/EventTarget.idl: * dom/HashChangeEvent.idl: * dom/IdleRequestCallback.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MessagePort.idl: * dom/MouseEvent.idl: * dom/MutationCallback.idl: * dom/MutationEvent.idl: * dom/MutationObserver.idl: * dom/Node.idl: * dom/NodeIterator.idl: * dom/ParentNode.idl: * dom/Range.idl: * dom/RequestAnimationFrameCallback.idl: * dom/StringCallback.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * fileapi/BlobCallback.idl: * fileapi/FileReader.idl: * html/DOMFormData.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLDialogElement.idl: * html/HTMLElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFormElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLOrForeignElement.idl: * html/HTMLOutputElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLVideoElement.idl: * html/ImageBitmap.idl: * html/MediaController.idl: * html/URLSearchParams.idl: * html/VoidCallback.idl: * html/canvas/ANGLEInstancedArrays.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLDrawBuffers.idl: * html/canvas/WebGLLoseContext.idl: * html/canvas/WebGLRenderingContextBase.idl: * html/track/TextTrack.idl: * inspector/CommandLineAPIHost.idl: * inspector/InspectorFrontendHost.idl: * loader/appcache/DOMApplicationCache.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/EventSource.idl: * page/History.idl: * page/IntersectionObserver.idl: * page/IntersectionObserverCallback.idl: * page/Location.idl: * page/Navigator.idl: * page/NavigatorIsLoggedIn.idl: * page/NavigatorShare.idl: * page/Performance.idl: * page/PerformanceObserver.idl: * page/PerformanceObserverCallback.idl: * page/RemoteDOMWindow.idl: * page/ResizeObserver.idl: * page/ResizeObserverCallback.idl: * page/UndoManager.idl: * page/WindowOrWorkerGlobalScope.idl: * plugins/DOMPluginArray.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * svg/SVGAngle.idl: * svg/SVGAnimationElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGMarkerElement.idl: * svg/SVGNumberList.idl: * svg/SVGPathSegList.idl: * svg/SVGPointList.idl: * svg/SVGSVGElement.idl: * svg/SVGStringList.idl: * svg/SVGTextContentElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * testing/InternalSettings.idl: * testing/Internals.idl: * testing/MockCDMFactory.idl: * testing/MockPageOverlay.idl: * testing/MockPaymentCoordinator.idl: * testing/ServiceWorkerInternals.idl: * testing/TypeConversions.idl: * testing/WebFakeXRDevice.idl: * testing/WebFakeXRInputController.idl: * testing/WebXRTest.idl: * testing/XRSimulateUserActivationFunction.idl: * workers/DedicatedWorkerGlobalScope.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ExtendableEvent.idl: * workers/service/FetchEvent.idl: * workers/service/ServiceWorker.idl: * workers/service/ServiceWorkerClient.idl: * workers/service/ServiceWorkerClients.idl: * workers/service/ServiceWorkerContainer.idl: * workers/service/ServiceWorkerGlobalScope.idl: * workers/service/ServiceWorkerRegistration.idl: * worklets/PaintWorkletGlobalScope.idl: * worklets/Worklet.idl: * xml/XMLHttpRequest.idl: * xml/XSLTProcessor.idl: Tools: * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_generateImplementationFile): (_returnExpression): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): (_returnExpression): * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/Bindings/GCController.idl: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl: Canonical link: https://commits.webkit.org/228750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-28 23:04:52 +00:00
undefined commit();
Add CanvasRenderingContext2DBase class and OffscreenCanvasRenderingContext2D https://bugs.webkit.org/show_bug.cgi?id=180718 <rdar://problem/36004015> Reviewed by Sam Weinig. Add an OffscreenCanvasRenderingContext2D class, and in the process create a shared base class for it and CanvasRenderingContext2D, called CanvasRenderingContext2DBase. The base class has nearly all the functionality, with the exception of the text and focus rendering APIs, which are only exposed on CanvasRenderingContext2D. At the moment CanvasRenderingContext2DBase's implementation still expects the attached canvas to be an HTMLCanvasElement, but that's ok since you can't yet create an OffscreenCanvasRenderingContext2D. A subsequent patch will do the right thing. No change in functionality at the moment, so covered by the existing tests. * DerivedSources.make: Add the new IDL file. * Sources.txt: Add all the new files to compile. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Removed some unnecessary headers, and added JSC:: where appropriate. (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp: Copied from Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp. (WebCore::root): New root function that just returns the address of the OffscreenCanvas. (WebCore::JSOffscreenCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSOffscreenCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSWorkerNavigatorCustom.cpp: Add JSC:: to fix a compilation error. (WebCore::JSWorkerNavigator::visitAdditionalChildren): * bindings/js/WebCoreBuiltinNames.h: New IDL types. * html/OffscreenCanvas.idl: Explicitly generates an IsReachable. * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::isOffscreen2d const): Helper for is<> trait. * html/canvas/CanvasRenderingContext2D.cpp: Nearly everything has been moved to the Base class. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp. * html/canvas/CanvasRenderingContext2DBase.h: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.h. * html/canvas/OffscreenCanvasRenderingContext2D.cpp: Added. Basic implementation that just uses the Base class. (WebCore::OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D): * html/canvas/OffscreenCanvasRenderingContext2D.h: Added. * html/canvas/OffscreenCanvasRenderingContext2D.idl: Added. Canonical link: https://commits.webkit.org/196630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 23:35:51 +00:00
// Inspector-only.
// FIXME: OffscreenCanvas.
[WebIDL] 'void' type is changing to 'undefined' https://bugs.webkit.org/show_bug.cgi?id=215514 <rdar://problem/67566201> Reviewed by Darin Adler. Update IDLs and IDL parsing / code generation for the switch from 'void' to 'undefined'. Source/WebCore: Also updates the parser to better match current WebIDL grammar, removing the special 'ReturnType' construction and just using 'Type' instead. * Modules/applepay/ApplePaySession.idl: * Modules/async-clipboard/Clipboard.idl: * Modules/cache/DOMCache.idl: * Modules/credentialmanagement/CredentialsContainer.idl: * Modules/encryptedmedia/MediaKeySession.h: * Modules/encryptedmedia/MediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/entriesapi/ErrorCallback.idl: * Modules/entriesapi/FileCallback.idl: * Modules/entriesapi/FileSystemDirectoryEntry.idl: * Modules/entriesapi/FileSystemDirectoryReader.idl: * Modules/entriesapi/FileSystemEntriesCallback.idl: * Modules/entriesapi/FileSystemEntry.idl: * Modules/entriesapi/FileSystemEntryCallback.idl: * Modules/entriesapi/FileSystemFileEntry.idl: * Modules/fetch/FetchHeaders.idl: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/PositionCallback.idl: * Modules/geolocation/PositionErrorCallback.idl: * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBTransaction.idl: * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediarecorder/MediaRecorder.idl: * Modules/mediasession/MediaSession.idl: * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediastream/CanvasCaptureMediaStreamTrack.idl: * Modules/mediastream/MediaStream.idl: * Modules/mediastream/MediaStreamTrack.idl: * Modules/mediastream/NavigatorMediaDevices.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/notifications/Notification.idl: * Modules/notifications/NotificationPermissionCallback.idl: * Modules/paymentrequest/MerchantValidationEvent.idl: * Modules/paymentrequest/PaymentRequest.idl: * Modules/paymentrequest/PaymentRequestUpdateEvent.idl: * Modules/paymentrequest/PaymentResponse.idl: * Modules/pictureinpicture/DocumentPictureInPicture.idl: * Modules/plugins/QuickTimePluginReplacement.idl: * Modules/quota/StorageErrorCallback.idl: * Modules/quota/StorageInfo.idl: * Modules/quota/StorageQuota.idl: * Modules/quota/StorageQuotaCallback.idl: * Modules/quota/StorageUsageCallback.idl: * Modules/remoteplayback/RemotePlayback.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/streams/ReadableByteStreamController.idl: * Modules/streams/ReadableStreamBYOBReader.idl: * Modules/streams/ReadableStreamBYOBRequest.idl: * Modules/streams/ReadableStreamDefaultController.idl: * Modules/streams/ReadableStreamDefaultReader.idl: * Modules/streams/ReadableStreamSink.idl: * Modules/streams/ReadableStreamSource.idl: * Modules/streams/TransformStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultWriter.idl: * Modules/webaudio/AnalyserNode.idl: * Modules/webaudio/AudioBuffer.idl: * Modules/webaudio/AudioBufferCallback.idl: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioListener.idl: * Modules/webaudio/AudioNode.idl: * Modules/webaudio/AudioScheduledSourceNode.idl: * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/IIRFilterNode.idl: * Modules/webaudio/OfflineAudioContext.idl: * Modules/webaudio/OscillatorNode.idl: * Modules/webaudio/PannerNode.idl: * Modules/webaudio/WebKitAudioBufferSourceNode.idl: * Modules/webaudio/WebKitAudioContext.idl: * Modules/webaudio/WebKitAudioListener.idl: * Modules/webaudio/WebKitAudioPannerNode.idl: * Modules/webaudio/WebKitOscillatorNode.idl: * Modules/webdatabase/Database.idl: * Modules/webdatabase/DatabaseCallback.idl: * Modules/webdatabase/SQLStatementCallback.idl: * Modules/webdatabase/SQLTransaction.idl: * Modules/webdatabase/SQLTransactionCallback.idl: * Modules/webdatabase/SQLTransactionErrorCallback.idl: * Modules/webgpu/WebGPUBuffer.idl: * Modules/webgpu/WebGPUCommandEncoder.idl: * Modules/webgpu/WebGPUComputePassEncoder.idl: * Modules/webgpu/WebGPUDeviceErrorScopes.idl: * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: * Modules/webgpu/WebGPUQueue.idl: * Modules/webgpu/WebGPURenderPassEncoder.idl: * Modules/webgpu/WebGPUTexture.idl: * Modules/websockets/WebSocket.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRSystem.idl: * Modules/webxr/XRFrameRequestCallback.idl: * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: * animation/AnimationEffect.idl: * animation/KeyframeEffect.idl: * animation/WebAnimation.idl: * bindings/IDLTypes.h: * bindings/js/DOMPromiseProxy.h: * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorJS.pm: (NeedsExplicitPropagateExceptionCall): (GenerateCallbackImplementationContent): (GenerateImplementationFunctionCall): (GetBaseIDLType): * bindings/scripts/IDLParser.pm: (parseCallbackRest): (parseAttributeOrOperationForStringifierOrStatic): (parseOperation): (parseSpecialOperation): (parseMapLikeProperties): (parseSetLikeProperties): (parseSingleType): (parseUnionMemberType): (parseDistinguishableType): (parseConstType): (parsePrimitiveType): (parseNonAnyType): Deleted. (parseReturnType): Deleted. * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: (WebCore::JSTestCallbackFunctionWithThisObject::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: (WebCore::JSTestCallbackFunctionWithTypedefs::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h: * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: (WebCore::JSTestCallbackInterface::callbackWithNoParam): (WebCore::JSTestCallbackInterface::callbackWithArrayParam): (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam): (WebCore::JSTestCallbackInterface::callbackWithStringList): (WebCore::JSTestCallbackInterface::callbackWithBoolean): (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass): * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestIterable.cpp: * bindings/scripts/test/JS/JSTestNode.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::construct): (WebCore::JSTestObjPrototype::finishCreation): (WebCore::jsTestObjTestReadOnlyVoidPromiseAttributeGetter): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethod): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgsBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody): (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody): (WebCore::jsTestObjPrototypeFunctionVoidMethodBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethod): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): Deleted. * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp: (WebCore::JSTestVoidCallbackFunction::handleEvent): * bindings/scripts/test/JS/JSTestVoidCallbackFunction.h: * bindings/scripts/test/TestCEReactions.idl: * bindings/scripts/test/TestCallTracer.idl: * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: * bindings/scripts/test/TestCallbackFunctionWithTypedefs.idl: * bindings/scripts/test/TestCallbackInterface.idl: * bindings/scripts/test/TestDomainSecurity.idl: * bindings/scripts/test/TestEnabledBySetting.idl: * bindings/scripts/test/TestGlobalObject.idl: * bindings/scripts/test/TestImplements.idl: * bindings/scripts/test/TestIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestIndexedSetterThrowingException.idl: * bindings/scripts/test/TestIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestJSBuiltinConstructor.idl: * bindings/scripts/test/TestNamedAndIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedAndIndexedSetterThrowingException.idl: * bindings/scripts/test/TestNamedAndIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterNoIdentifier.idl: * bindings/scripts/test/TestNamedDeleterThrowingException.idl: * bindings/scripts/test/TestNamedDeleterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedSetterThrowingException.idl: * bindings/scripts/test/TestNamedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetterAndSetter.idl: * bindings/scripts/test/TestNamedSetterWithOverrideBuiltins.idl: * bindings/scripts/test/TestNamedSetterWithUnforgableProperties.idl: * bindings/scripts/test/TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.idl: * bindings/scripts/test/TestNode.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestOperationBase.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/TestSupplemental.idl: * bindings/scripts/test/TestTypedefs.idl: * bindings/scripts/test/TestVoidCallbackFunction.idl: * css/CSSKeyframesRule.idl: * css/CSSMediaRule.idl: * css/CSSPaintCallback.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSSupportsRule.idl: * css/DOMCSSRegisterCustomProperty.idl: * css/DeprecatedCSSOMPrimitiveValue.idl: * css/FontFaceSet.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/WebKitCSSMatrix.idl: * dom/AbortAlgorithm.idl: * dom/AbortController.idl: * dom/AbortSignal.idl: * dom/CharacterData.idl: * dom/ChildNode.idl: * dom/CompositionEvent.idl: * dom/CustomElementRegistry.idl: * dom/CustomEvent.idl: * dom/DOMStringMap.idl: * dom/DataTransfer.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFullscreen.idl: * dom/DocumentStorageAccess.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventListener.idl: * dom/EventTarget.idl: * dom/HashChangeEvent.idl: * dom/IdleRequestCallback.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MessagePort.idl: * dom/MouseEvent.idl: * dom/MutationCallback.idl: * dom/MutationEvent.idl: * dom/MutationObserver.idl: * dom/Node.idl: * dom/NodeIterator.idl: * dom/ParentNode.idl: * dom/Range.idl: * dom/RequestAnimationFrameCallback.idl: * dom/StringCallback.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * fileapi/BlobCallback.idl: * fileapi/FileReader.idl: * html/DOMFormData.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLDialogElement.idl: * html/HTMLElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFormElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLOrForeignElement.idl: * html/HTMLOutputElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLVideoElement.idl: * html/ImageBitmap.idl: * html/MediaController.idl: * html/URLSearchParams.idl: * html/VoidCallback.idl: * html/canvas/ANGLEInstancedArrays.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLDrawBuffers.idl: * html/canvas/WebGLLoseContext.idl: * html/canvas/WebGLRenderingContextBase.idl: * html/track/TextTrack.idl: * inspector/CommandLineAPIHost.idl: * inspector/InspectorFrontendHost.idl: * loader/appcache/DOMApplicationCache.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/EventSource.idl: * page/History.idl: * page/IntersectionObserver.idl: * page/IntersectionObserverCallback.idl: * page/Location.idl: * page/Navigator.idl: * page/NavigatorIsLoggedIn.idl: * page/NavigatorShare.idl: * page/Performance.idl: * page/PerformanceObserver.idl: * page/PerformanceObserverCallback.idl: * page/RemoteDOMWindow.idl: * page/ResizeObserver.idl: * page/ResizeObserverCallback.idl: * page/UndoManager.idl: * page/WindowOrWorkerGlobalScope.idl: * plugins/DOMPluginArray.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * svg/SVGAngle.idl: * svg/SVGAnimationElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGMarkerElement.idl: * svg/SVGNumberList.idl: * svg/SVGPathSegList.idl: * svg/SVGPointList.idl: * svg/SVGSVGElement.idl: * svg/SVGStringList.idl: * svg/SVGTextContentElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * testing/InternalSettings.idl: * testing/Internals.idl: * testing/MockCDMFactory.idl: * testing/MockPageOverlay.idl: * testing/MockPaymentCoordinator.idl: * testing/ServiceWorkerInternals.idl: * testing/TypeConversions.idl: * testing/WebFakeXRDevice.idl: * testing/WebFakeXRInputController.idl: * testing/WebXRTest.idl: * testing/XRSimulateUserActivationFunction.idl: * workers/DedicatedWorkerGlobalScope.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ExtendableEvent.idl: * workers/service/FetchEvent.idl: * workers/service/ServiceWorker.idl: * workers/service/ServiceWorkerClient.idl: * workers/service/ServiceWorkerClients.idl: * workers/service/ServiceWorkerContainer.idl: * workers/service/ServiceWorkerGlobalScope.idl: * workers/service/ServiceWorkerRegistration.idl: * worklets/PaintWorkletGlobalScope.idl: * worklets/Worklet.idl: * xml/XMLHttpRequest.idl: * xml/XSLTProcessor.idl: Tools: * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_generateImplementationFile): (_returnExpression): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): (_returnExpression): * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/Bindings/GCController.idl: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl: Canonical link: https://commits.webkit.org/228750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-28 23:04:52 +00:00
// [EnabledAtRuntime=InspectorAdditions] undefined setPath(Path2D path);
Add CanvasRenderingContext2DBase class and OffscreenCanvasRenderingContext2D https://bugs.webkit.org/show_bug.cgi?id=180718 <rdar://problem/36004015> Reviewed by Sam Weinig. Add an OffscreenCanvasRenderingContext2D class, and in the process create a shared base class for it and CanvasRenderingContext2D, called CanvasRenderingContext2DBase. The base class has nearly all the functionality, with the exception of the text and focus rendering APIs, which are only exposed on CanvasRenderingContext2D. At the moment CanvasRenderingContext2DBase's implementation still expects the attached canvas to be an HTMLCanvasElement, but that's ok since you can't yet create an OffscreenCanvasRenderingContext2D. A subsequent patch will do the right thing. No change in functionality at the moment, so covered by the existing tests. * DerivedSources.make: Add the new IDL file. * Sources.txt: Add all the new files to compile. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Removed some unnecessary headers, and added JSC:: where appropriate. (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp: Copied from Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp. (WebCore::root): New root function that just returns the address of the OffscreenCanvas. (WebCore::JSOffscreenCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots): (WebCore::JSOffscreenCanvasRenderingContext2D::visitAdditionalChildren): * bindings/js/JSWorkerNavigatorCustom.cpp: Add JSC:: to fix a compilation error. (WebCore::JSWorkerNavigator::visitAdditionalChildren): * bindings/js/WebCoreBuiltinNames.h: New IDL types. * html/OffscreenCanvas.idl: Explicitly generates an IsReachable. * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::isOffscreen2d const): Helper for is<> trait. * html/canvas/CanvasRenderingContext2D.cpp: Nearly everything has been moved to the Base class. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp. * html/canvas/CanvasRenderingContext2DBase.h: Copied from Source/WebCore/html/canvas/CanvasRenderingContext2D.h. * html/canvas/OffscreenCanvasRenderingContext2D.cpp: Added. Basic implementation that just uses the Base class. (WebCore::OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D): * html/canvas/OffscreenCanvasRenderingContext2D.h: Added. * html/canvas/OffscreenCanvasRenderingContext2D.idl: Added. Canonical link: https://commits.webkit.org/196630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-12-12 23:35:51 +00:00
// [EnabledAtRuntime=InspectorAdditions, NewObject] Path2D getPath();
};
Update WebIDL parser to more closely align with current WebIDL spec https://bugs.webkit.org/show_bug.cgi?id=216089 Reviewed by Chris Dumez. Major changes are: - 'implements' keyword is now called 'includes' (this is the only observable change). - Added support for parsing namespaces, async iterable, partial mixins and ObservableArray, though the code generators don't support them yet, so they just clearly error out. - Update list of keywords that can be used as argument names. - Update parser to use the current terminology from WebIDL. - Added more comments to be clear what next steps to take such as removing legacy constructs like serializer, exception, legacycaller and moving synthetic operation additions from the parser to the code generators. * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchResponse.idl: * bindings/scripts/IDLParser.pm: (Parse): (applyTypedefs): (parseDefinition): (parseCallbackOrInterfaceOrMixin): (parseCallbackRestOrInterface): (parseInterfaceOrMixin): (parseInterface): (parseNamespace): (parseNamespaceMembers): (parseNamespaceMember): (parsePartialDefinition): (parsePartialInterfaceOrPartialMixin): (parsePartialInterface): (parsePartialInterfaceMembers): (parsePartialInterfaceMember): (parseInterfaceMember): (parsePartialDictionary): (parseIncludesStatement): (parseInheritAttribute): (parseOperation): (parseRegularOperation): (parseSpecial): (parseAsyncIterable): (parseOptionalIterableInterface): (parseArgumentNameKeyword): (parseDistinguishableType): (parseConstType): (parsePrimitiveType): (applyMemberList): (parseCallbackOrInterface): Deleted. (parseImplementsStatement): Deleted. (parseOperationOrReadWriteAttributeOrMaplike): Deleted. (parseReadWriteAttribute): Deleted. (parseInherit): Deleted. * bindings/scripts/preprocess-idls.pl: (getIncludedInterfacesFromIDL): (getImplementedInterfacesFromIDL): Deleted. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::construct): (WebCore::jsTestInterfaceConstructorIncludesStaticReadOnlyAttrGetter): (WebCore::jsTestInterfaceConstructorIncludesStaticReadOnlyAttr): (WebCore::jsTestInterfaceConstructorIncludesStaticAttrGetter): (WebCore::jsTestInterfaceConstructorIncludesStaticAttr): (WebCore::setJSTestInterfaceConstructorIncludesStaticAttrSetter): (WebCore::setJSTestInterfaceConstructorIncludesStaticAttr): (WebCore::jsTestInterfaceIncludesStr1Getter): (WebCore::jsTestInterfaceIncludesStr1): (WebCore::jsTestInterfaceIncludesStr2Getter): (WebCore::jsTestInterfaceIncludesStr2): (WebCore::setJSTestInterfaceIncludesStr2Setter): (WebCore::setJSTestInterfaceIncludesStr2): (WebCore::jsTestInterfaceIncludesStr3Getter): (WebCore::jsTestInterfaceIncludesStr3): (WebCore::setJSTestInterfaceIncludesStr3Setter): (WebCore::setJSTestInterfaceIncludesStr3): (WebCore::jsTestInterfaceIncludesNodeGetter): (WebCore::jsTestInterfaceIncludesNode): (WebCore::setJSTestInterfaceIncludesNodeSetter): (WebCore::setJSTestInterfaceIncludesNode): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod1Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod1): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod2Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod2): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod3Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod3): (WebCore::jsTestInterfaceConstructorFunctionIncludesMethod4Body): (WebCore::jsTestInterfaceConstructorFunctionIncludesMethod4): (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticAttrGetter): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticAttr): Deleted. (WebCore::setJSTestInterfaceConstructorImplementsStaticAttrSetter): Deleted. (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr): Deleted. (WebCore::jsTestInterfaceImplementsStr1Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr1): Deleted. (WebCore::jsTestInterfaceImplementsStr2Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr2): Deleted. (WebCore::setJSTestInterfaceImplementsStr2Setter): Deleted. (WebCore::setJSTestInterfaceImplementsStr2): Deleted. (WebCore::jsTestInterfaceImplementsStr3Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr3): Deleted. (WebCore::setJSTestInterfaceImplementsStr3Setter): Deleted. (WebCore::setJSTestInterfaceImplementsStr3): Deleted. (WebCore::jsTestInterfaceImplementsNodeGetter): Deleted. (WebCore::jsTestInterfaceImplementsNode): Deleted. (WebCore::setJSTestInterfaceImplementsNodeSetter): Deleted. (WebCore::setJSTestInterfaceImplementsNode): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3): Deleted. (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4Body): Deleted. (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4): Deleted. * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestImplements.idl: Removed. * bindings/scripts/test/TestIncludes.idl: Copied from Source/WebCore/bindings/scripts/test/TestImplements.idl. * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestOperationConditional.idl: * dom/CharacterData.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFragment.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/ShadowRoot.idl: * dom/Text.idl: * html/HTMLAnchorElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBodyElement.idl: * html/HTMLElement.idl: * html/HTMLFrameSetElement.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/PaintRenderingContext2D.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContext.idl: * page/DOMWindow.idl: * page/Navigator.idl: * page/WorkerNavigator.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAnimationElement.idl: * svg/SVGCursorElement.idl: * svg/SVGElement.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterElement.idl: * svg/SVGGlyphRefElement.idl: * svg/SVGGradientElement.idl: * svg/SVGGraphicsElement.idl: * svg/SVGImageElement.idl: * svg/SVGMPathElement.idl: * svg/SVGMarkerElement.idl: * svg/SVGMaskElement.idl: * svg/SVGPatternElement.idl: * svg/SVGSVGElement.idl: * svg/SVGScriptElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGUseElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ServiceWorker.idl: Canonical link: https://commits.webkit.org/228925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-03 16:27:46 +00:00
OffscreenCanvasRenderingContext2D includes CanvasState;
OffscreenCanvasRenderingContext2D includes CanvasTransform;
OffscreenCanvasRenderingContext2D includes CanvasCompositing;
OffscreenCanvasRenderingContext2D includes CanvasImageSmoothing;
OffscreenCanvasRenderingContext2D includes CanvasFillStrokeStyles;
OffscreenCanvasRenderingContext2D includes CanvasShadowStyles;
OffscreenCanvasRenderingContext2D includes CanvasFilters;
OffscreenCanvasRenderingContext2D includes CanvasRect;
OffscreenCanvasRenderingContext2D includes CanvasDrawPath;
Enable font functions on OffscreenCanvas for main-thread https://bugs.webkit.org/show_bug.cgi?id=219088 Reviewed by Simon Fraser. LayoutTests/imported/w3c: Update test expectations for OffscreenCanvas text tests and add where they were missing. * web-platform-tests/html/canvas/offscreen/text/*: Source/WebCore: Move some font-related code from CanvasRenderingContext2D to CanvasRenderingContext2DBase so it can be shared by OffscreenCanvas and enable font functions on the OffscreenCanvas rendering context. Font setting only works when a Document is available, so this only enables drawing/measuring of text on the main thread. No new tests. Rebaselined existing tests. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::measureText): (WebCore::CanvasRenderingContext2D::fontProxy const): (WebCore::CanvasRenderingContext2D::drawTextInternal): * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::font const): (WebCore::toCanvasTextAlign): (WebCore::fromCanvasTextAlign): (WebCore::CanvasRenderingContext2DBase::textAlign const): (WebCore::CanvasRenderingContext2DBase::setTextAlign): (WebCore::toCanvasTextBaseline): (WebCore::fromCanvasTextBaseline): (WebCore::CanvasRenderingContext2DBase::textBaseline const): (WebCore::CanvasRenderingContext2DBase::setTextBaseline): (WebCore::CanvasRenderingContext2DBase::setDirection): (WebCore::CanvasRenderingContext2DBase::canDrawTextWithParams): (WebCore::CanvasRenderingContext2DBase::normalizeSpaces): (WebCore::CanvasRenderingContext2DBase::drawText): (WebCore::CanvasRenderingContext2DBase::drawTextUnchecked): (WebCore::CanvasRenderingContext2DBase::measureTextInternal): (WebCore::CanvasRenderingContext2DBase::textOffset): * html/canvas/CanvasRenderingContext2DBase.h: (WebCore::CanvasRenderingContext2DBase::fontProxy): * html/canvas/OffscreenCanvasRenderingContext2D.cpp: (WebCore::OffscreenCanvasRenderingContext2D::setFont): (WebCore::OffscreenCanvasRenderingContext2D::direction const): (WebCore::OffscreenCanvasRenderingContext2D::fontProxy const): (WebCore::OffscreenCanvasRenderingContext2D::fillText): (WebCore::OffscreenCanvasRenderingContext2D::strokeText): (WebCore::OffscreenCanvasRenderingContext2D::measureText): * html/canvas/OffscreenCanvasRenderingContext2D.h: * html/canvas/OffscreenCanvasRenderingContext2D.idl: LayoutTests: Enable running OffscreenCanvas text tests. * platform/glib/TestExpectations: Canonical link: https://commits.webkit.org/231815@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-20 11:40:06 +00:00
OffscreenCanvasRenderingContext2D includes CanvasText;
Update WebIDL parser to more closely align with current WebIDL spec https://bugs.webkit.org/show_bug.cgi?id=216089 Reviewed by Chris Dumez. Major changes are: - 'implements' keyword is now called 'includes' (this is the only observable change). - Added support for parsing namespaces, async iterable, partial mixins and ObservableArray, though the code generators don't support them yet, so they just clearly error out. - Update list of keywords that can be used as argument names. - Update parser to use the current terminology from WebIDL. - Added more comments to be clear what next steps to take such as removing legacy constructs like serializer, exception, legacycaller and moving synthetic operation additions from the parser to the code generators. * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchResponse.idl: * bindings/scripts/IDLParser.pm: (Parse): (applyTypedefs): (parseDefinition): (parseCallbackOrInterfaceOrMixin): (parseCallbackRestOrInterface): (parseInterfaceOrMixin): (parseInterface): (parseNamespace): (parseNamespaceMembers): (parseNamespaceMember): (parsePartialDefinition): (parsePartialInterfaceOrPartialMixin): (parsePartialInterface): (parsePartialInterfaceMembers): (parsePartialInterfaceMember): (parseInterfaceMember): (parsePartialDictionary): (parseIncludesStatement): (parseInheritAttribute): (parseOperation): (parseRegularOperation): (parseSpecial): (parseAsyncIterable): (parseOptionalIterableInterface): (parseArgumentNameKeyword): (parseDistinguishableType): (parseConstType): (parsePrimitiveType): (applyMemberList): (parseCallbackOrInterface): Deleted. (parseImplementsStatement): Deleted. (parseOperationOrReadWriteAttributeOrMaplike): Deleted. (parseReadWriteAttribute): Deleted. (parseInherit): Deleted. * bindings/scripts/preprocess-idls.pl: (getIncludedInterfacesFromIDL): (getImplementedInterfacesFromIDL): Deleted. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::construct): (WebCore::jsTestInterfaceConstructorIncludesStaticReadOnlyAttrGetter): (WebCore::jsTestInterfaceConstructorIncludesStaticReadOnlyAttr): (WebCore::jsTestInterfaceConstructorIncludesStaticAttrGetter): (WebCore::jsTestInterfaceConstructorIncludesStaticAttr): (WebCore::setJSTestInterfaceConstructorIncludesStaticAttrSetter): (WebCore::setJSTestInterfaceConstructorIncludesStaticAttr): (WebCore::jsTestInterfaceIncludesStr1Getter): (WebCore::jsTestInterfaceIncludesStr1): (WebCore::jsTestInterfaceIncludesStr2Getter): (WebCore::jsTestInterfaceIncludesStr2): (WebCore::setJSTestInterfaceIncludesStr2Setter): (WebCore::setJSTestInterfaceIncludesStr2): (WebCore::jsTestInterfaceIncludesStr3Getter): (WebCore::jsTestInterfaceIncludesStr3): (WebCore::setJSTestInterfaceIncludesStr3Setter): (WebCore::setJSTestInterfaceIncludesStr3): (WebCore::jsTestInterfaceIncludesNodeGetter): (WebCore::jsTestInterfaceIncludesNode): (WebCore::setJSTestInterfaceIncludesNodeSetter): (WebCore::setJSTestInterfaceIncludesNode): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod1Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod1): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod2Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod2): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod3Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod3): (WebCore::jsTestInterfaceConstructorFunctionIncludesMethod4Body): (WebCore::jsTestInterfaceConstructorFunctionIncludesMethod4): (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticAttrGetter): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticAttr): Deleted. (WebCore::setJSTestInterfaceConstructorImplementsStaticAttrSetter): Deleted. (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr): Deleted. (WebCore::jsTestInterfaceImplementsStr1Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr1): Deleted. (WebCore::jsTestInterfaceImplementsStr2Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr2): Deleted. (WebCore::setJSTestInterfaceImplementsStr2Setter): Deleted. (WebCore::setJSTestInterfaceImplementsStr2): Deleted. (WebCore::jsTestInterfaceImplementsStr3Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr3): Deleted. (WebCore::setJSTestInterfaceImplementsStr3Setter): Deleted. (WebCore::setJSTestInterfaceImplementsStr3): Deleted. (WebCore::jsTestInterfaceImplementsNodeGetter): Deleted. (WebCore::jsTestInterfaceImplementsNode): Deleted. (WebCore::setJSTestInterfaceImplementsNodeSetter): Deleted. (WebCore::setJSTestInterfaceImplementsNode): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3): Deleted. (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4Body): Deleted. (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4): Deleted. * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestImplements.idl: Removed. * bindings/scripts/test/TestIncludes.idl: Copied from Source/WebCore/bindings/scripts/test/TestImplements.idl. * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestOperationConditional.idl: * dom/CharacterData.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFragment.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/ShadowRoot.idl: * dom/Text.idl: * html/HTMLAnchorElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBodyElement.idl: * html/HTMLElement.idl: * html/HTMLFrameSetElement.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/PaintRenderingContext2D.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContext.idl: * page/DOMWindow.idl: * page/Navigator.idl: * page/WorkerNavigator.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAnimationElement.idl: * svg/SVGCursorElement.idl: * svg/SVGElement.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterElement.idl: * svg/SVGGlyphRefElement.idl: * svg/SVGGradientElement.idl: * svg/SVGGraphicsElement.idl: * svg/SVGImageElement.idl: * svg/SVGMPathElement.idl: * svg/SVGMarkerElement.idl: * svg/SVGMaskElement.idl: * svg/SVGPatternElement.idl: * svg/SVGSVGElement.idl: * svg/SVGScriptElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGUseElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ServiceWorker.idl: Canonical link: https://commits.webkit.org/228925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-03 16:27:46 +00:00
OffscreenCanvasRenderingContext2D includes CanvasDrawImage;
OffscreenCanvasRenderingContext2D includes CanvasImageData;
OffscreenCanvasRenderingContext2D includes CanvasPathDrawingStyles;
Enable font functions on OffscreenCanvas for main-thread https://bugs.webkit.org/show_bug.cgi?id=219088 Reviewed by Simon Fraser. LayoutTests/imported/w3c: Update test expectations for OffscreenCanvas text tests and add where they were missing. * web-platform-tests/html/canvas/offscreen/text/*: Source/WebCore: Move some font-related code from CanvasRenderingContext2D to CanvasRenderingContext2DBase so it can be shared by OffscreenCanvas and enable font functions on the OffscreenCanvas rendering context. Font setting only works when a Document is available, so this only enables drawing/measuring of text on the main thread. No new tests. Rebaselined existing tests. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::measureText): (WebCore::CanvasRenderingContext2D::fontProxy const): (WebCore::CanvasRenderingContext2D::drawTextInternal): * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::font const): (WebCore::toCanvasTextAlign): (WebCore::fromCanvasTextAlign): (WebCore::CanvasRenderingContext2DBase::textAlign const): (WebCore::CanvasRenderingContext2DBase::setTextAlign): (WebCore::toCanvasTextBaseline): (WebCore::fromCanvasTextBaseline): (WebCore::CanvasRenderingContext2DBase::textBaseline const): (WebCore::CanvasRenderingContext2DBase::setTextBaseline): (WebCore::CanvasRenderingContext2DBase::setDirection): (WebCore::CanvasRenderingContext2DBase::canDrawTextWithParams): (WebCore::CanvasRenderingContext2DBase::normalizeSpaces): (WebCore::CanvasRenderingContext2DBase::drawText): (WebCore::CanvasRenderingContext2DBase::drawTextUnchecked): (WebCore::CanvasRenderingContext2DBase::measureTextInternal): (WebCore::CanvasRenderingContext2DBase::textOffset): * html/canvas/CanvasRenderingContext2DBase.h: (WebCore::CanvasRenderingContext2DBase::fontProxy): * html/canvas/OffscreenCanvasRenderingContext2D.cpp: (WebCore::OffscreenCanvasRenderingContext2D::setFont): (WebCore::OffscreenCanvasRenderingContext2D::direction const): (WebCore::OffscreenCanvasRenderingContext2D::fontProxy const): (WebCore::OffscreenCanvasRenderingContext2D::fillText): (WebCore::OffscreenCanvasRenderingContext2D::strokeText): (WebCore::OffscreenCanvasRenderingContext2D::measureText): * html/canvas/OffscreenCanvasRenderingContext2D.h: * html/canvas/OffscreenCanvasRenderingContext2D.idl: LayoutTests: Enable running OffscreenCanvas text tests. * platform/glib/TestExpectations: Canonical link: https://commits.webkit.org/231815@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-20 11:40:06 +00:00
OffscreenCanvasRenderingContext2D includes CanvasTextDrawingStyles;
Update WebIDL parser to more closely align with current WebIDL spec https://bugs.webkit.org/show_bug.cgi?id=216089 Reviewed by Chris Dumez. Major changes are: - 'implements' keyword is now called 'includes' (this is the only observable change). - Added support for parsing namespaces, async iterable, partial mixins and ObservableArray, though the code generators don't support them yet, so they just clearly error out. - Update list of keywords that can be used as argument names. - Update parser to use the current terminology from WebIDL. - Added more comments to be clear what next steps to take such as removing legacy constructs like serializer, exception, legacycaller and moving synthetic operation additions from the parser to the code generators. * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchResponse.idl: * bindings/scripts/IDLParser.pm: (Parse): (applyTypedefs): (parseDefinition): (parseCallbackOrInterfaceOrMixin): (parseCallbackRestOrInterface): (parseInterfaceOrMixin): (parseInterface): (parseNamespace): (parseNamespaceMembers): (parseNamespaceMember): (parsePartialDefinition): (parsePartialInterfaceOrPartialMixin): (parsePartialInterface): (parsePartialInterfaceMembers): (parsePartialInterfaceMember): (parseInterfaceMember): (parsePartialDictionary): (parseIncludesStatement): (parseInheritAttribute): (parseOperation): (parseRegularOperation): (parseSpecial): (parseAsyncIterable): (parseOptionalIterableInterface): (parseArgumentNameKeyword): (parseDistinguishableType): (parseConstType): (parsePrimitiveType): (applyMemberList): (parseCallbackOrInterface): Deleted. (parseImplementsStatement): Deleted. (parseOperationOrReadWriteAttributeOrMaplike): Deleted. (parseReadWriteAttribute): Deleted. (parseInherit): Deleted. * bindings/scripts/preprocess-idls.pl: (getIncludedInterfacesFromIDL): (getImplementedInterfacesFromIDL): Deleted. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::construct): (WebCore::jsTestInterfaceConstructorIncludesStaticReadOnlyAttrGetter): (WebCore::jsTestInterfaceConstructorIncludesStaticReadOnlyAttr): (WebCore::jsTestInterfaceConstructorIncludesStaticAttrGetter): (WebCore::jsTestInterfaceConstructorIncludesStaticAttr): (WebCore::setJSTestInterfaceConstructorIncludesStaticAttrSetter): (WebCore::setJSTestInterfaceConstructorIncludesStaticAttr): (WebCore::jsTestInterfaceIncludesStr1Getter): (WebCore::jsTestInterfaceIncludesStr1): (WebCore::jsTestInterfaceIncludesStr2Getter): (WebCore::jsTestInterfaceIncludesStr2): (WebCore::setJSTestInterfaceIncludesStr2Setter): (WebCore::setJSTestInterfaceIncludesStr2): (WebCore::jsTestInterfaceIncludesStr3Getter): (WebCore::jsTestInterfaceIncludesStr3): (WebCore::setJSTestInterfaceIncludesStr3Setter): (WebCore::setJSTestInterfaceIncludesStr3): (WebCore::jsTestInterfaceIncludesNodeGetter): (WebCore::jsTestInterfaceIncludesNode): (WebCore::setJSTestInterfaceIncludesNodeSetter): (WebCore::setJSTestInterfaceIncludesNode): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod1Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod1): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod2Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod2): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod3Body): (WebCore::jsTestInterfacePrototypeFunctionIncludesMethod3): (WebCore::jsTestInterfaceConstructorFunctionIncludesMethod4Body): (WebCore::jsTestInterfaceConstructorFunctionIncludesMethod4): (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttrGetter): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticAttrGetter): Deleted. (WebCore::jsTestInterfaceConstructorImplementsStaticAttr): Deleted. (WebCore::setJSTestInterfaceConstructorImplementsStaticAttrSetter): Deleted. (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr): Deleted. (WebCore::jsTestInterfaceImplementsStr1Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr1): Deleted. (WebCore::jsTestInterfaceImplementsStr2Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr2): Deleted. (WebCore::setJSTestInterfaceImplementsStr2Setter): Deleted. (WebCore::setJSTestInterfaceImplementsStr2): Deleted. (WebCore::jsTestInterfaceImplementsStr3Getter): Deleted. (WebCore::jsTestInterfaceImplementsStr3): Deleted. (WebCore::setJSTestInterfaceImplementsStr3Setter): Deleted. (WebCore::setJSTestInterfaceImplementsStr3): Deleted. (WebCore::jsTestInterfaceImplementsNodeGetter): Deleted. (WebCore::jsTestInterfaceImplementsNode): Deleted. (WebCore::setJSTestInterfaceImplementsNodeSetter): Deleted. (WebCore::setJSTestInterfaceImplementsNode): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3Body): Deleted. (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3): Deleted. (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4Body): Deleted. (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4): Deleted. * bindings/scripts/test/JS/JSTestInterface.h: * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestImplements.idl: Removed. * bindings/scripts/test/TestIncludes.idl: Copied from Source/WebCore/bindings/scripts/test/TestImplements.idl. * bindings/scripts/test/TestInterface.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestOperationConditional.idl: * dom/CharacterData.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFragment.idl: * dom/DocumentType.idl: * dom/Element.idl: * dom/ShadowRoot.idl: * dom/Text.idl: * html/HTMLAnchorElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBodyElement.idl: * html/HTMLElement.idl: * html/HTMLFrameSetElement.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/PaintRenderingContext2D.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContext.idl: * page/DOMWindow.idl: * page/Navigator.idl: * page/WorkerNavigator.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAnimationElement.idl: * svg/SVGCursorElement.idl: * svg/SVGElement.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterElement.idl: * svg/SVGGlyphRefElement.idl: * svg/SVGGradientElement.idl: * svg/SVGGraphicsElement.idl: * svg/SVGImageElement.idl: * svg/SVGMPathElement.idl: * svg/SVGMarkerElement.idl: * svg/SVGMaskElement.idl: * svg/SVGPatternElement.idl: * svg/SVGSVGElement.idl: * svg/SVGScriptElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGUseElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ServiceWorker.idl: Canonical link: https://commits.webkit.org/228925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-03 16:27:46 +00:00
OffscreenCanvasRenderingContext2D includes CanvasPath;