haikuwebkit/Source/WebCore/html/canvas/CanvasFillStrokeStyles.idl

50 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

[Canvas] Split CanvasRenderingContext2D.idl into separate IDLs to match current HTML spec https://bugs.webkit.org/show_bug.cgi?id=176276 Reviewed by Dean Jackson. Source/WebCore: - Splits CanvasRenderingContext2D.idl out into: CanvasState CanvasTransform CanvasCompositing CanvasImageSmoothing CanvasFillStrokeStyles CanvasShadowStyles CanvasFilters CanvasRect CanvasDrawPath CanvasUserInterface CanvasText CanvasDrawImage CanvasImageData CanvasPathDrawingStyles CanvasTextDrawingStyles - Renames CanvasWindingRule enum to CanvasFillRule, and moves it to its own file so it can be reused by multiple IDLs. - Renames DOMPath to Path2D, which is what it is supposed to be called, and doesn't conflict with any WebCore names. - Converts lineCap, lineJoin, textAlign, textBaseline, direction to use enums, rather than DOMStrings, allowing us to remove a bunch of custom parsing. - Non-standard canvas API was grouped with related functionality in the broken out IDLs and clearly marked as non-standard. - Comments were added for places where we break with the standard, mostly around use of float where we should be using double. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/CallTracerTypes.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::buildInitialState): (WebCore::InspectorCanvas::buildAction): Update for renames, and use new convertEnumerationToString to serialize enumerations. * bindings/scripts/CodeGeneratorJS.pm: (GenerateEnumerationImplementationContent): (GenerateEnumerationHeaderContent): Split string conversion out of convertEnumerationToJS, and into its own function, convertEnumerationToString, to allow serialization to string outside of the bindings context, in this case, for the InspectorCanvas. (GenerateParametersCheck): Improve error message to make it clear which operation has the issue in order to make debugging easier. * html/ImageData.idl: Re-order constructors to match specification, and add FIXME for incorrect default argument. * html/TextMetrics.idl: Add spec'd exposure and spec comments, as well a FIXME to convert the unrestricted float parameters should be doubles. * html/canvas/CanvasCompositing.idl: Added. * html/canvas/CanvasDirection.h: Added. * html/canvas/CanvasDirection.idl: Added. * html/canvas/CanvasDrawImage.idl: Added. * html/canvas/CanvasDrawPath.idl: Added. * html/canvas/CanvasFillRule.h: Added. * html/canvas/CanvasFillRule.idl: Added. * html/canvas/CanvasFillStrokeStyles.idl: Added. * html/canvas/CanvasFilters.idl: Added. * html/canvas/CanvasImageData.idl: Added. * html/canvas/CanvasImageSmoothing.idl: Added. * html/canvas/CanvasLineCap.h: Added. * html/canvas/CanvasLineCap.idl: Added. * html/canvas/CanvasLineJoin.h: Added. * html/canvas/CanvasLineJoin.idl: Added. * html/canvas/CanvasPathDrawingStyles.idl: Added. * html/canvas/CanvasRect.idl: Added. * html/canvas/CanvasShadowStyles.idl: Added. * html/canvas/CanvasState.idl: Added. * html/canvas/CanvasText.idl: Added. * html/canvas/CanvasTextAlign.h: Added. * html/canvas/CanvasTextAlign.idl: Added. * html/canvas/CanvasTextBaseline.h: Added. * html/canvas/CanvasTextBaseline.idl: Added. * html/canvas/CanvasTextDrawingStyles.idl: Added. * html/canvas/CanvasTransform.idl: Added. * html/canvas/CanvasUserInterface.idl: Added. * html/canvas/ImageSmoothingQuality.h: Added. * html/canvas/ImageSmoothingQuality.idl: Added. Move CanvasRenderingContext2D.idl content into separate files to match the specification. * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPattern.idl: Add exposure and FIXMEs on changes need to match the spec. * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/CanvasRenderingContext2D.h: Switch to using enums for lineCap, lineJoin, textAlign, textBaseline, and direction. Rather than using the parsing / stringifying functions from GraphicsTypes, add simple switch based to/from converters to convert to/from the canvas type to the platform type. Also update for rename of DOMPath -> Path2D and WindingRule -> CanvasFillRule. Unfortunately, not all custom parsing could be removed. To support the legacy functions setLineCap and setLineJoin, which take Strings, two simply parse paths had to be brought back. They can't use the enums, because the rules for enums as parameters is stricter that what was implemented in the custom code (e.g. the bindings would have thrown for strings not in the enum set). * html/canvas/CanvasRenderingContext2D.idl: Move most of the functions into the new files, which are then 'implemented' by this. * html/canvas/DOMPath.cpp: Removed. * html/canvas/DOMPath.h: Removed. * html/canvas/DOMPath.idl: Removed. * html/canvas/Path2D.cpp: Copied from Source/WebCore/html/canvas/DOMPath.cpp. * html/canvas/Path2D.h: Copied from Source/WebCore/html/canvas/DOMPath.h. * html/canvas/Path2D.idl: Copied from Source/WebCore/html/canvas/DOMPath.idl. Rename DOMPath to Path2D to match the spec.. * platform/graphics/GraphicsTypes.cpp: (WebCore::parseLineCap): Deleted. (WebCore::lineCapName): Deleted. (WebCore::parseLineJoin): Deleted. (WebCore::lineJoinName): Deleted. (WebCore::textAlignName): Deleted. (WebCore::parseTextAlign): Deleted. (WebCore::textBaselineName): Deleted. (WebCore::parseTextBaseline): Deleted. * platform/graphics/GraphicsTypes.h: Remove now unused parsing / stringifying functions. * testing/Internals.cpp: Remove unused #include. * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h: Update test results to add convertEnumerationToString. LayoutTests: * fast/canvas/canvas-clip-path-expected.txt: * fast/canvas/canvas-fill-path-expected.txt: * fast/canvas/canvas-path-addPath-expected.txt: * fast/canvas/canvas-path-isPointInPath-expected.txt: * fast/canvas/canvas-path-isPointInStroke-expected.txt: * fast/canvas/canvas-stroke-path-expected.txt: * fast/canvas/winding-enumeration-expected.txt: * inspector/canvas/recording-2d-expected.txt: * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: Update results. Canonical link: https://commits.webkit.org/192969@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-05 00:23:03 +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. AND ITS CONTRIBUTORS ``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 ITS 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.
*/
Support OffscreenCanvas as a CanvasImageSource type in CanvasDrawImage, CanvasFillStrokeStyles https://bugs.webkit.org/show_bug.cgi?id=182921 Patch by Zan Dobersek <zdobersek@igalia.com> on 2019-11-25 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvas-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvascopy-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvascopy.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvaspattern-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvaspattern.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.copy-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.copy.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-atop-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-atop.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-in-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-in.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-in-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-in.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-out-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-out.worker-expected.txt: * web-platform-tests/offscreen-canvas/conformance-requirements/2d.voidreturn-expected.txt: * web-platform-tests/offscreen-canvas/conformance-requirements/2d.voidreturn.worker-expected.txt: * web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.canvas-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.1-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.1.worker-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.2-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.2.worker-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerocanvas-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.canvas-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.nocontext-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.zerocanvas-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas1-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas2-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.case-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.case.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.null-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.null.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.undefined-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognised-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker-expected.txt: * web-platform-tests/offscreen-canvas/image-smoothing/image.smoothing-expected.txt: * web-platform-tests/offscreen-canvas/image-smoothing/image.smoothing.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.alpha-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.alpha.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.basic-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.basic.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.1-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.1.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.2-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.2.worker-expected.txt: * web-platform-tests/offscreen-canvas/the-offscreen-canvas/initial.reset.pattern-expected.txt: * web-platform-tests/offscreen-canvas/the-offscreen-canvas/initial.reset.pattern.worker-expected.txt: Source/WebCore: No new tests. Covered by existing tests. * bindings/js/CallTracerTypes.h: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::size): (WebCore::CanvasRenderingContext2DBase::drawImage): * html/canvas/CanvasRenderingContext2DBase.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::indexForData): (WebCore::InspectorCanvas::buildAction): * inspector/InspectorCanvas.h: Canonical link: https://commits.webkit.org/217839@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-11-25 18:15:50 +00:00
// FIXME: This should include SVGImageElement.
typedef (HTMLImageElement or HTMLCanvasElement or ImageBitmap
#if defined(ENABLE_CSS_TYPED_OM) && ENABLE_CSS_TYPED_OM
Removal of "TypedOM" prefix for CSSOM Object names https://bugs.webkit.org/show_bug.cgi?id=229028 Patch by Johnson Zhou <qiaosong_zhou@apple.com> on 2021-08-12 Reviewed by Alex Christensen. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSStyleValueCustom.cpp: Renamed from Source/WebCore/bindings/js/JSTypedOMCSSStyleValueCustom.cpp. (WebCore::toJSNewlyCreated): (WebCore::toJS): * css/typedom/CSSNumericValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnitValue.cpp. * css/typedom/CSSNumericValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSNumericValue.h. * css/typedom/CSSNumericValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSNumericValue.idl. * css/typedom/CSSStyleImageValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSImageValue.cpp. (WebCore::CSSStyleImageValue::CSSStyleImageValue): (WebCore::CSSStyleImageValue::document const): * css/typedom/CSSStyleImageValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSImageValue.h. * css/typedom/CSSStyleImageValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSImageValue.idl. * css/typedom/CSSStyleValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSStyleValue.cpp. * css/typedom/CSSStyleValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSStyleValue.h. * css/typedom/CSSStyleValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSStyleValue.idl. * css/typedom/CSSUnitValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSNumericValue.cpp. * css/typedom/CSSUnitValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnitValue.h. * css/typedom/CSSUnitValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnitValue.idl. * css/typedom/CSSUnparsedValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnparsedValue.cpp. * css/typedom/CSSUnparsedValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnparsedValue.h. * css/typedom/CSSUnparsedValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnparsedValue.idl. * css/typedom/StylePropertyMapReadOnly.cpp: (WebCore::StylePropertyMapReadOnly::reifyValue): (WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault): * css/typedom/StylePropertyMapReadOnly.h: * css/typedom/StylePropertyMapReadOnly.idl: * dom/StyledElement.cpp: * html/CustomPaintImage.cpp: (WebCore::extractComputedProperty): (WebCore::CustomPaintImage::doCustomPaint): * html/ImageBitmap.cpp: (WebCore::ImageBitmap::createPromise): * html/ImageBitmap.h: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::checkOrigin): * html/canvas/CanvasRenderingContext.h: * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::size): (WebCore::CanvasRenderingContext2DBase::drawImage): (WebCore::CanvasRenderingContext2DBase::createPattern): * html/canvas/CanvasRenderingContext2DBase.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::processArgument): (WebCore::InspectorCanvas::indexForData): * inspector/InspectorCanvas.h: * inspector/InspectorCanvasCallTracer.cpp: * inspector/InspectorCanvasCallTracer.h: * inspector/agents/InspectorCanvasAgent.cpp: * page/WindowOrWorkerGlobalScope.idl: Canonical link: https://commits.webkit.org/240474@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 15:47:18 +00:00
or CSSStyleImageValue
[Canvas] Split CanvasRenderingContext2D.idl into separate IDLs to match current HTML spec https://bugs.webkit.org/show_bug.cgi?id=176276 Reviewed by Dean Jackson. Source/WebCore: - Splits CanvasRenderingContext2D.idl out into: CanvasState CanvasTransform CanvasCompositing CanvasImageSmoothing CanvasFillStrokeStyles CanvasShadowStyles CanvasFilters CanvasRect CanvasDrawPath CanvasUserInterface CanvasText CanvasDrawImage CanvasImageData CanvasPathDrawingStyles CanvasTextDrawingStyles - Renames CanvasWindingRule enum to CanvasFillRule, and moves it to its own file so it can be reused by multiple IDLs. - Renames DOMPath to Path2D, which is what it is supposed to be called, and doesn't conflict with any WebCore names. - Converts lineCap, lineJoin, textAlign, textBaseline, direction to use enums, rather than DOMStrings, allowing us to remove a bunch of custom parsing. - Non-standard canvas API was grouped with related functionality in the broken out IDLs and clearly marked as non-standard. - Comments were added for places where we break with the standard, mostly around use of float where we should be using double. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/CallTracerTypes.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::buildInitialState): (WebCore::InspectorCanvas::buildAction): Update for renames, and use new convertEnumerationToString to serialize enumerations. * bindings/scripts/CodeGeneratorJS.pm: (GenerateEnumerationImplementationContent): (GenerateEnumerationHeaderContent): Split string conversion out of convertEnumerationToJS, and into its own function, convertEnumerationToString, to allow serialization to string outside of the bindings context, in this case, for the InspectorCanvas. (GenerateParametersCheck): Improve error message to make it clear which operation has the issue in order to make debugging easier. * html/ImageData.idl: Re-order constructors to match specification, and add FIXME for incorrect default argument. * html/TextMetrics.idl: Add spec'd exposure and spec comments, as well a FIXME to convert the unrestricted float parameters should be doubles. * html/canvas/CanvasCompositing.idl: Added. * html/canvas/CanvasDirection.h: Added. * html/canvas/CanvasDirection.idl: Added. * html/canvas/CanvasDrawImage.idl: Added. * html/canvas/CanvasDrawPath.idl: Added. * html/canvas/CanvasFillRule.h: Added. * html/canvas/CanvasFillRule.idl: Added. * html/canvas/CanvasFillStrokeStyles.idl: Added. * html/canvas/CanvasFilters.idl: Added. * html/canvas/CanvasImageData.idl: Added. * html/canvas/CanvasImageSmoothing.idl: Added. * html/canvas/CanvasLineCap.h: Added. * html/canvas/CanvasLineCap.idl: Added. * html/canvas/CanvasLineJoin.h: Added. * html/canvas/CanvasLineJoin.idl: Added. * html/canvas/CanvasPathDrawingStyles.idl: Added. * html/canvas/CanvasRect.idl: Added. * html/canvas/CanvasShadowStyles.idl: Added. * html/canvas/CanvasState.idl: Added. * html/canvas/CanvasText.idl: Added. * html/canvas/CanvasTextAlign.h: Added. * html/canvas/CanvasTextAlign.idl: Added. * html/canvas/CanvasTextBaseline.h: Added. * html/canvas/CanvasTextBaseline.idl: Added. * html/canvas/CanvasTextDrawingStyles.idl: Added. * html/canvas/CanvasTransform.idl: Added. * html/canvas/CanvasUserInterface.idl: Added. * html/canvas/ImageSmoothingQuality.h: Added. * html/canvas/ImageSmoothingQuality.idl: Added. Move CanvasRenderingContext2D.idl content into separate files to match the specification. * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPattern.idl: Add exposure and FIXMEs on changes need to match the spec. * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/CanvasRenderingContext2D.h: Switch to using enums for lineCap, lineJoin, textAlign, textBaseline, and direction. Rather than using the parsing / stringifying functions from GraphicsTypes, add simple switch based to/from converters to convert to/from the canvas type to the platform type. Also update for rename of DOMPath -> Path2D and WindingRule -> CanvasFillRule. Unfortunately, not all custom parsing could be removed. To support the legacy functions setLineCap and setLineJoin, which take Strings, two simply parse paths had to be brought back. They can't use the enums, because the rules for enums as parameters is stricter that what was implemented in the custom code (e.g. the bindings would have thrown for strings not in the enum set). * html/canvas/CanvasRenderingContext2D.idl: Move most of the functions into the new files, which are then 'implemented' by this. * html/canvas/DOMPath.cpp: Removed. * html/canvas/DOMPath.h: Removed. * html/canvas/DOMPath.idl: Removed. * html/canvas/Path2D.cpp: Copied from Source/WebCore/html/canvas/DOMPath.cpp. * html/canvas/Path2D.h: Copied from Source/WebCore/html/canvas/DOMPath.h. * html/canvas/Path2D.idl: Copied from Source/WebCore/html/canvas/DOMPath.idl. Rename DOMPath to Path2D to match the spec.. * platform/graphics/GraphicsTypes.cpp: (WebCore::parseLineCap): Deleted. (WebCore::lineCapName): Deleted. (WebCore::parseLineJoin): Deleted. (WebCore::lineJoinName): Deleted. (WebCore::textAlignName): Deleted. (WebCore::parseTextAlign): Deleted. (WebCore::textBaselineName): Deleted. (WebCore::parseTextBaseline): Deleted. * platform/graphics/GraphicsTypes.h: Remove now unused parsing / stringifying functions. * testing/Internals.cpp: Remove unused #include. * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h: Update test results to add convertEnumerationToString. LayoutTests: * fast/canvas/canvas-clip-path-expected.txt: * fast/canvas/canvas-fill-path-expected.txt: * fast/canvas/canvas-path-addPath-expected.txt: * fast/canvas/canvas-path-isPointInPath-expected.txt: * fast/canvas/canvas-path-isPointInStroke-expected.txt: * fast/canvas/canvas-stroke-path-expected.txt: * fast/canvas/winding-enumeration-expected.txt: * inspector/canvas/recording-2d-expected.txt: * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: Update results. Canonical link: https://commits.webkit.org/192969@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-05 00:23:03 +00:00
#endif
Support OffscreenCanvas as a CanvasImageSource type in CanvasDrawImage, CanvasFillStrokeStyles https://bugs.webkit.org/show_bug.cgi?id=182921 Patch by Zan Dobersek <zdobersek@igalia.com> on 2019-11-25 Reviewed by Antti Koivisto. LayoutTests/imported/w3c: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvas-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvascopy-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvascopy.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvaspattern-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvaspattern.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.copy-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.copy.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-atop-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-atop.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-in-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.destination-in.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-in-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-in.worker-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-out-expected.txt: * web-platform-tests/offscreen-canvas/compositing/2d.composite.uncovered.nocontext.source-out.worker-expected.txt: * web-platform-tests/offscreen-canvas/conformance-requirements/2d.voidreturn-expected.txt: * web-platform-tests/offscreen-canvas/conformance-requirements/2d.voidreturn.worker-expected.txt: * web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.canvas-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.1-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.1.worker-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.2-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.self.2.worker-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerocanvas-expected.txt: * web-platform-tests/offscreen-canvas/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.canvas-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.nocontext-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.zerocanvas-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas1-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas2-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.case-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.case.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.null-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.null.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.undefined-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognised-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull-expected.txt: * web-platform-tests/offscreen-canvas/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker-expected.txt: * web-platform-tests/offscreen-canvas/image-smoothing/image.smoothing-expected.txt: * web-platform-tests/offscreen-canvas/image-smoothing/image.smoothing.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.alpha-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.alpha.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.basic-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.basic.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.1-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.1.worker-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.2-expected.txt: * web-platform-tests/offscreen-canvas/shadows/2d.shadow.canvas.transparent.2.worker-expected.txt: * web-platform-tests/offscreen-canvas/the-offscreen-canvas/initial.reset.pattern-expected.txt: * web-platform-tests/offscreen-canvas/the-offscreen-canvas/initial.reset.pattern.worker-expected.txt: Source/WebCore: No new tests. Covered by existing tests. * bindings/js/CallTracerTypes.h: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::size): (WebCore::CanvasRenderingContext2DBase::drawImage): * html/canvas/CanvasRenderingContext2DBase.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::indexForData): (WebCore::InspectorCanvas::buildAction): * inspector/InspectorCanvas.h: Canonical link: https://commits.webkit.org/217839@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-11-25 18:15:50 +00:00
#if defined(ENABLE_OFFSCREEN_CANVAS) && ENABLE_OFFSCREEN_CANVAS
or OffscreenCanvas
#endif
#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
or HTMLVideoElement
#endif
) CanvasImageSource;
[Canvas] Split CanvasRenderingContext2D.idl into separate IDLs to match current HTML spec https://bugs.webkit.org/show_bug.cgi?id=176276 Reviewed by Dean Jackson. Source/WebCore: - Splits CanvasRenderingContext2D.idl out into: CanvasState CanvasTransform CanvasCompositing CanvasImageSmoothing CanvasFillStrokeStyles CanvasShadowStyles CanvasFilters CanvasRect CanvasDrawPath CanvasUserInterface CanvasText CanvasDrawImage CanvasImageData CanvasPathDrawingStyles CanvasTextDrawingStyles - Renames CanvasWindingRule enum to CanvasFillRule, and moves it to its own file so it can be reused by multiple IDLs. - Renames DOMPath to Path2D, which is what it is supposed to be called, and doesn't conflict with any WebCore names. - Converts lineCap, lineJoin, textAlign, textBaseline, direction to use enums, rather than DOMStrings, allowing us to remove a bunch of custom parsing. - Non-standard canvas API was grouped with related functionality in the broken out IDLs and clearly marked as non-standard. - Comments were added for places where we break with the standard, mostly around use of float where we should be using double. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/CallTracerTypes.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::buildInitialState): (WebCore::InspectorCanvas::buildAction): Update for renames, and use new convertEnumerationToString to serialize enumerations. * bindings/scripts/CodeGeneratorJS.pm: (GenerateEnumerationImplementationContent): (GenerateEnumerationHeaderContent): Split string conversion out of convertEnumerationToJS, and into its own function, convertEnumerationToString, to allow serialization to string outside of the bindings context, in this case, for the InspectorCanvas. (GenerateParametersCheck): Improve error message to make it clear which operation has the issue in order to make debugging easier. * html/ImageData.idl: Re-order constructors to match specification, and add FIXME for incorrect default argument. * html/TextMetrics.idl: Add spec'd exposure and spec comments, as well a FIXME to convert the unrestricted float parameters should be doubles. * html/canvas/CanvasCompositing.idl: Added. * html/canvas/CanvasDirection.h: Added. * html/canvas/CanvasDirection.idl: Added. * html/canvas/CanvasDrawImage.idl: Added. * html/canvas/CanvasDrawPath.idl: Added. * html/canvas/CanvasFillRule.h: Added. * html/canvas/CanvasFillRule.idl: Added. * html/canvas/CanvasFillStrokeStyles.idl: Added. * html/canvas/CanvasFilters.idl: Added. * html/canvas/CanvasImageData.idl: Added. * html/canvas/CanvasImageSmoothing.idl: Added. * html/canvas/CanvasLineCap.h: Added. * html/canvas/CanvasLineCap.idl: Added. * html/canvas/CanvasLineJoin.h: Added. * html/canvas/CanvasLineJoin.idl: Added. * html/canvas/CanvasPathDrawingStyles.idl: Added. * html/canvas/CanvasRect.idl: Added. * html/canvas/CanvasShadowStyles.idl: Added. * html/canvas/CanvasState.idl: Added. * html/canvas/CanvasText.idl: Added. * html/canvas/CanvasTextAlign.h: Added. * html/canvas/CanvasTextAlign.idl: Added. * html/canvas/CanvasTextBaseline.h: Added. * html/canvas/CanvasTextBaseline.idl: Added. * html/canvas/CanvasTextDrawingStyles.idl: Added. * html/canvas/CanvasTransform.idl: Added. * html/canvas/CanvasUserInterface.idl: Added. * html/canvas/ImageSmoothingQuality.h: Added. * html/canvas/ImageSmoothingQuality.idl: Added. Move CanvasRenderingContext2D.idl content into separate files to match the specification. * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPattern.idl: Add exposure and FIXMEs on changes need to match the spec. * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/CanvasRenderingContext2D.h: Switch to using enums for lineCap, lineJoin, textAlign, textBaseline, and direction. Rather than using the parsing / stringifying functions from GraphicsTypes, add simple switch based to/from converters to convert to/from the canvas type to the platform type. Also update for rename of DOMPath -> Path2D and WindingRule -> CanvasFillRule. Unfortunately, not all custom parsing could be removed. To support the legacy functions setLineCap and setLineJoin, which take Strings, two simply parse paths had to be brought back. They can't use the enums, because the rules for enums as parameters is stricter that what was implemented in the custom code (e.g. the bindings would have thrown for strings not in the enum set). * html/canvas/CanvasRenderingContext2D.idl: Move most of the functions into the new files, which are then 'implemented' by this. * html/canvas/DOMPath.cpp: Removed. * html/canvas/DOMPath.h: Removed. * html/canvas/DOMPath.idl: Removed. * html/canvas/Path2D.cpp: Copied from Source/WebCore/html/canvas/DOMPath.cpp. * html/canvas/Path2D.h: Copied from Source/WebCore/html/canvas/DOMPath.h. * html/canvas/Path2D.idl: Copied from Source/WebCore/html/canvas/DOMPath.idl. Rename DOMPath to Path2D to match the spec.. * platform/graphics/GraphicsTypes.cpp: (WebCore::parseLineCap): Deleted. (WebCore::lineCapName): Deleted. (WebCore::parseLineJoin): Deleted. (WebCore::lineJoinName): Deleted. (WebCore::textAlignName): Deleted. (WebCore::parseTextAlign): Deleted. (WebCore::textBaselineName): Deleted. (WebCore::parseTextBaseline): Deleted. * platform/graphics/GraphicsTypes.h: Remove now unused parsing / stringifying functions. * testing/Internals.cpp: Remove unused #include. * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h: Update test results to add convertEnumerationToString. LayoutTests: * fast/canvas/canvas-clip-path-expected.txt: * fast/canvas/canvas-fill-path-expected.txt: * fast/canvas/canvas-path-addPath-expected.txt: * fast/canvas/canvas-path-isPointInPath-expected.txt: * fast/canvas/canvas-path-isPointInStroke-expected.txt: * fast/canvas/canvas-stroke-path-expected.txt: * fast/canvas/winding-enumeration-expected.txt: * inspector/canvas/recording-2d-expected.txt: * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: Update results. Canonical link: https://commits.webkit.org/192969@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-05 00:23:03 +00:00
[WebIDL] Add support for interface mixins https://bugs.webkit.org/show_bug.cgi?id=216217 Reviewed by Darin Adler. Implement support for WebIDL interface mixins, which are interface fragments that can be included into other interfaces (using an 'includes' statement), but do not create new types themselves. Prior to this, we have been emulating the behavior by allowing any interface to be included in another interface, and marking some interfaces with the [LegacyNoInterfaceObject] extended attribute. This change codifies that with in the spec approved way. - Updates IDL parser to parse mixin interfaces (and fixes the parsing of callback interfaces to be a bit more strict while I was there). - Updates IDL pre-processor to avoid creating global variables and IsoSubspaces for mixins. - Updates IDL code generator to only support including mixin interfaces during supplemental inclusion. - Updates IDL files to use interface mixin where appropriately specified. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * CMakeLists.txt: * DerivedSources-output.xcfilelist: * DerivedSources.make: * dom/DeviceOrientationOrMotionEvent.idl: Removed. Remove DeviceOrientationOrMotionEvent.idl and corresponding generated files, inlining it into DeviceMotionEvent.idl and DeviceOrientationEvent.idl as specified. This is needed as mixin interfaces do not support static operations or attributes. * bindings/scripts/CodeGenerator.pm: (IsValidSupplementalInterface): (IsValidSupplementalDictionary): (ProcessSupplementalDependencies): (GetInterfaceExtendedAttributesFromName): Update IDL code generator to only support including mixin interfaces during supplemental inclusion. Also removes some left of remnents of exception interface support. * bindings/scripts/IDLParser.pm: (parseCallbackRestOrInterface): (parseCallbackInterface): (parseCallbackInterfaceMembers): (parseCallbackInterfaceMember): (parseMixin): (parseMixinMembers): (parseMixinMember): (parseNamespace): (parsePartialInterfaceMember): (parseAttributeOrOperationForStringifierOrStatic): Update IDL parser to parse mixin interfaces and fix the parsing of callback interfaces to match the spec by restricting its members to constants and regular functions. * bindings/scripts/preprocess-idls.pl: (isMixinInterfaceFromIDL): (containsInterfaceFromIDL): (getInterfaceExtendedAttributesFromIDL): (containsInterfaceOrExceptionFromIDL): Deleted. Ensure mixin interfaces don't get exposed on any global objects and remove some left of remnents of exception interface support. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp: Added. * bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.h: Added. * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestIncludes.idl: * bindings/scripts/test/TestLegacyNoInterfaceObject.idl: Added. * bindings/scripts/test/TestOperationBase.idl: Update bindings tests to use mixins for includes. Add new dedicated [LegacyNoInterfaceObject] since it was no longer being tested. * Modules/fetch/FetchBody.idl: * Modules/mediasource/VideoPlaybackQuality.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/speech/SpeechSynthesisVoice.idl: * Modules/streams/ReadableStreamSink.idl: * accessibility/AccessibilityRole.idl: * accessibility/AriaAttributes.idl: * animation/Animatable.idl: * css/ElementCSSInlineStyle.idl: * css/StyleMedia.idl: * dom/ChildNode.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentAndElementEventHandlers.idl: * dom/DocumentOrShadowRoot.idl: * dom/EventListener.idl: * dom/GlobalEventHandlers.idl: * dom/NavigatorMaxTouchPoints.idl: * dom/NonDocumentTypeChildNode.idl: * dom/NonElementParentNode.idl: * dom/ParentNode.idl: * dom/Slotable.idl: * html/HTMLHyperlinkElementUtils.idl: * html/HTMLOrForeignElement.idl: * html/canvas/CanvasCompositing.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasFilters.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasImageSmoothing.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasShadowStyles.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTextDrawingStyles.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/WebGLRenderingContextBase.idl: * page/GlobalCrypto.idl: * page/GlobalPerformance.idl: * page/Navigator.idl: * page/NavigatorID.idl: * page/NavigatorLanguage.idl: * page/NavigatorOnLine.idl: * page/NavigatorPlugins.idl: * page/NavigatorServiceWorker.idl: * page/NavigatorShare.idl: * page/WindowEventHandlers.idl: * page/WindowOrWorkerGlobalScope.idl: * svg/SVGFilterPrimitiveStandardAttributes.idl: * svg/SVGFitToViewBox.idl: * svg/SVGTests.idl: * svg/SVGURIReference.idl: * svg/SVGZoomAndPan.idl: * workers/AbstractWorker.idl: * xml/XPathEvaluator.idl: * xml/XPathNSResolver.idl: Update IDLs. Canonical link: https://commits.webkit.org/229047@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-06 02:49:22 +00:00
// https://html.spec.whatwg.org/multipage/canvas.html#canvasfillstrokestyles
[WebIDL] Make Exposed mandatory for IDL interfaces https://bugs.webkit.org/show_bug.cgi?id=217101 Reviewed by Darin Adler. Add [Exposed] to all IDL interfaces that were missing it and enforce its requirement. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/preprocess-idls.pl: Remove default "Window" exposed behavior and require it on all interfaces and callback interfaces with constants that don't specify LegacyNoInterfaceObject. * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl: * Modules/applepay/ApplePayError.idl: * Modules/applepay/ApplePaySession.idl: * Modules/applepay/ApplePaySetup.idl: * Modules/applepay/ApplePaySetupFeature.idl: * Modules/encryptedmedia/MediaKeyEncryptionScheme.idl: * Modules/encryptedmedia/MediaKeyMessageEvent.idl: * Modules/encryptedmedia/MediaKeySession.idl: * Modules/encryptedmedia/MediaKeySessionType.idl: * Modules/encryptedmedia/MediaKeyStatusMap.idl: * Modules/encryptedmedia/MediaKeySystemAccess.idl: * Modules/encryptedmedia/MediaKeys.idl: * Modules/encryptedmedia/MediaKeysRequirement.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: * Modules/entriesapi/DOMFileSystem.idl: * Modules/entriesapi/FileSystemDirectoryEntry.idl: * Modules/entriesapi/FileSystemDirectoryReader.idl: * Modules/entriesapi/FileSystemEntry.idl: * Modules/entriesapi/FileSystemFileEntry.idl: * Modules/gamepad/Gamepad.idl: * Modules/gamepad/GamepadButton.idl: * Modules/gamepad/GamepadEvent.idl: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/GeolocationCoordinates.idl: * Modules/geolocation/GeolocationPosition.idl: * Modules/geolocation/GeolocationPositionError.idl: * Modules/geolocation/PositionOptions.idl: * Modules/highlight/HighlightMap.idl: * Modules/highlight/HighlightRangeGroup.idl: * Modules/mediacapabilities/AudioConfiguration.idl: * Modules/mediacapabilities/MediaCapabilities.idl: * Modules/mediacapabilities/MediaCapabilitiesDecodingInfo.idl: * Modules/mediacapabilities/MediaCapabilitiesEncodingInfo.idl: * Modules/mediacapabilities/MediaCapabilitiesInfo.idl: * Modules/mediacapabilities/MediaDecodingConfiguration.idl: * Modules/mediacapabilities/MediaEncodingConfiguration.idl: * Modules/mediacapabilities/VideoConfiguration.idl: * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediasource/SourceBufferList.idl: * Modules/mediastream/CanvasCaptureMediaStreamTrack.idl: * Modules/mediastream/MediaDeviceInfo.idl: * Modules/mediastream/MediaDevices.idl: * Modules/mediastream/MediaStream.idl: * Modules/mediastream/MediaStreamTrack.idl: * Modules/mediastream/MediaStreamTrackEvent.idl: * Modules/mediastream/OverconstrainedError.idl: * Modules/mediastream/OverconstrainedErrorEvent.idl: * Modules/mediastream/RTCCertificate.idl: * Modules/mediastream/RTCConfiguration.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDTMFToneChangeEvent.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCDataChannelEvent.idl: * Modules/mediastream/RTCIceCandidate.idl: * Modules/mediastream/RTCIceTransport.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCPeerConnectionIceEvent.idl: * Modules/mediastream/RTCRtpReceiver.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/mediastream/RTCSessionDescription.idl: * Modules/mediastream/RTCStatsReport.idl: * Modules/mediastream/RTCTrackEvent.idl: * Modules/notifications/Notification.idl: * Modules/paymentrequest/PaymentRequest.idl: * Modules/remoteplayback/RemotePlayback.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/speech/SpeechSynthesisEvent.idl: * Modules/speech/SpeechSynthesisUtterance.idl: * Modules/speech/SpeechSynthesisVoice.idl: * Modules/webaudio/AnalyserNode.idl: * Modules/webaudio/AudioBuffer.idl: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioDestinationNode.idl: * Modules/webaudio/AudioListener.idl: * Modules/webaudio/AudioNode.idl: * Modules/webaudio/AudioParam.idl: * Modules/webaudio/AudioParamMap.idl: * Modules/webaudio/AudioProcessingEvent.idl: * Modules/webaudio/AudioScheduledSourceNode.idl: * Modules/webaudio/BaseAudioContext.idl: * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/ChannelMergerNode.idl: * Modules/webaudio/ChannelSplitterNode.idl: * Modules/webaudio/ConstantSourceNode.idl: * Modules/webaudio/ConvolverNode.idl: * Modules/webaudio/DelayNode.idl: * Modules/webaudio/DynamicsCompressorNode.idl: * Modules/webaudio/GainNode.idl: * Modules/webaudio/IIRFilterNode.idl: * Modules/webaudio/MediaElementAudioSourceNode.idl: * Modules/webaudio/MediaStreamAudioDestinationNode.idl: * Modules/webaudio/MediaStreamAudioSourceNode.idl: * Modules/webaudio/OfflineAudioCompletionEvent.idl: * Modules/webaudio/OfflineAudioContext.idl: * Modules/webaudio/OscillatorNode.idl: * Modules/webaudio/PannerNode.idl: * Modules/webaudio/PeriodicWave.idl: * Modules/webaudio/ScriptProcessorNode.idl: * Modules/webaudio/StereoPannerNode.idl: * Modules/webaudio/WaveShaperNode.idl: * Modules/webaudio/WebKitAudioContext.idl: * Modules/webaudio/WebKitAudioPannerNode.idl: * Modules/webaudio/WebKitOfflineAudioContext.idl: * Modules/webdatabase/Database.idl: * Modules/webdatabase/SQLError.idl: * Modules/webdatabase/SQLResultSet.idl: * Modules/webdatabase/SQLResultSetRowList.idl: * Modules/webdatabase/SQLTransaction.idl: * Modules/webgpu/GPUBufferUsage.idl: * Modules/webgpu/GPUCanvasContext.idl: * Modules/webgpu/GPUColorWrite.idl: * Modules/webgpu/GPUOutOfMemoryError.idl: * Modules/webgpu/GPUShaderStage.idl: * Modules/webgpu/GPUTextureUsage.idl: * Modules/webgpu/GPUValidationError.idl: * Modules/webgpu/Navigator+GPU.idl: * Modules/webgpu/WebGPU.idl: * Modules/webgpu/WebGPUAdapter.idl: * Modules/webgpu/WebGPUBindGroup.idl: * Modules/webgpu/WebGPUBindGroupLayout.idl: * Modules/webgpu/WebGPUBuffer.idl: * Modules/webgpu/WebGPUCommandBuffer.idl: * Modules/webgpu/WebGPUCommandEncoder.idl: * Modules/webgpu/WebGPUComputePassEncoder.idl: * Modules/webgpu/WebGPUComputePipeline.idl: * Modules/webgpu/WebGPUDevice.idl: * Modules/webgpu/WebGPUPipelineLayout.idl: * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: * Modules/webgpu/WebGPUQueue.idl: * Modules/webgpu/WebGPURenderPassEncoder.idl: * Modules/webgpu/WebGPURenderPipeline.idl: * Modules/webgpu/WebGPUSampler.idl: * Modules/webgpu/WebGPUShaderModule.idl: * Modules/webgpu/WebGPUSwapChain.idl: * Modules/webgpu/WebGPUTexture.idl: * Modules/webgpu/WebGPUTextureView.idl: * Modules/webxr/XRInputSourceEvent.idl: * Modules/webxr/XRInputSourcesChangeEvent.idl: * Modules/webxr/XRReferenceSpaceEvent.idl: * Modules/webxr/XRSessionEvent.idl: * WebCore.xcodeproj/project.pbxproj: * animation/AnimationPlaybackEvent.idl: * animation/AnimationTimeline.idl: * animation/DocumentTimeline.idl: * animation/WebAnimation.idl: * css/CSSConditionRule.idl: * css/CSSFontFaceRule.idl: * css/CSSGroupingRule.idl: * css/CSSImportRule.idl: * css/CSSKeyframeRule.idl: * css/CSSKeyframesRule.idl: * css/CSSMediaRule.idl: * css/CSSNamespaceRule.idl: * css/CSSPageRule.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleRule.idl: * css/CSSStyleSheet.idl: * css/CSSSupportsRule.idl: * css/DOMCSSNamespace.idl: * css/DeprecatedCSSOMCounter.idl: * css/DeprecatedCSSOMPrimitiveValue.idl: * css/DeprecatedCSSOMRGBColor.idl: * css/DeprecatedCSSOMRect.idl: * css/DeprecatedCSSOMValue.idl: * css/DeprecatedCSSOMValueList.idl: * css/FontFace.idl: * css/FontFaceSet.idl: * css/MediaQueryListEvent.idl: * css/typedom/StylePropertyMap.idl: * dom/AbortAlgorithm.idl: * dom/AnimationEvent.idl: * dom/Attr.idl: * dom/BeforeLoadEvent.idl: * dom/BeforeUnloadEvent.idl: * dom/CDATASection.idl: * dom/CharacterData.idl: * dom/ClipboardEvent.idl: * dom/Comment.idl: * dom/CompositionEvent.idl: * dom/CustomElementRegistry.idl: * dom/DOMImplementation.idl: * dom/DOMRectList.idl: * dom/DOMStringList.idl: * dom/DOMStringMap.idl: * dom/DataTransfer.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFragment.idl: * dom/DocumentType.idl: * dom/DragEvent.idl: * dom/Element.idl: * dom/FocusEvent.idl: * dom/HashChangeEvent.idl: * dom/IdleDeadline.idl: * dom/InputEvent.idl: * dom/KeyboardEvent.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/MutationObserver.idl: * dom/MutationRecord.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeFilter.idl: * dom/NodeIterator.idl: * dom/NodeList.idl: * dom/OverflowEvent.idl: * dom/PageTransitionEvent.idl: * dom/PopStateEvent.idl: * dom/ProcessingInstruction.idl: * dom/Range.idl: * dom/SecurityPolicyViolationEvent.idl: * dom/ShadowRoot.idl: * dom/StaticRange.idl: * dom/Text.idl: * dom/TextEvent.idl: * dom/Touch.idl: * dom/TouchEvent.idl: * dom/TouchList.idl: * dom/TransitionEvent.idl: * dom/TreeWalker.idl: * dom/UIEvent.idl: * dom/WebKitAnimationEvent.idl: * dom/WebKitTransitionEvent.idl: * dom/WheelEvent.idl: * dom/XMLDocument.idl: * html/DOMTokenList.idl: * html/HTMLAllCollection.idl: * html/HTMLAnchorElement.idl: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.idl: * html/HTMLAttachmentElement.idl: * html/HTMLAudioElement.idl: * html/HTMLBRElement.idl: * html/HTMLBaseElement.idl: * html/HTMLBodyElement.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLCollection.idl: * html/HTMLDListElement.idl: * html/HTMLDataElement.idl: * html/HTMLDataListElement.idl: * html/HTMLDetailsElement.idl: * html/HTMLDirectoryElement.idl: * html/HTMLDivElement.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFontElement.idl: * html/HTMLFormControlsCollection.idl: * html/HTMLFormElement.idl: * html/HTMLFrameElement.idl: * html/HTMLFrameSetElement.idl: * html/HTMLHRElement.idl: * html/HTMLHeadElement.idl: * html/HTMLHeadingElement.idl: * html/HTMLHtmlElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLLIElement.idl: * html/HTMLLabelElement.idl: * html/HTMLLegendElement.idl: * html/HTMLLinkElement.idl: * html/HTMLMapElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMediaElement.idl: * html/HTMLMenuElement.idl: * html/HTMLMenuItemElement.idl: * html/HTMLMetaElement.idl: * html/HTMLMeterElement.idl: * html/HTMLModElement.idl: * html/HTMLOListElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptGroupElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLOutputElement.idl: * html/HTMLParagraphElement.idl: * html/HTMLParamElement.idl: * html/HTMLPictureElement.idl: * html/HTMLPreElement.idl: * html/HTMLProgressElement.idl: * html/HTMLQuoteElement.idl: * html/HTMLScriptElement.idl: * html/HTMLSelectElement.idl: * html/HTMLSlotElement.idl: * html/HTMLSourceElement.idl: * html/HTMLSpanElement.idl: * html/HTMLStyleElement.idl: * html/HTMLTableCaptionElement.idl: * html/HTMLTableCellElement.idl: * html/HTMLTableColElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTemplateElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLTimeElement.idl: * html/HTMLTitleElement.idl: * html/HTMLTrackElement.idl: * html/HTMLUListElement.idl: * html/HTMLUnknownElement.idl: * html/HTMLVideoElement.idl: * html/MediaController.idl: * html/MediaEncryptedEvent.idl: * html/MediaError.idl: * html/RadioNodeList.idl: * html/TimeRanges.idl: * html/ValidityState.idl: * html/WebKitMediaKeyError.idl: * html/canvas/CanvasCompositing.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasFilters.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasImageSmoothing.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/CanvasShadowStyles.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTextDrawingStyles.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/PaintRenderingContext2D.idl: * html/canvas/WebGLActiveInfo.idl: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextEvent.idl: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLQuery.idl: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLSampler.idl: * html/canvas/WebGLShader.idl: * html/canvas/WebGLShaderPrecisionFormat.idl: * html/canvas/WebGLSync.idl: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLTransformFeedback.idl: * html/canvas/WebGLUniformLocation.idl: * html/canvas/WebGLVertexArrayObject.idl: * html/track/AudioTrack.idl: * html/track/AudioTrackList.idl: * html/track/DataCue.idl: * html/track/TextTrack.idl: * html/track/TextTrackCue.idl: * html/track/TextTrackCueGeneric.idl: * html/track/TextTrackCueList.idl: * html/track/TextTrackList.idl: * html/track/TrackEvent.idl: * html/track/VTTCue.idl: * html/track/VTTRegion.idl: * html/track/VTTRegionList.idl: * html/track/VideoTrack.idl: * html/track/VideoTrackList.idl: * loader/appcache/DOMApplicationCache.idl: * mathml/MathMLElement.idl: * mathml/MathMLMathElement.idl: * page/BarProp.idl: * page/Crypto.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/GlobalCrypto.idl: * page/GlobalPerformance.idl: * page/History.idl: * page/IntersectionObserver.idl: * page/IntersectionObserverEntry.idl: * page/Location.idl: * page/Navigator+IsLoggedIn.idl: * page/Navigator.idl: * page/PerformanceNavigation.idl: * page/PerformancePaintTiming.idl: * page/PerformanceTiming.idl: * page/RemoteDOMWindow.idl: * page/ResizeObserver.idl: * page/ResizeObserverEntry.idl: * page/Screen.idl: * page/UndoItem.idl: * page/UndoManager.idl: * page/UserMessageHandler.idl: * page/UserMessageHandlersNamespace.idl: * page/VisualViewport.idl: * page/WebKitNamespace.idl: * page/WebKitPoint.idl: * plugins/DOMMimeType.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * svg/SVGAElement.idl: * svg/SVGAltGlyphDefElement.idl: * svg/SVGAltGlyphElement.idl: * svg/SVGAltGlyphItemElement.idl: * svg/SVGAngle.idl: * svg/SVGAnimateColorElement.idl: * svg/SVGAnimateElement.idl: * svg/SVGAnimateMotionElement.idl: * svg/SVGAnimateTransformElement.idl: * svg/SVGAnimatedAngle.idl: * svg/SVGAnimatedBoolean.idl: * svg/SVGAnimatedEnumeration.idl: * svg/SVGAnimatedInteger.idl: * svg/SVGAnimatedLength.idl: * svg/SVGAnimatedLengthList.idl: * svg/SVGAnimatedNumber.idl: * svg/SVGAnimatedNumberList.idl: * svg/SVGAnimatedPreserveAspectRatio.idl: * svg/SVGAnimatedRect.idl: * svg/SVGAnimatedString.idl: * svg/SVGAnimatedTransformList.idl: * svg/SVGAnimationElement.idl: * svg/SVGCircleElement.idl: * svg/SVGClipPathElement.idl: * svg/SVGComponentTransferFunctionElement.idl: * svg/SVGCursorElement.idl: * svg/SVGDefsElement.idl: * svg/SVGDescElement.idl: * svg/SVGElement.idl: * svg/SVGEllipseElement.idl: * svg/SVGFEBlendElement.idl: * svg/SVGFEColorMatrixElement.idl: * svg/SVGFEComponentTransferElement.idl: * svg/SVGFECompositeElement.idl: * svg/SVGFEConvolveMatrixElement.idl: * svg/SVGFEDiffuseLightingElement.idl: * svg/SVGFEDisplacementMapElement.idl: * svg/SVGFEDistantLightElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEFloodElement.idl: * svg/SVGFEFuncAElement.idl: * svg/SVGFEFuncBElement.idl: * svg/SVGFEFuncGElement.idl: * svg/SVGFEFuncRElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEImageElement.idl: * svg/SVGFEMergeElement.idl: * svg/SVGFEMergeNodeElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGFEOffsetElement.idl: * svg/SVGFEPointLightElement.idl: * svg/SVGFESpecularLightingElement.idl: * svg/SVGFESpotLightElement.idl: * svg/SVGFETileElement.idl: * svg/SVGFETurbulenceElement.idl: * svg/SVGFilterElement.idl: * svg/SVGFontElement.idl: * svg/SVGFontFaceElement.idl: * svg/SVGFontFaceFormatElement.idl: * svg/SVGFontFaceNameElement.idl: * svg/SVGFontFaceSrcElement.idl: * svg/SVGFontFaceUriElement.idl: * svg/SVGForeignObjectElement.idl: * svg/SVGGElement.idl: * svg/SVGGeometryElement.idl: * svg/SVGGlyphElement.idl: * svg/SVGGlyphRefElement.idl: * svg/SVGGradientElement.idl: * svg/SVGGraphicsElement.idl: * svg/SVGHKernElement.idl: * svg/SVGImageElement.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGLineElement.idl: * svg/SVGLinearGradientElement.idl: * svg/SVGMPathElement.idl: * svg/SVGMarkerElement.idl: * svg/SVGMaskElement.idl: * svg/SVGMatrix.idl: * svg/SVGMetadataElement.idl: * svg/SVGMissingGlyphElement.idl: * svg/SVGNumber.idl: * svg/SVGNumberList.idl: * svg/SVGPathElement.idl: * svg/SVGPathSeg.idl: * svg/SVGPathSegArcAbs.idl: * svg/SVGPathSegArcRel.idl: * svg/SVGPathSegClosePath.idl: * svg/SVGPathSegCurvetoCubicAbs.idl: * svg/SVGPathSegCurvetoCubicRel.idl: * svg/SVGPathSegCurvetoCubicSmoothAbs.idl: * svg/SVGPathSegCurvetoCubicSmoothRel.idl: * svg/SVGPathSegCurvetoQuadraticAbs.idl: * svg/SVGPathSegCurvetoQuadraticRel.idl: * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl: * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl: * svg/SVGPathSegLinetoAbs.idl: * svg/SVGPathSegLinetoHorizontalAbs.idl: * svg/SVGPathSegLinetoHorizontalRel.idl: * svg/SVGPathSegLinetoRel.idl: * svg/SVGPathSegLinetoVerticalAbs.idl: * svg/SVGPathSegLinetoVerticalRel.idl: * svg/SVGPathSegList.idl: * svg/SVGPathSegMovetoAbs.idl: * svg/SVGPathSegMovetoRel.idl: * svg/SVGPatternElement.idl: * svg/SVGPoint.idl: * svg/SVGPointList.idl: * svg/SVGPolygonElement.idl: * svg/SVGPolylineElement.idl: * svg/SVGPreserveAspectRatio.idl: * svg/SVGRadialGradientElement.idl: * svg/SVGRect.idl: * svg/SVGRectElement.idl: * svg/SVGRenderingIntent.idl: * svg/SVGSVGElement.idl: * svg/SVGScriptElement.idl: * svg/SVGSetElement.idl: * svg/SVGStopElement.idl: * svg/SVGStringList.idl: * svg/SVGStyleElement.idl: * svg/SVGSwitchElement.idl: * svg/SVGSymbolElement.idl: * svg/SVGTRefElement.idl: * svg/SVGTSpanElement.idl: * svg/SVGTextContentElement.idl: * svg/SVGTextElement.idl: * svg/SVGTextPathElement.idl: * svg/SVGTextPositioningElement.idl: * svg/SVGTitleElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * svg/SVGUnitTypes.idl: * svg/SVGUseElement.idl: * svg/SVGVKernElement.idl: * svg/SVGViewElement.idl: * svg/SVGViewSpec.idl: * svg/SVGZoomEvent.idl: * workers/Worker.idl: * workers/service/ExtendableEvent.idl: * workers/service/ExtendableEventInit.idl: * workers/service/FetchEvent.idl: * worklets/Worklet.idl: * xml/DOMParser.idl: * xml/XMLHttpRequestProgressEvent.idl: * xml/XMLSerializer.idl: * xml/XPathEvaluator.idl: * xml/XPathExpression.idl: * xml/XPathResult.idl: * xml/XSLTProcessor.idl: Canonical link: https://commits.webkit.org/229932@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-01 00:15:51 +00:00
interface mixin CanvasFillStrokeStyles {
[Canvas] Split CanvasRenderingContext2D.idl into separate IDLs to match current HTML spec https://bugs.webkit.org/show_bug.cgi?id=176276 Reviewed by Dean Jackson. Source/WebCore: - Splits CanvasRenderingContext2D.idl out into: CanvasState CanvasTransform CanvasCompositing CanvasImageSmoothing CanvasFillStrokeStyles CanvasShadowStyles CanvasFilters CanvasRect CanvasDrawPath CanvasUserInterface CanvasText CanvasDrawImage CanvasImageData CanvasPathDrawingStyles CanvasTextDrawingStyles - Renames CanvasWindingRule enum to CanvasFillRule, and moves it to its own file so it can be reused by multiple IDLs. - Renames DOMPath to Path2D, which is what it is supposed to be called, and doesn't conflict with any WebCore names. - Converts lineCap, lineJoin, textAlign, textBaseline, direction to use enums, rather than DOMStrings, allowing us to remove a bunch of custom parsing. - Non-standard canvas API was grouped with related functionality in the broken out IDLs and clearly marked as non-standard. - Comments were added for places where we break with the standard, mostly around use of float where we should be using double. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/CallTracerTypes.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::buildInitialState): (WebCore::InspectorCanvas::buildAction): Update for renames, and use new convertEnumerationToString to serialize enumerations. * bindings/scripts/CodeGeneratorJS.pm: (GenerateEnumerationImplementationContent): (GenerateEnumerationHeaderContent): Split string conversion out of convertEnumerationToJS, and into its own function, convertEnumerationToString, to allow serialization to string outside of the bindings context, in this case, for the InspectorCanvas. (GenerateParametersCheck): Improve error message to make it clear which operation has the issue in order to make debugging easier. * html/ImageData.idl: Re-order constructors to match specification, and add FIXME for incorrect default argument. * html/TextMetrics.idl: Add spec'd exposure and spec comments, as well a FIXME to convert the unrestricted float parameters should be doubles. * html/canvas/CanvasCompositing.idl: Added. * html/canvas/CanvasDirection.h: Added. * html/canvas/CanvasDirection.idl: Added. * html/canvas/CanvasDrawImage.idl: Added. * html/canvas/CanvasDrawPath.idl: Added. * html/canvas/CanvasFillRule.h: Added. * html/canvas/CanvasFillRule.idl: Added. * html/canvas/CanvasFillStrokeStyles.idl: Added. * html/canvas/CanvasFilters.idl: Added. * html/canvas/CanvasImageData.idl: Added. * html/canvas/CanvasImageSmoothing.idl: Added. * html/canvas/CanvasLineCap.h: Added. * html/canvas/CanvasLineCap.idl: Added. * html/canvas/CanvasLineJoin.h: Added. * html/canvas/CanvasLineJoin.idl: Added. * html/canvas/CanvasPathDrawingStyles.idl: Added. * html/canvas/CanvasRect.idl: Added. * html/canvas/CanvasShadowStyles.idl: Added. * html/canvas/CanvasState.idl: Added. * html/canvas/CanvasText.idl: Added. * html/canvas/CanvasTextAlign.h: Added. * html/canvas/CanvasTextAlign.idl: Added. * html/canvas/CanvasTextBaseline.h: Added. * html/canvas/CanvasTextBaseline.idl: Added. * html/canvas/CanvasTextDrawingStyles.idl: Added. * html/canvas/CanvasTransform.idl: Added. * html/canvas/CanvasUserInterface.idl: Added. * html/canvas/ImageSmoothingQuality.h: Added. * html/canvas/ImageSmoothingQuality.idl: Added. Move CanvasRenderingContext2D.idl content into separate files to match the specification. * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPattern.idl: Add exposure and FIXMEs on changes need to match the spec. * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/CanvasRenderingContext2D.h: Switch to using enums for lineCap, lineJoin, textAlign, textBaseline, and direction. Rather than using the parsing / stringifying functions from GraphicsTypes, add simple switch based to/from converters to convert to/from the canvas type to the platform type. Also update for rename of DOMPath -> Path2D and WindingRule -> CanvasFillRule. Unfortunately, not all custom parsing could be removed. To support the legacy functions setLineCap and setLineJoin, which take Strings, two simply parse paths had to be brought back. They can't use the enums, because the rules for enums as parameters is stricter that what was implemented in the custom code (e.g. the bindings would have thrown for strings not in the enum set). * html/canvas/CanvasRenderingContext2D.idl: Move most of the functions into the new files, which are then 'implemented' by this. * html/canvas/DOMPath.cpp: Removed. * html/canvas/DOMPath.h: Removed. * html/canvas/DOMPath.idl: Removed. * html/canvas/Path2D.cpp: Copied from Source/WebCore/html/canvas/DOMPath.cpp. * html/canvas/Path2D.h: Copied from Source/WebCore/html/canvas/DOMPath.h. * html/canvas/Path2D.idl: Copied from Source/WebCore/html/canvas/DOMPath.idl. Rename DOMPath to Path2D to match the spec.. * platform/graphics/GraphicsTypes.cpp: (WebCore::parseLineCap): Deleted. (WebCore::lineCapName): Deleted. (WebCore::parseLineJoin): Deleted. (WebCore::lineJoinName): Deleted. (WebCore::textAlignName): Deleted. (WebCore::parseTextAlign): Deleted. (WebCore::textBaselineName): Deleted. (WebCore::parseTextBaseline): Deleted. * platform/graphics/GraphicsTypes.h: Remove now unused parsing / stringifying functions. * testing/Internals.cpp: Remove unused #include. * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h: Update test results to add convertEnumerationToString. LayoutTests: * fast/canvas/canvas-clip-path-expected.txt: * fast/canvas/canvas-fill-path-expected.txt: * fast/canvas/canvas-path-addPath-expected.txt: * fast/canvas/canvas-path-isPointInPath-expected.txt: * fast/canvas/canvas-path-isPointInStroke-expected.txt: * fast/canvas/canvas-stroke-path-expected.txt: * fast/canvas/winding-enumeration-expected.txt: * inspector/canvas/recording-2d-expected.txt: * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: Update results. Canonical link: https://commits.webkit.org/192969@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-05 00:23:03 +00:00
// colors and styles (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces)
attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
Implement CanvasRenderingContext2D.createConicGradient https://bugs.webkit.org/show_bug.cgi?id=225539 Reviewed by Sam Weinig. LayoutTests/imported/w3c: * web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic-expected.txt: Source/WebCore: Proposal document: https://github.com/fserb/canvas2D/blob/master/spec/conic-gradient.md MDN documentation: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createConicGradient Tests: fast/canvas/canvas-conic-gradient-angle.html fast/canvas/canvas-conic-gradient-center.html fast/canvas/conicGradient-infinite-values.html * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasGradient.cpp: (WebCore::CanvasGradient::CanvasGradient): (WebCore::m_canvas): (WebCore::CanvasGradient::create): * html/canvas/CanvasGradient.h: * html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::createConicGradient): * html/canvas/CanvasRenderingContext2DBase.h: Source/WebInspectorUI: * UserInterface/Models/NativeFunctionParameters.js: * UserInterface/Models/Recording.js: (WI.Recording.prototype.async swizzle): * UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._classNameForAction): LayoutTests: * fast/canvas/canvas-conic-gradient-angle-expected.html: Added. * fast/canvas/canvas-conic-gradient-angle.html: Added. * fast/canvas/canvas-conic-gradient-center-expected.html: Added. * fast/canvas/canvas-conic-gradient-center.html: Added. * fast/canvas/conicGradient-infinite-values-expected.txt: Added. * fast/canvas/conicGradient-infinite-values.html: Added. * inspector/canvas/recording-html-2d-expected.txt: * inspector/canvas/recording-html-2d.html: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/237775@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-15 20:46:56 +00:00
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
CanvasGradient createConicGradient(double angle, double x, double y);
[WebIDL] Remove the need to specify [MayThrowException] https://bugs.webkit.org/show_bug.cgi?id=180019 Reviewed by Darin Adler and Chris Dumez. Removes the need to specify [MayThrowException] by deducing it from the bound signature's return value. Any function returning an ExceptionOr is one that throws. In most cases, this was already handled by toJS<>(..., impl.func()), which had overloads for the case that the value was an ExceptionOr. The cases this didn't work for were funtions that returned void, as toJS<>(..., impl.func()) would not compile. To work around this, toJS<>() can now take a lambda as its value, and can determine via the lambda's return type if it needs to throw. For instance, an IDL operation like: [MayThrowException] undefined func(); used to generate a bindings body that looked like the following : auto& impl = castedThis->wrapped(); throwScope.release(); propagateException(*lexicalGlobalObject, throwScope, impl.func()); return JSValue::encode(jsUndefined()); will now generate a bindings body that looks like: auto& impl = castedThis->wrapped(); RELEASE_AND_RETURN(throwScope, JSValue::encode(toJS<IDLUndefined>(*lexicalGlobalObject, throwScope, [&]() -> decltype(auto) { return impl.func(); }))); which closely mirrors a non-undefined return operation. This wrapped lambda form is only used for operations returning undefined or promises, as those are the only functions that can return void, but it would be correct to use them for all types, if not a bit more noisy and perhaps a tiny compile time cost. NOTE: The use of `-> decltype(auto)` explicit return type on the lambda is required to perfectly forward reference types, such as those used by owned promises. Otherwise, a copy constructor is invoked. In addition to supporting all operations, this also removes the requirement to annotate named and indexed getters/setters. This mostly just means always defining a throw scope, but for named getters it also meant adding a new helper, `visibleNamedPropertyItemAccessorFunctor` which constructors the item accessor functor for the `accessVisibleNamedProperty` algorithm rather than hard coding it in the generator. Due to increased use of toJS, the code generator is now checking more return types (via AddToImplIncludesForIDLType) so the code generator was able to find a few invalid return types (e.g. use of Promise<bool> rather than Promise<boolean>, etc.) and these have been fixed and will be an error going forward. Would be a nice improvement to the code generator to do type checking up front, rather than as a side effect of code generation, but we will leave that for another day. * bindings/js/JSDOMAbstractOperations.h: (WebCore::visibleNamedPropertyItemAccessorFunctor): Added. Moves the getterFunctor lambda creation from the GenerateNamedGetterLambda subroutine in CodeGeneratorJS.pm, but uses deduction and constexpr to determine if the getter throws. (WebCore::accessVisibleNamedProperty): Rename Functor to ItemAccessor to make it a bit more clear what the type does. * bindings/js/JSDOMConvertBase.h: (WebCore::toJS): (WebCore::toJSNewlyCreated): Replace SFINAE-based overloading of toJS/toJSNewlyCreated with constexpr based conditionals and add the ability to pass in a functor rather than value. If a functor is used, additional code paths for void and ExpectionOr<void> are added which explicitly return jsUndefined(). * bindings/js/JSDOMConvertDate.cpp: Remove incorrect comment about ExecStates that hasn't applied for a while. * bindings/js/JSDOMConvertSequences.h: Fix comment, replacing ExecState with JSGlobalObject. This has been wrong for a while, and this is just a drive by fix. * bindings/js/JSDOMExceptionHandling.h: (WebCore::invokeFunctorPropagatingExceptionIfNecessary): Use an explicit else as part of the constexpr expression to ensure the functor is not called, even in debug builds. * bindings/js/JSDOMPromiseDeferred.cpp: (WebCore::createDeferredPromise): Deleted. * bindings/js/JSDOMPromiseDeferred.h: Remove unused createDeferredPromise function. * bindings/scripts/CodeGeneratorJS.pm: (AddMapLikeAttributesAndOperationIfNeeded): (AddSetLikeAttributesAndOperationIfNeeded): Fix return type of mapped clear operation to be `any` rather than `undefined` to match the implementation, which returns a JSValue (e.g. `any`). This is now required as we actually look at the return type via deduction and need it to match. (GenerateNamedGetterLambda): Replace most of the implementation with a call to the new `visibleNamedPropertyItemAccessorFunctor` helper which returns a lambda with the correct behavior depending on the return type of the inner lambda passed. (GenerateGetOwnPropertySlot): (GenerateGetOwnPropertySlotByIndex): (GenerateAttributeGetterBodyDefinition): Match most other parts of the generator and always create a throw scope. (GenerateOperationDefinition): Remove explicit call to propagateException now that toJS() will handle that for us. (GenerateParametersCheck): Remove explicit call to propagateException now that toJS() will handle that for us. (GenerateImplementationFunctionCall): Simplify by using invokeFunctorPropagatingExceptionIfNecessary helper for the "returnArgumentName" case and relying on toJS handling the other cases. (NativeToJSValueMayThrow): Add operation to the list of things that might always throw. (NativeToJSValue): Use the lambda wrapped version of toJS for undefined and promise types, which might both return void and thus require it. To keep most code unchanged, and avoid unnecessary compiler work, we only use the wrapped version when it might be necessary. If it turns out to be cheep enough, it might make sense to always use this form for simplicity. (NeedsExplicitPropagateExceptionCall): Deleted. * bindings/scripts/IDLAttributes.json: Remove MayThrowException. * dom/Element.idl: * dom/Element.h: (WebCore::Element::removeAttributeForBindings): (WebCore::Element::removeAttributeNSForBindings): Add bindings specific versions of `removeAttribute` and `removeAttributeNS` which have a void return type (rather than the bool used by the main implementation) as it is now a requirement that that the bound functions signature match the IDL. * Modules/cache/DOMCache.idl: Use the correct interface name, `FetchRequest`, not `Request`. * Modules/cache/DOMCacheStorage.idl: Use the correct interface name, `DOMCache`, not `Cache`. * Modules/encryptedmedia/MediaKeySession.idl: * Modules/encryptedmedia/MediaKeys.idl: * dom/Document+StorageAccess.idl: * page/Navigator+IsLoggedIn.idl: Use the correct IDL type, `boolean`, not `bool`. * dom/AbortSignal.idl: Update whenSignalAborted to match the return type of implementation, which is `boolean`, not `undefined`. * testing/ServiceWorkerInternals.idl: Use the correct interface name, `FetchResponse`, not `Response`. * workers/service/ServiceWorkerClients.idl: Use the correct interface names, `ServiceWorkerClient`, not `Client`, and `ServiceWorkerWindowClient`, not `WindowClient`. * workers/service/ServiceWorkerWindowClient.idl: Use the correct interface names, `ServiceWorkerWindowClient`, not `WindowClient`. * Modules/applepay/ApplePaySession.idl: * Modules/beacon/Navigator+Beacon.idl: * Modules/cache/DOMWindow+Caches.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: * Modules/fetch/FetchHeaders.idl: * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchResponse.idl: * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBFactory.idl: * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBKeyRange.idl: * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBTransaction.idl: * Modules/mediarecorder/MediaRecorder.idl: * Modules/mediasession/MediaMetadata.idl: * Modules/mediasession/MediaSession.idl: * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCRtpReceiver+Transform.idl: * Modules/mediastream/RTCRtpSFrameTransform.idl: * Modules/mediastream/RTCRtpScriptTransformer.idl: * Modules/mediastream/RTCRtpSender+Transform.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/paymentrequest/MerchantValidationEvent.idl: * Modules/paymentrequest/PaymentRequestUpdateEvent.idl: * Modules/speech/SpeechRecognition.idl: * Modules/webaudio/AudioBuffer.idl: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioListener.idl: * Modules/webaudio/AudioNode.idl: * Modules/webaudio/AudioParam.idl: * Modules/webaudio/AudioScheduledSourceNode.idl: * Modules/webaudio/AudioWorkletGlobalScope.idl: * Modules/webaudio/AudioWorkletProcessor.idl: * Modules/webaudio/BaseAudioContext.idl: * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/IIRFilterNode.idl: * Modules/webaudio/PannerNode.idl: * Modules/webaudio/WebKitAudioBufferSourceNode.idl: * Modules/webaudio/WebKitAudioContext.idl: * Modules/webdatabase/SQLResultSetRowList.idl: * Modules/webdatabase/SQLTransaction.idl: * Modules/websockets/WebSocket.idl: * Modules/webxr/WebXRFrame.idl: * Modules/webxr/WebXRReferenceSpace.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRWebGLLayer.idl: * animation/Animatable.idl: * animation/AnimationEffect.idl: * animation/KeyframeEffect.idl: * animation/WebAnimation.idl: * css/CSSGroupingRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/DOMCSSNamespace+CSSPropertiesandValues.idl: * css/DOMMatrix.idl: * css/DOMMatrixReadOnly.idl: * css/DeprecatedCSSOMPrimitiveValue.idl: * css/FontFaceSet.idl: * css/MediaList.idl: * dom/CharacterData.idl: * dom/ChildNode.idl: * dom/CustomElementRegistry.idl: * dom/DOMImplementation.idl: * dom/DOMPointReadOnly.idl: * dom/DataTransferItemList.idl: * dom/Document+HTML.idl: * dom/Document.idl: * dom/Element+DOMParsing.idl: * dom/Element+PointerEvents.idl: * dom/EventTarget.idl: * dom/MessagePort.idl: * dom/MutationObserver.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeIterator.idl: * dom/ParentNode.idl: * dom/Range+DOMParsing.idl: * dom/Range.idl: * dom/Text.idl: * dom/TextDecoder.idl: * dom/TextDecoderStreamDecoder.idl: * dom/TreeWalker.idl: * fileapi/Blob.idl: * fileapi/FileReader.idl: * fileapi/FileReaderSync.idl: * html/DOMTokenList.idl: * html/HTMLCanvasElement.idl: * html/HTMLDialogElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFrameElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLVideoElement.idl: * html/OffscreenCanvas.idl: * html/TimeRanges.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasTransform.idl: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContextBase.idl: * html/track/TextTrack.idl: * inspector/InspectorAuditAccessibilityObject.idl: * inspector/InspectorAuditDOMObject.idl: * inspector/InspectorAuditResourcesObject.idl: * loader/appcache/DOMApplicationCache.idl: * page/Crypto.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * page/NavigatorServiceWorker.idl: * page/Performance+UserTiming.idl: * page/PerformanceObserver.idl: * page/UndoManager.idl: * page/UserMessageHandler.idl: * page/WindowOrWorkerGlobalScope.idl: * storage/Storage.idl: * svg/SVGAngle.idl: * svg/SVGGeometryElement.idl: * svg/SVGGraphicsElement.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGMatrix.idl: * svg/SVGNumberList.idl: * svg/SVGPathSegList.idl: * svg/SVGPointList.idl: * svg/SVGStringList.idl: * svg/SVGTextContentElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * testing/InternalSettings.idl: * testing/Internals.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: * worklets/PaintWorkletGlobalScope.idl: * xml/DOMParser.idl: * xml/XMLHttpRequest.idl: * xml/XPathEvaluatorBase.idl: * xml/XPathExpression.idl: * xml/XPathResult.idl: Remove use of [MayThrowException]. * bindings/scripts/test/JS/*: Remove uses of [MayThrowException] in the tests and update all the test results. Canonical link: https://commits.webkit.org/235627@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-23 00:49:01 +00:00
CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
[Canvas] Split CanvasRenderingContext2D.idl into separate IDLs to match current HTML spec https://bugs.webkit.org/show_bug.cgi?id=176276 Reviewed by Dean Jackson. Source/WebCore: - Splits CanvasRenderingContext2D.idl out into: CanvasState CanvasTransform CanvasCompositing CanvasImageSmoothing CanvasFillStrokeStyles CanvasShadowStyles CanvasFilters CanvasRect CanvasDrawPath CanvasUserInterface CanvasText CanvasDrawImage CanvasImageData CanvasPathDrawingStyles CanvasTextDrawingStyles - Renames CanvasWindingRule enum to CanvasFillRule, and moves it to its own file so it can be reused by multiple IDLs. - Renames DOMPath to Path2D, which is what it is supposed to be called, and doesn't conflict with any WebCore names. - Converts lineCap, lineJoin, textAlign, textBaseline, direction to use enums, rather than DOMStrings, allowing us to remove a bunch of custom parsing. - Non-standard canvas API was grouped with related functionality in the broken out IDLs and clearly marked as non-standard. - Comments were added for places where we break with the standard, mostly around use of float where we should be using double. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/CallTracerTypes.h: * inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::buildInitialState): (WebCore::InspectorCanvas::buildAction): Update for renames, and use new convertEnumerationToString to serialize enumerations. * bindings/scripts/CodeGeneratorJS.pm: (GenerateEnumerationImplementationContent): (GenerateEnumerationHeaderContent): Split string conversion out of convertEnumerationToJS, and into its own function, convertEnumerationToString, to allow serialization to string outside of the bindings context, in this case, for the InspectorCanvas. (GenerateParametersCheck): Improve error message to make it clear which operation has the issue in order to make debugging easier. * html/ImageData.idl: Re-order constructors to match specification, and add FIXME for incorrect default argument. * html/TextMetrics.idl: Add spec'd exposure and spec comments, as well a FIXME to convert the unrestricted float parameters should be doubles. * html/canvas/CanvasCompositing.idl: Added. * html/canvas/CanvasDirection.h: Added. * html/canvas/CanvasDirection.idl: Added. * html/canvas/CanvasDrawImage.idl: Added. * html/canvas/CanvasDrawPath.idl: Added. * html/canvas/CanvasFillRule.h: Added. * html/canvas/CanvasFillRule.idl: Added. * html/canvas/CanvasFillStrokeStyles.idl: Added. * html/canvas/CanvasFilters.idl: Added. * html/canvas/CanvasImageData.idl: Added. * html/canvas/CanvasImageSmoothing.idl: Added. * html/canvas/CanvasLineCap.h: Added. * html/canvas/CanvasLineCap.idl: Added. * html/canvas/CanvasLineJoin.h: Added. * html/canvas/CanvasLineJoin.idl: Added. * html/canvas/CanvasPathDrawingStyles.idl: Added. * html/canvas/CanvasRect.idl: Added. * html/canvas/CanvasShadowStyles.idl: Added. * html/canvas/CanvasState.idl: Added. * html/canvas/CanvasText.idl: Added. * html/canvas/CanvasTextAlign.h: Added. * html/canvas/CanvasTextAlign.idl: Added. * html/canvas/CanvasTextBaseline.h: Added. * html/canvas/CanvasTextBaseline.idl: Added. * html/canvas/CanvasTextDrawingStyles.idl: Added. * html/canvas/CanvasTransform.idl: Added. * html/canvas/CanvasUserInterface.idl: Added. * html/canvas/ImageSmoothingQuality.h: Added. * html/canvas/ImageSmoothingQuality.idl: Added. Move CanvasRenderingContext2D.idl content into separate files to match the specification. * html/canvas/CanvasGradient.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPattern.idl: Add exposure and FIXMEs on changes need to match the spec. * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/CanvasRenderingContext2D.h: Switch to using enums for lineCap, lineJoin, textAlign, textBaseline, and direction. Rather than using the parsing / stringifying functions from GraphicsTypes, add simple switch based to/from converters to convert to/from the canvas type to the platform type. Also update for rename of DOMPath -> Path2D and WindingRule -> CanvasFillRule. Unfortunately, not all custom parsing could be removed. To support the legacy functions setLineCap and setLineJoin, which take Strings, two simply parse paths had to be brought back. They can't use the enums, because the rules for enums as parameters is stricter that what was implemented in the custom code (e.g. the bindings would have thrown for strings not in the enum set). * html/canvas/CanvasRenderingContext2D.idl: Move most of the functions into the new files, which are then 'implemented' by this. * html/canvas/DOMPath.cpp: Removed. * html/canvas/DOMPath.h: Removed. * html/canvas/DOMPath.idl: Removed. * html/canvas/Path2D.cpp: Copied from Source/WebCore/html/canvas/DOMPath.cpp. * html/canvas/Path2D.h: Copied from Source/WebCore/html/canvas/DOMPath.h. * html/canvas/Path2D.idl: Copied from Source/WebCore/html/canvas/DOMPath.idl. Rename DOMPath to Path2D to match the spec.. * platform/graphics/GraphicsTypes.cpp: (WebCore::parseLineCap): Deleted. (WebCore::lineCapName): Deleted. (WebCore::parseLineJoin): Deleted. (WebCore::lineJoinName): Deleted. (WebCore::textAlignName): Deleted. (WebCore::parseTextAlign): Deleted. (WebCore::textBaselineName): Deleted. (WebCore::parseTextBaseline): Deleted. * platform/graphics/GraphicsTypes.h: Remove now unused parsing / stringifying functions. * testing/Internals.cpp: Remove unused #include. * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp: * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h: Update test results to add convertEnumerationToString. LayoutTests: * fast/canvas/canvas-clip-path-expected.txt: * fast/canvas/canvas-fill-path-expected.txt: * fast/canvas/canvas-path-addPath-expected.txt: * fast/canvas/canvas-path-isPointInPath-expected.txt: * fast/canvas/canvas-path-isPointInStroke-expected.txt: * fast/canvas/canvas-stroke-path-expected.txt: * fast/canvas/winding-enumeration-expected.txt: * inspector/canvas/recording-2d-expected.txt: * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: Update results. Canonical link: https://commits.webkit.org/192969@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-05 00:23:03 +00:00
};