[Canvas] Split CanvasRenderingContext2D.idl into separate IDLs to match current HTML...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 00:23:03 +0000 (00:23 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Sep 2017 00:23:03 +0000 (00:23 +0000)
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221598 268f45cc-cd09-0410-ab3c-d52691b4dbfc

71 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/canvas-clip-path-expected.txt
LayoutTests/fast/canvas/canvas-fill-path-expected.txt
LayoutTests/fast/canvas/canvas-path-addPath-expected.txt
LayoutTests/fast/canvas/canvas-path-isPointInPath-expected.txt
LayoutTests/fast/canvas/canvas-path-isPointInStroke-expected.txt
LayoutTests/fast/canvas/canvas-stroke-path-expected.txt
LayoutTests/fast/canvas/winding-enumeration-expected.txt
LayoutTests/inspector/canvas/recording-2d-expected.txt
LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
LayoutTests/platform/wpe/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/CallTracerTypes.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h
Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneEnumeration.h
Source/WebCore/html/ImageData.idl
Source/WebCore/html/TextMetrics.idl
Source/WebCore/html/canvas/CanvasCompositing.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasDirection.h [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasDirection.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasDrawImage.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasDrawPath.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasFillRule.h [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasFillRule.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasFillStrokeStyles.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasFilters.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasGradient.idl
Source/WebCore/html/canvas/CanvasImageData.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasImageSmoothing.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasLineCap.h [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasLineCap.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasLineJoin.h [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasLineJoin.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasPath.idl
Source/WebCore/html/canvas/CanvasPathDrawingStyles.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasPattern.idl
Source/WebCore/html/canvas/CanvasRect.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
Source/WebCore/html/canvas/CanvasShadowStyles.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasState.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasText.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasTextAlign.h [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasTextAlign.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasTextBaseline.h [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasTextBaseline.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasTextDrawingStyles.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasTransform.idl [new file with mode: 0644]
Source/WebCore/html/canvas/CanvasUserInterface.idl [new file with mode: 0644]
Source/WebCore/html/canvas/ImageSmoothingQuality.h [new file with mode: 0644]
Source/WebCore/html/canvas/ImageSmoothingQuality.idl [new file with mode: 0644]
Source/WebCore/html/canvas/Path2D.cpp [moved from Source/WebCore/html/canvas/DOMPath.cpp with 93% similarity]
Source/WebCore/html/canvas/Path2D.h [moved from Source/WebCore/html/canvas/DOMPath.h with 79% similarity]
Source/WebCore/html/canvas/Path2D.idl [moved from Source/WebCore/html/canvas/DOMPath.idl with 78% similarity]
Source/WebCore/inspector/InspectorCanvas.cpp
Source/WebCore/platform/graphics/GraphicsTypes.cpp
Source/WebCore/platform/graphics/GraphicsTypes.h
Source/WebCore/testing/Internals.cpp

index ed2e6c4..3329829 100644 (file)
@@ -1,3 +1,22 @@
+2017-09-04  Sam Weinig  <sam@webkit.org>
+
+        [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.
+
+        * 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.
+
 2017-09-04  Ms2ger  <Ms2ger@igalia.com>
 
         Loosen the check in video-canvas-drawing-output.html.
index 3e9929f..3ccc0ae 100644 (file)
@@ -24,22 +24,22 @@ PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:0,b:0,a:0}) is true
-PASS ctx.clip(0) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
-PASS ctx.clip(null) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
-PASS ctx.clip('path2d') threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS ctx.clip(0) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS ctx.clip(null) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS ctx.clip('path2d') threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
 PASS ctx.clip(undefined) did not throw exception.
-PASS ctx.clip(Number.MAX_VALUE) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
-PASS ctx.clip(function() {}) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
-PASS ctx.clip(false) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
-PASS ctx.clip(new Date()) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
-PASS ctx.clip(0, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
-PASS ctx.clip(null, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
-PASS ctx.clip('path2d', 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
-PASS ctx.clip(undefined, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
-PASS ctx.clip(Number.MAX_VALUE, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
-PASS ctx.clip(function() {}, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
-PASS ctx.clip(false, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
-PASS ctx.clip(new Date(), 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of DOMPath.
+PASS ctx.clip(Number.MAX_VALUE) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS ctx.clip(function() {}) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS ctx.clip(false) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS ctx.clip(new Date()) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS ctx.clip(0, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
+PASS ctx.clip(null, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
+PASS ctx.clip('path2d', 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
+PASS ctx.clip(undefined, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
+PASS ctx.clip(Number.MAX_VALUE, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
+PASS ctx.clip(function() {}, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
+PASS ctx.clip(false, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
+PASS ctx.clip(new Date(), 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.clip must be an instance of Path2D.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index c9370bb..9164a38 100644 (file)
@@ -23,22 +23,22 @@ PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:0,b:0,a:0}) is true
-PASS ctx.fill(0) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
-PASS ctx.fill(null) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
-PASS ctx.fill('path2d') threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS ctx.fill(0) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS ctx.fill(null) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS ctx.fill('path2d') threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
 PASS ctx.fill(undefined) did not throw exception.
-PASS ctx.fill(Number.MAX_VALUE) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
-PASS ctx.fill(function() {}) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
-PASS ctx.fill(false) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
-PASS ctx.fill(new Date()) threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
-PASS ctx.fill(0, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of DOMPath.
-PASS ctx.fill(null, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of DOMPath.
-PASS ctx.fill('path2d', 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of DOMPath.
+PASS ctx.fill(Number.MAX_VALUE) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS ctx.fill(function() {}) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS ctx.fill(false) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS ctx.fill(new Date()) threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS ctx.fill(0, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of Path2D.
+PASS ctx.fill(null, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of Path2D.
+PASS ctx.fill('path2d', 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of Path2D.
 FAIL ctx.fill(undefined) should throw an exception. Was undefined.
-PASS ctx.fill(Number.MAX_VALUE, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of DOMPath.
-PASS ctx.fill(function() {}, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of DOMPath.
-PASS ctx.fill(false, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of DOMPath.
-PASS ctx.fill(new Date(), 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of DOMPath.
+PASS ctx.fill(Number.MAX_VALUE, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of Path2D.
+PASS ctx.fill(function() {}, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of Path2D.
+PASS ctx.fill(false, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of Path2D.
+PASS ctx.fill(new Date(), 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.fill must be an instance of Path2D.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 9a5ea76..3014de6 100644 (file)
@@ -31,7 +31,7 @@ Add path B to path A with singular transformation matrix (3).
 PASS refTest(result.data, expected.data) is true
 
 Various tests of invalid values.
-PASS pathA.addPath(matrix, pathB) threw exception TypeError: Argument 1 ('path') to Path2D.addPath must be an instance of DOMPath.
+PASS pathA.addPath(matrix, pathB) threw exception TypeError: Argument 1 ('path') to Path2D.addPath must be an instance of Path2D.
 PASS pathA.addPath(pathB, 0) threw exception TypeError: Type error.
 PASS pathA.addPath(pathB, "0") threw exception TypeError: Type error.
 PASS successfullyParsed is true
index 8a57247..93e687d 100644 (file)
@@ -9,21 +9,21 @@ PASS ctx.isPointInPath(path, 50, NaN) is false
 PASS ctx.isPointInPath(path, 50, 50, 'nonzero') is true
 PASS ctx.isPointInPath(path, 50, 50, 'evenodd') is false
 PASS ctx.isPointInPath(path, 50, 50, 'nonzero') is false
-PASS ctx.isPointInPath(null, 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath(null, 50, 50, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath(null, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath([], 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath([], 50, 50, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath([], 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath({}, 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath({}, 50, 50, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath({}, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath('path2d', 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath(undefined, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath(Number.MAX_VALUE, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath(function() {}, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath(false, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
-PASS ctx.isPointInPath(new Date(), 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of DOMPath.
+PASS ctx.isPointInPath(null, 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath(null, 50, 50, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath(null, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath([], 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath([], 50, 50, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath([], 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath({}, 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath({}, 50, 50, 'nonzero') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath({}, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath('path2d', 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath(undefined, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath(Number.MAX_VALUE, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath(function() {}, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath(false, 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
+PASS ctx.isPointInPath(new Date(), 50, 50, 'evenodd') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInPath must be an instance of Path2D.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 1ffd51f..00ef28c 100644 (file)
@@ -21,15 +21,15 @@ PASS ctx.isPointInStroke(path,70,122) is false
 PASS ctx.isPointInStroke(path,18,70) is false
 PASS ctx.isPointInStroke(path,NaN,122) is false
 PASS ctx.isPointInStroke(path,18,NaN) is false
-PASS ctx.isPointInStroke(null,70,20) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInStroke must be an instance of DOMPath.
-PASS ctx.isPointInStroke([],20,70) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInStroke must be an instance of DOMPath.
-PASS ctx.isPointInStroke({},120,70) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInStroke must be an instance of DOMPath.
-PASS ctx.isPointInPath('path2d', 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath(undefined, 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath(Number.MAX_VALUE, 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath(function() {}, 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath(false, 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
-PASS ctx.isPointInPath(new Date(), 50, 50) threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInStroke(null,70,20) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInStroke must be an instance of Path2D.
+PASS ctx.isPointInStroke([],20,70) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInStroke must be an instance of Path2D.
+PASS ctx.isPointInStroke({},120,70) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.isPointInStroke must be an instance of Path2D.
+PASS ctx.isPointInPath('path2d', 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath(undefined, 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath(Number.MAX_VALUE, 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath(function() {}, 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath(false, 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS ctx.isPointInPath(new Date(), 50, 50) threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
 PASS ctx.isPointInStroke(path,22,22) is true
 PASS ctx.isPointInStroke(path,118,22) is true
 PASS ctx.isPointInStroke(path,22,118) is true
index 7857b81..9ed9779 100644 (file)
@@ -17,14 +17,14 @@ PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 PASS areaColor(imageData.data, {r:0,g:255,b:0,a:255}) is true
 
-PASS ctx.stroke(0) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
-PASS ctx.stroke(null) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
-PASS ctx.stroke('path2d') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
-PASS ctx.stroke(undefined) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
-PASS ctx.stroke(Number.MAX_VALUE) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
-PASS ctx.stroke(function() {}) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
-PASS ctx.stroke(false) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
-PASS ctx.stroke(new Date()) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of DOMPath.
+PASS ctx.stroke(0) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
+PASS ctx.stroke(null) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
+PASS ctx.stroke('path2d') threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
+PASS ctx.stroke(undefined) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
+PASS ctx.stroke(Number.MAX_VALUE) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
+PASS ctx.stroke(function() {}) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
+PASS ctx.stroke(false) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
+PASS ctx.stroke(new Date()) threw exception TypeError: Argument 1 ('path') to CanvasRenderingContext2D.stroke must be an instance of Path2D.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index cb6de91..197e94a 100644 (file)
@@ -1,12 +1,12 @@
 PASS context.fill() did not throw exception.
 PASS context.fill('nonzero') did not throw exception.
-PASS context.fill('randomstring') threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
+PASS context.fill('randomstring') threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.fill must be one of: "nonzero", "evenodd".
 PASS context.clip() did not throw exception.
 PASS context.clip('nonzero') did not throw exception.
-PASS context.clip('randomstring') threw exception TypeError: Argument 1 ('winding') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
+PASS context.clip('randomstring') threw exception TypeError: Argument 1 ('fillRule') to CanvasRenderingContext2D.clip must be one of: "nonzero", "evenodd".
 PASS context.isPointInPath(0, 0) did not throw exception.
 PASS context.isPointInPath(0, 0, 'nonzero') did not throw exception.
-PASS context.isPointInPath(0, 0, 'randomstring') threw exception TypeError: Argument 3 ('winding') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
+PASS context.isPointInPath(0, 0, 'randomstring') threw exception TypeError: Argument 3 ('fillRule') to CanvasRenderingContext2D.isPointInPath must be one of: "nonzero", "evenodd".
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 71c8c4c..dbcf428 100644 (file)
@@ -551,39 +551,29 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             82,
             18
           ]
-        ],
-        [
-          81,
-          [
-            83
-          ],
-          [
-            84,
-            18
-          ]
         ]
       ]
     },
     {
       "actions": [
         [
-          85,
+          83,
           [
-            86
+            84
           ],
           [
-            87,
+            85,
             18
           ]
         ],
         [
-          85,
+          83,
           [
             48,
-            86
+            84
           ],
           [
-            88,
+            86,
             18
           ]
         ]
@@ -592,49 +582,49 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          89,
+          87,
           [
             66,
             1,
             2
           ],
           [
-            90,
+            88,
             15,
-            91,
+            89,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             70,
             3,
             4
           ],
           [
-            92,
+            90,
             15,
-            93,
+            91,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             74,
             5,
             6
           ],
           [
-            94,
+            92,
             15,
-            95,
+            93,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             66,
             7,
@@ -643,14 +633,14 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             10
           ],
           [
-            96,
+            94,
             15,
-            97,
+            95,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             70,
             11,
@@ -659,14 +649,14 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             14
           ],
           [
-            98,
+            96,
             15,
-            99,
+            97,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             74,
             15,
@@ -675,14 +665,14 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             18
           ],
           [
-            100,
+            98,
             15,
-            101,
+            99,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             66,
             19,
@@ -695,14 +685,14 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             26
           ],
           [
-            102,
+            100,
             15,
-            103,
+            101,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             70,
             27,
@@ -715,14 +705,14 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             34
           ],
           [
-            104,
+            102,
             15,
-            105,
+            103,
             18
           ]
         ],
         [
-          89,
+          87,
           [
             74,
             35,
@@ -735,9 +725,9 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             42
           ],
           [
-            106,
+            104,
             15,
-            107,
+            105,
             18
           ]
         ]
@@ -746,7 +736,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          108,
+          106,
           [
             66,
             1,
@@ -760,12 +750,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             10
           ],
           [
-            109,
+            107,
             18
           ]
         ],
         [
-          108,
+          106,
           [
             66,
             9,
@@ -776,10 +766,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             14,
             15,
             16,
-            83
+            108
           ],
           [
-            110,
+            109,
             18
           ]
         ]
@@ -788,7 +778,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          111,
+          110,
           [
             1,
             2,
@@ -800,14 +790,14 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             0
           ],
           [
-            112,
+            111,
             15,
-            113,
+            112,
             18
           ]
         ],
         [
-          111,
+          110,
           [
             8,
             9,
@@ -819,9 +809,9 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             1
           ],
           [
-            114,
+            113,
             15,
-            115,
+            114,
             18
           ]
         ]
@@ -830,44 +820,44 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          116,
+          115,
           [
             44
           ],
           [
-            117,
+            116,
             18
           ]
         ],
         [
-          116,
+          115,
           [
             46
           ],
           [
-            118,
+            117,
             18
           ]
         ],
         [
-          116,
+          115,
           [
             48,
             44
           ],
           [
-            119,
+            118,
             18
           ]
         ],
         [
-          116,
+          115,
           [
             50,
             46
           ],
           [
-            120,
+            119,
             18
           ]
         ]
@@ -876,7 +866,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          121,
+          120,
           [
             1,
             2,
@@ -884,7 +874,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             4
           ],
           [
-            122,
+            121,
             18
           ]
         ]
@@ -893,50 +883,50 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          123,
+          122,
           [],
           [
-            124,
+            123,
             18
           ]
         ],
         [
-          123,
+          122,
           [
-            83
+            108
           ],
           [
-            125,
+            124,
             18
           ]
         ],
         [
-          123,
+          122,
           [
-            127
+            126
           ],
           [
-            128,
+            127,
             18
           ]
         ],
         [
-          123,
+          122,
           [
-            130
+            129
           ],
           [
-            131,
+            130,
             18
           ]
         ],
         [
-          123,
+          122,
           [
-            135
+            134
           ],
           [
-            136,
+            135,
             18
           ]
         ]
@@ -945,19 +935,19 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          137,
+          136,
           [
             67,
             1,
             2
           ],
           [
-            138,
+            137,
             18
           ]
         ],
         [
-          137,
+          136,
           [
             71,
             3,
@@ -965,7 +955,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             5
           ],
           [
-            139,
+            138,
             18
           ]
         ]
@@ -974,20 +964,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          140,
+          139,
           [],
           [
-            141,
+            140,
             18
           ]
         ],
         [
-          140,
+          139,
           [
-            83
+            108
           ],
           [
-            142,
+            141,
             18
           ]
         ]
@@ -996,7 +986,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          143,
+          142,
           [
             1,
             2,
@@ -1004,9 +994,9 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             4
           ],
           [
-            144,
+            143,
             15,
-            145,
+            144,
             18
           ]
         ]
@@ -1015,10 +1005,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          146,
+          145,
           [],
           [
-            147,
+            146,
             18
           ]
         ]
@@ -1027,10 +1017,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          148,
+          147,
           [],
           [
-            149,
+            148,
             18
           ]
         ]
@@ -1039,20 +1029,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          150,
+          149,
           [],
           [
-            151,
+            150,
             18
           ]
         ],
         [
-          150,
+          149,
           [
             0
           ],
           [
-            152,
+            151,
             18
           ]
         ]
@@ -1061,20 +1051,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          153,
+          152,
           [],
           [
-            154,
+            153,
             18
           ]
         ],
         [
-          153,
+          152,
           [
-            83
+            108
           ],
           [
-            155,
+            154,
             18
           ]
         ]
@@ -1083,20 +1073,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          156,
+          155,
           [],
           [
-            157,
+            156,
             18
           ]
         ],
         [
-          156,
+          155,
           [
             1
           ],
           [
-            158,
+            157,
             18
           ]
         ]
@@ -1105,20 +1095,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          159,
+          158,
           [],
           [
-            160,
+            159,
             18
           ]
         ],
         [
-          159,
+          158,
           [
             9
           ],
           [
-            161,
+            160,
             18
           ]
         ]
@@ -1127,7 +1117,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          162,
+          161,
           [
             48,
             5,
@@ -1135,12 +1125,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             44
           ],
           [
-            163,
+            162,
             18
           ]
         ],
         [
-          162,
+          161,
           [
             50,
             7,
@@ -1148,31 +1138,31 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             46
           ],
           [
-            164,
+            163,
             18
           ]
         ],
         [
-          162,
+          161,
           [
             9,
             10,
             44
           ],
           [
-            165,
+            164,
             18
           ]
         ],
         [
-          162,
+          161,
           [
             11,
             12,
             46
           ],
           [
-            166,
+            165,
             18
           ]
         ]
@@ -1181,25 +1171,25 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          167,
+          166,
           [
             48,
             3,
             4
           ],
           [
-            168,
+            167,
             18
           ]
         ],
         [
-          167,
+          166,
           [
             5,
             6
           ],
           [
-            169,
+            168,
             18
           ]
         ]
@@ -1208,20 +1198,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          170,
+          169,
           [],
           [
-            171,
-            18
-          ]
-        ],
-        [
-          170,
-          [
-            83
-          ],
-          [
-            172,
+            170,
             18
           ]
         ]
@@ -1230,20 +1210,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          173,
+          171,
           [],
           [
-            174,
+            172,
             18
           ]
         ],
         [
-          173,
+          171,
           [
             1
           ],
           [
-            175,
+            173,
             18
           ]
         ]
@@ -1252,20 +1232,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          176,
+          174,
           [],
           [
-            177,
-            18
-          ]
-        ],
-        [
-          176,
-          [
-            83
-          ],
-          [
-            178,
+            175,
             18
           ]
         ]
@@ -1274,13 +1244,13 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          179,
+          176,
           [
             1,
             2
           ],
           [
-            180,
+            177,
             18
           ]
         ]
@@ -1289,20 +1259,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          181,
+          178,
           [],
           [
-            182,
+            179,
             18
           ]
         ],
         [
-          181,
+          178,
           [
             1
           ],
           [
-            183,
+            180,
             18
           ]
         ]
@@ -1311,12 +1281,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          184,
+          181,
           [
-            83
+            108
           ],
           [
-            185,
+            182,
             18
           ]
         ]
@@ -1325,20 +1295,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          186,
+          183,
           [],
           [
-            187,
+            184,
             18
           ]
         ],
         [
-          186,
+          183,
           [
             1
           ],
           [
-            188,
+            185,
             18
           ]
         ]
@@ -1347,13 +1317,13 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          189,
+          186,
           [
             1,
             2
           ],
           [
-            190,
+            187,
             18
           ]
         ]
@@ -1362,21 +1332,21 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          191,
+          188,
           [
             57,
             5,
             6
           ],
           [
-            192,
+            189,
             18
           ]
         ],
         [
-          191,
+          188,
           [
-            193,
+            190,
             7,
             8,
             9,
@@ -1385,7 +1355,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             12
           ],
           [
-            194,
+            191,
             18
           ]
         ]
@@ -1394,7 +1364,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          195,
+          192,
           [
             1,
             2,
@@ -1402,7 +1372,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             4
           ],
           [
-            196,
+            193,
             18
           ]
         ]
@@ -1411,7 +1381,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          197,
+          194,
           [
             1,
             2,
@@ -1419,7 +1389,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             4
           ],
           [
-            198,
+            195,
             18
           ]
         ]
@@ -1428,10 +1398,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          199,
+          196,
           [],
           [
-            200,
+            197,
             18
           ]
         ]
@@ -1440,10 +1410,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          201,
+          198,
           [],
           [
-            202,
+            199,
             18
           ]
         ]
@@ -1452,12 +1422,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          203,
+          200,
           [
             1
           ],
           [
-            204,
+            201,
             18
           ]
         ]
@@ -1466,10 +1436,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          205,
+          202,
           [],
           [
-            206,
+            203,
             18
           ]
         ]
@@ -1478,13 +1448,13 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          207,
+          204,
           [
             1,
             2
           ],
           [
-            208,
+            205,
             18
           ]
         ]
@@ -1493,22 +1463,22 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          209,
+          206,
           [
             null
           ],
           [
-            210,
+            207,
             18
           ]
         ],
         [
-          209,
+          206,
           [
             1
           ],
           [
-            211,
+            208,
             18
           ]
         ]
@@ -1517,22 +1487,22 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          212,
+          209,
           [
-            213
+            210
           ],
           [
-            214,
+            211,
             18
           ]
         ],
         [
-          212,
+          209,
           [
-            83
+            108
           ],
           [
-            215,
+            212,
             18
           ]
         ]
@@ -1541,50 +1511,50 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          216,
+          213,
           [
             67
           ],
           [
-            217,
+            214,
             18
           ]
         ],
         [
-          216,
+          213,
           [
             71,
             1
           ],
           [
-            218,
+            215,
             18
           ]
         ],
         [
-          216,
+          213,
           [
             2,
             1
           ],
           [
-            219,
+            216,
             18
           ]
         ],
         [
-          216,
+          213,
           [
             3,
             4
           ],
           [
-            220,
+            217,
             18
           ]
         ],
         [
-          216,
+          213,
           [
             5,
             6,
@@ -1592,12 +1562,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             8
           ],
           [
-            221,
+            218,
             18
           ]
         ],
         [
-          216,
+          213,
           [
             9,
             10,
@@ -1606,7 +1576,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             13
           ],
           [
-            222,
+            219,
             18
           ]
         ]
@@ -1615,22 +1585,22 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          223,
+          220,
           [
-            213
+            210
           ],
           [
-            224,
+            221,
             18
           ]
         ],
         [
-          223,
+          220,
           [
-            83
+            108
           ],
           [
-            225,
+            222,
             18
           ]
         ]
@@ -1639,7 +1609,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          226,
+          223,
           [
             [
               1,
@@ -1647,7 +1617,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             ]
           ],
           [
-            227,
+            224,
             18
           ]
         ]
@@ -1656,22 +1626,22 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          228,
+          225,
           [
-            213
+            210
           ],
           [
-            229,
+            226,
             18
           ]
         ],
         [
-          228,
+          225,
           [
-            83
+            108
           ],
           [
-            230,
+            227,
             18
           ]
         ]
@@ -1680,22 +1650,22 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          231,
+          228,
           [
             null
           ],
           [
-            232,
+            229,
             18
           ]
         ],
         [
-          231,
+          228,
           [
             1
           ],
           [
-            233,
+            230,
             18
           ]
         ]
@@ -1704,22 +1674,22 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          234,
+          231,
           [
             null
           ],
           [
-            235,
+            232,
             18
           ]
         ],
         [
-          234,
+          231,
           [
             1
           ],
           [
-            236,
+            233,
             18
           ]
         ]
@@ -1728,34 +1698,34 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          237,
+          234,
           [
             1,
             2,
             3,
-            238
+            235
           ],
           [
-            239,
+            236,
             18
           ]
         ],
         [
-          237,
+          234,
           [
             4,
             5,
             6,
-            83,
+            108,
             7
           ],
           [
-            240,
+            237,
             18
           ]
         ],
         [
-          237,
+          234,
           [
             8,
             9,
@@ -1764,12 +1734,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             1
           ],
           [
-            241,
+            238,
             18
           ]
         ],
         [
-          237,
+          234,
           [
             12,
             13,
@@ -1778,12 +1748,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             16
           ],
           [
-            242,
+            239,
             18
           ]
         ],
         [
-          237,
+          234,
           [
             17,
             18,
@@ -1794,12 +1764,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             23
           ],
           [
-            243,
+            240,
             18
           ]
         ],
         [
-          237,
+          234,
           [
             24,
             25,
@@ -1811,7 +1781,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             31
           ],
           [
-            244,
+            241,
             18
           ]
         ]
@@ -1820,50 +1790,50 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          245,
+          242,
           [
             67
           ],
           [
-            246,
+            243,
             18
           ]
         ],
         [
-          245,
+          242,
           [
             71,
             1
           ],
           [
-            247,
+            244,
             18
           ]
         ],
         [
-          245,
+          242,
           [
             2,
             1
           ],
           [
-            248,
+            245,
             18
           ]
         ],
         [
-          245,
+          242,
           [
             3,
             4
           ],
           [
-            249,
+            246,
             18
           ]
         ],
         [
-          245,
+          242,
           [
             5,
             6,
@@ -1871,12 +1841,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             8
           ],
           [
-            250,
+            247,
             18
           ]
         ],
         [
-          245,
+          242,
           [
             9,
             10,
@@ -1885,7 +1855,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             13
           ],
           [
-            251,
+            248,
             18
           ]
         ]
@@ -1894,7 +1864,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          252,
+          249,
           [
             1,
             2,
@@ -1904,12 +1874,12 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             6
           ],
           [
-            253,
+            250,
             18
           ]
         ],
         [
-          252,
+          249,
           [
             [
               1,
@@ -1921,14 +1891,14 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             ]
           ],
           [
-            254,
+            251,
             15,
-            255,
+            252,
             18
           ]
         ],
         [
-          252,
+          249,
           [
             [
               7,
@@ -1940,9 +1910,9 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             ]
           ],
           [
-            256,
+            253,
             15,
-            257,
+            254,
             18
           ]
         ]
@@ -1951,20 +1921,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          258,
+          255,
           [],
           [
-            259,
+            256,
             18
           ]
         ],
         [
-          258,
+          255,
           [
             1
           ],
           [
-            260,
+            257,
             18
           ]
         ]
@@ -1973,20 +1943,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          261,
+          258,
           [],
           [
-            262,
+            259,
             18
           ]
         ],
         [
-          261,
+          258,
           [
-            83
+            108
           ],
           [
-            263,
+            260,
             18
           ]
         ]
@@ -1995,20 +1965,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          264,
+          261,
           [],
           [
-            265,
+            262,
             18
           ]
         ],
         [
-          264,
+          261,
           [
             1
           ],
           [
-            266,
+            263,
             18
           ]
         ]
@@ -2017,20 +1987,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          267,
+          264,
           [],
           [
-            268,
+            265,
             18
           ]
         ],
         [
-          267,
+          264,
           [
             1
           ],
           [
-            269,
+            266,
             18
           ]
         ]
@@ -2039,20 +2009,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          270,
+          267,
           [],
           [
-            271,
+            268,
             18
           ]
         ],
         [
-          270,
+          267,
           [
             48
           ],
           [
-            272,
+            269,
             18
           ]
         ]
@@ -2061,7 +2031,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          273,
+          270,
           [
             1,
             2,
@@ -2069,7 +2039,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             4
           ],
           [
-            274,
+            271,
             18
           ]
         ]
@@ -2078,50 +2048,50 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          275,
+          272,
           [],
           [
-            276,
+            273,
             18
           ]
         ],
         [
-          275,
+          272,
           [
-            83
+            108
           ],
           [
-            277,
+            274,
             18
           ]
         ],
         [
-          275,
+          272,
           [
-            127
+            126
           ],
           [
-            278,
+            275,
             18
           ]
         ],
         [
-          275,
+          272,
           [
-            130
+            129
           ],
           [
-            279,
+            276,
             18
           ]
         ],
         [
-          275,
+          272,
           [
-            135
+            134
           ],
           [
-            280,
+            277,
             18
           ]
         ]
@@ -2130,19 +2100,19 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          281,
+          278,
           [
             67,
             1,
             2
           ],
           [
-            282,
+            279,
             18
           ]
         ],
         [
-          281,
+          278,
           [
             71,
             3,
@@ -2150,7 +2120,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             5
           ],
           [
-            283,
+            280,
             18
           ]
         ]
@@ -2159,20 +2129,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          284,
+          281,
           [],
           [
-            285,
-            18
-          ]
-        ],
-        [
-          284,
-          [
-            83
-          ],
-          [
-            286,
+            282,
             18
           ]
         ]
@@ -2181,20 +2141,10 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          287,
+          283,
           [],
           [
-            288,
-            18
-          ]
-        ],
-        [
-          287,
-          [
-            83
-          ],
-          [
-            289,
+            284,
             18
           ]
         ]
@@ -2203,7 +2153,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          290,
+          285,
           [
             1,
             2,
@@ -2213,7 +2163,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             6
           ],
           [
-            291,
+            286,
             18
           ]
         ]
@@ -2222,13 +2172,13 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          292,
+          287,
           [
             1,
             2
           ],
           [
-            293,
+            288,
             18
           ]
         ]
@@ -2237,7 +2187,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          294,
+          289,
           [
             1,
             2,
@@ -2245,9 +2195,9 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             4
           ],
           [
-            295,
+            290,
             15,
-            296,
+            291,
             18
           ]
         ]
@@ -2256,20 +2206,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          297,
+          292,
           [],
           [
-            298,
+            293,
             18
           ]
         ],
         [
-          297,
+          292,
           [
             1
           ],
           [
-            299,
+            294,
             18
           ]
         ]
@@ -2278,15 +2228,15 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          300,
+          295,
           [],
           [
-            301,
+            296,
             18
           ]
         ],
         [
-          300,
+          295,
           [
             [
               1,
@@ -2294,7 +2244,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             ]
           ],
           [
-            302,
+            297,
             18
           ]
         ]
@@ -2303,20 +2253,20 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          303,
+          298,
           [],
           [
-            304,
+            299,
             18
           ]
         ],
         [
-          303,
+          298,
           [
             1
           ],
           [
-            305,
+            300,
             18
           ]
         ]
@@ -2325,21 +2275,21 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     {
       "actions": [
         [
-          306,
+          301,
           [
             57,
             5,
             6
           ],
           [
-            307,
+            302,
             18
           ]
         ],
         [
-          306,
+          301,
           [
-            193,
+            190,
             7,
             8,
             9,
@@ -2348,7 +2298,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
             12
           ],
           [
-            308,
+            303,
             18
           ]
         ]
@@ -2650,13 +2600,6 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
       123,
       16
     ],
-    "test",
-    [
-      10,
-      12,
-      124,
-      16
-    ],
     "drawFocusIfNeeded",
     "element",
     [
@@ -2787,6 +2730,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
       142,
       34
     ],
+    "test",
     [
       10,
       12,
@@ -2865,7 +2809,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     ],
     "linear-gradient",
     [
-      126,
+      125,
       [
         1,
         2,
@@ -2882,7 +2826,7 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     ],
     "radial-gradient",
     [
-      129,
+      128,
       [
         1,
         2,
@@ -2903,9 +2847,9 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
     "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAAXNSR0IArs4c6QAAABNJREFUCB1j/M/AAEQMDEwgAgQAHxcCAmtAm/sAAAAASUVORK5CYII=",
     "no-repeat",
     [
+      131,
       132,
-      133,
-      134
+      133
     ],
     [
       10,
@@ -3063,12 +3007,6 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
       209,
       16
     ],
-    [
-      10,
-      12,
-      210,
-      16
-    ],
     "lineDashOffset",
     [
       10,
@@ -3089,12 +3027,6 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
       217,
       16
     ],
-    [
-      10,
-      12,
-      218,
-      16
-    ],
     "lineTo",
     [
       10,
@@ -3586,12 +3518,6 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
       355,
       16
     ],
-    [
-      10,
-      12,
-      356,
-      16
-    ],
     "textBaseline",
     [
       10,
@@ -3599,12 +3525,6 @@ Test that CanvasManager is able to record actions made to 2D canvas contexts.
       359,
       16
     ],
-    [
-      10,
-      12,
-      360,
-      16
-    ],
     "transform",
     [
       10,
index 4b1c98f..68e4954 100644 (file)
@@ -39,6 +39,16 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').hasOwnProp
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').hasOwnProperty('set') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').enumerable is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').value is CanvasGradient
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').value is CanvasPattern
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').configurable is true
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
@@ -219,6 +229,11 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').hasOwnProperty('
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').hasOwnProperty('set') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').enumerable is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').value is Path2D
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').configurable is true
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').value is Performance
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
index 29e80e3..3847b3c 100644 (file)
@@ -29,6 +29,16 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').hasOwnProperty('set') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').enumerable is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'ByteLengthQueuingStrategy').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').value is CanvasGradient
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').value is CanvasPattern
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').configurable is true
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
@@ -209,6 +219,11 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').hasOwnProperty('
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').hasOwnProperty('set') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').enumerable is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').value is Path2D
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').configurable is true
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').value is Performance
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
index 4b1c98f..68e4954 100644 (file)
@@ -39,6 +39,16 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').hasOwnProp
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').hasOwnProperty('set') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').enumerable is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CacheStorage').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').value is CanvasGradient
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasGradient').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').value is CanvasPattern
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CanvasPattern').configurable is true
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').value is CountQueuingStrategy
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('get') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'CountQueuingStrategy').hasOwnProperty('set') is false
@@ -219,6 +229,11 @@ PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').hasOwnProperty('
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').hasOwnProperty('set') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').enumerable is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Object').configurable is true
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').value is Path2D
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').hasOwnProperty('get') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').hasOwnProperty('set') is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').enumerable is false
+PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Path2D').configurable is true
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').value is Performance
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('get') is false
 PASS [Worker] Object.getOwnPropertyDescriptor(global, 'Performance').hasOwnProperty('set') is false
index 5995ae5..060f2e5 100644 (file)
@@ -650,11 +650,33 @@ set(WebCore_NON_SVG_IDL_FILES
     html/ValidityState.idl
     html/VoidCallback.idl
 
+    html/canvas/CanvasCompositing.idl
+    html/canvas/CanvasDirection.idl
+    html/canvas/CanvasDrawImage.idl
+    html/canvas/CanvasDrawPath.idl
+    html/canvas/CanvasFillRule.idl
+    html/canvas/CanvasFillStrokeStyles.idl
+    html/canvas/CanvasFilters.idl
     html/canvas/CanvasGradient.idl
+    html/canvas/CanvasImageData.idl
+    html/canvas/CanvasImageSmoothing.idl
+    html/canvas/CanvasLineCap.idl
+    html/canvas/CanvasLineJoin.idl
     html/canvas/CanvasPath.idl
+    html/canvas/CanvasPathDrawingStyles.idl
     html/canvas/CanvasPattern.idl
+    html/canvas/CanvasRect.idl
     html/canvas/CanvasRenderingContext2D.idl
-    html/canvas/DOMPath.idl
+    html/canvas/CanvasShadowStyles.idl
+    html/canvas/CanvasState.idl
+    html/canvas/CanvasText.idl
+    html/canvas/CanvasTextAlign.idl
+    html/canvas/CanvasTextBaseline.idl
+    html/canvas/CanvasTextDrawingStyles.idl
+    html/canvas/CanvasTransform.idl
+    html/canvas/CanvasUserInterface.idl
+    html/canvas/ImageSmoothingQuality.idl
+    html/canvas/Path2D.idl
     html/canvas/WebGPUBuffer.idl
     html/canvas/WebGPUCommandBuffer.idl
     html/canvas/WebGPUCommandQueue.idl
@@ -1910,7 +1932,7 @@ set(WebCore_SOURCES
     html/canvas/CanvasRenderingContext.cpp
     html/canvas/CanvasRenderingContext2D.cpp
     html/canvas/CanvasStyle.cpp
-    html/canvas/DOMPath.cpp
+    html/canvas/Path2D.cpp
     html/canvas/WebGPUBuffer.cpp
     html/canvas/WebGPUCommandBuffer.cpp
     html/canvas/WebGPUCommandQueue.cpp
index e14df03..1927f68 100644 (file)
@@ -1,3 +1,171 @@
+2017-09-04  Sam Weinig  <sam@webkit.org>
+
+        [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.
+
+        - 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.
+
 2017-09-03  Darin Adler  <darin@apple.com>
 
         Follow up FrameView::updateLayoutAndStyleIfNeededRecursive changes with related improvements
index cf74e01..1d981a2 100644 (file)
 #include "JSDOMMimeTypeArray.cpp"
 #include "JSDOMNamedFlowCollection.cpp"
 #include "JSDOMParser.cpp"
-#include "JSDOMPath.cpp"
 #include "JSDOMPlugin.cpp"
 #include "JSDOMPluginArray.cpp"
 #include "JSDOMSelection.cpp"
 #include "JSPageTransitionEvent.cpp"
 #include "JSPannerNode.cpp"
 #include "JSParentNode.cpp"
+#include "JSPath2D.cpp"
 #include "JSPerformance.cpp"
 #include "JSPerformanceEntry.cpp"
 #include "JSPerformanceMark.cpp"
index e179dec..c34b32e 100644 (file)
@@ -588,16 +588,37 @@ JS_BINDING_IDLS = \
     $(WebCore)/html/VoidCallback.idl \
     $(WebCore)/html/WebKitMediaKeyError.idl \
     $(WebCore)/html/canvas/ANGLEInstancedArrays.idl \
+    $(WebCore)/html/canvas/CanvasCompositing.idl \
+    $(WebCore)/html/canvas/CanvasDirection.idl \
+    $(WebCore)/html/canvas/CanvasDrawImage.idl \
+    $(WebCore)/html/canvas/CanvasDrawPath.idl \
+    $(WebCore)/html/canvas/CanvasFillRule.idl \
+    $(WebCore)/html/canvas/CanvasFillStrokeStyles.idl \
+    $(WebCore)/html/canvas/CanvasFilters.idl \
     $(WebCore)/html/canvas/CanvasGradient.idl \
+    $(WebCore)/html/canvas/CanvasImageData.idl \
+    $(WebCore)/html/canvas/CanvasImageSmoothing.idl \
+    $(WebCore)/html/canvas/CanvasLineCap.idl \
+    $(WebCore)/html/canvas/CanvasLineJoin.idl \
     $(WebCore)/html/canvas/CanvasPath.idl \
+    $(WebCore)/html/canvas/CanvasPathDrawingStyles.idl \
     $(WebCore)/html/canvas/CanvasPattern.idl \
+    $(WebCore)/html/canvas/CanvasRect.idl \
     $(WebCore)/html/canvas/CanvasRenderingContext2D.idl \
-    $(WebCore)/html/canvas/DOMPath.idl \
+    $(WebCore)/html/canvas/CanvasShadowStyles.idl \
+    $(WebCore)/html/canvas/CanvasState.idl \
+    $(WebCore)/html/canvas/CanvasText.idl \
+    $(WebCore)/html/canvas/CanvasTextAlign.idl \
+    $(WebCore)/html/canvas/CanvasTextBaseline.idl \
+    $(WebCore)/html/canvas/CanvasTextDrawingStyles.idl \
+    $(WebCore)/html/canvas/CanvasTransform.idl \
+    $(WebCore)/html/canvas/CanvasUserInterface.idl \
     $(WebCore)/html/canvas/EXTBlendMinMax.idl \
     $(WebCore)/html/canvas/EXTFragDepth.idl \
     $(WebCore)/html/canvas/EXTShaderTextureLOD.idl \
     $(WebCore)/html/canvas/EXTTextureFilterAnisotropic.idl \
     $(WebCore)/html/canvas/EXTsRGB.idl \
+    $(WebCore)/html/canvas/ImageSmoothingQuality.idl \
     $(WebCore)/html/canvas/OESElementIndexUint.idl \
     $(WebCore)/html/canvas/OESStandardDerivatives.idl \
     $(WebCore)/html/canvas/OESTextureFloat.idl \
@@ -605,6 +626,7 @@ JS_BINDING_IDLS = \
     $(WebCore)/html/canvas/OESTextureHalfFloat.idl \
     $(WebCore)/html/canvas/OESTextureHalfFloatLinear.idl \
     $(WebCore)/html/canvas/OESVertexArrayObject.idl \
+    $(WebCore)/html/canvas/Path2D.idl \
     $(WebCore)/html/canvas/WebGL2RenderingContext.idl \
     $(WebCore)/html/canvas/WebGLActiveInfo.idl \
     $(WebCore)/html/canvas/WebGLBuffer.idl \
index af19390..ed04171 100644 (file)
                2D4F96F61A1ECC240098BF88 /* TextIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D4F96F21A1ECC240098BF88 /* TextIndicator.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2D4F96F71A1ECC240098BF88 /* TextIndicatorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D4F96F31A1ECC240098BF88 /* TextIndicatorWindow.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2D4F96F81A1ECC240098BF88 /* TextIndicatorWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D4F96F41A1ECC240098BF88 /* TextIndicatorWindow.mm */; };
-               2D5002F81B56D7810020AAF7 /* DOMPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5002F71B56D7810020AAF7 /* DOMPath.cpp */; };
                2D5002FB1B56D7990020AAF7 /* PathUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5002F91B56D7990020AAF7 /* PathUtilities.cpp */; };
                2D5002FC1B56D7990020AAF7 /* PathUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5002FA1B56D7990020AAF7 /* PathUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
                2D5036681BCDDDC400E20BB3 /* GestureEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */; };
                759CB837192DA9190012BC64 /* ControlStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 311C08BC18E35D6800B65615 /* ControlStates.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7633A72613D8B33A008501B6 /* LocaleToScriptMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */; };
                7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */; };
-               76808B50159DADFA002B5233 /* JSHTMLDialogElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 76808B4E159DADFA002B5233 /* JSHTMLDialogElement.h */; };
                7694563C1214D97C0007CBAE /* JSDOMTokenList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7694563A1214D97C0007CBAE /* JSDOMTokenList.cpp */; };
                7694563D1214D97C0007CBAE /* JSDOMTokenList.h in Headers */ = {isa = PBXBuildFile; fileRef = 7694563B1214D97C0007CBAE /* JSDOMTokenList.h */; };
                76CDD2F21103DA6600680521 /* AccessibilityMenuList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */; };
                7BE7427381FA906FBB4F0F2C /* JSSVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 950C4C02BED8936F818E2F99 /* JSSVGGraphicsElement.h */; };
                7C1843FD1C8B7283002EB973 /* Autofill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1843FB1C8B7283002EB973 /* Autofill.cpp */; };
                7C1843FE1C8B7283002EB973 /* Autofill.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1843FC1C8B7283002EB973 /* Autofill.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               7C193BBB1F5E0EED0088F3E6 /* CanvasDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BB61F5E0EB90088F3E6 /* CanvasDirection.h */; };
+               7C193BBC1F5E0EED0088F3E6 /* CanvasFillRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BA11F5E0EAB0088F3E6 /* CanvasFillRule.h */; };
+               7C193BBD1F5E0EED0088F3E6 /* CanvasLineCap.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BBA1F5E0EBB0088F3E6 /* CanvasLineCap.h */; };
+               7C193BBE1F5E0EED0088F3E6 /* CanvasLineJoin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193B9F1F5E0EAA0088F3E6 /* CanvasLineJoin.h */; };
+               7C193BBF1F5E0EED0088F3E6 /* CanvasTextAlign.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BA31F5E0EAC0088F3E6 /* CanvasTextAlign.h */; };
+               7C193BC01F5E0EED0088F3E6 /* CanvasTextBaseline.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BA41F5E0EAD0088F3E6 /* CanvasTextBaseline.h */; };
+               7C193BC11F5E0EED0088F3E6 /* ImageSmoothingQuality.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BAF1F5E0EB40088F3E6 /* ImageSmoothingQuality.h */; };
+               7C193BC21F5E0EED0088F3E6 /* Path2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BAB1F5E0EB10088F3E6 /* Path2D.h */; };
+               7C193BEF1F5E10990088F3E6 /* JSCanvasDirection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BCF1F5E0FAD0088F3E6 /* JSCanvasDirection.cpp */; };
+               7C193BF01F5E10990088F3E6 /* JSCanvasDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BDD1F5E0FB60088F3E6 /* JSCanvasDirection.h */; };
+               7C193BF11F5E10990088F3E6 /* JSCanvasFillRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BC81F5E0FA80088F3E6 /* JSCanvasFillRule.cpp */; };
+               7C193BF21F5E10990088F3E6 /* JSCanvasFillRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BDB1F5E0FB40088F3E6 /* JSCanvasFillRule.h */; };
+               7C193BF31F5E10990088F3E6 /* JSCanvasLineCap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BEA1F5E0FBE0088F3E6 /* JSCanvasLineCap.cpp */; };
+               7C193BF41F5E10990088F3E6 /* JSCanvasLineCap.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BC71F5E0FA70088F3E6 /* JSCanvasLineCap.h */; };
+               7C193BF51F5E10990088F3E6 /* JSCanvasLineJoin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BE71F5E0FBC0088F3E6 /* JSCanvasLineJoin.cpp */; };
+               7C193BF61F5E10990088F3E6 /* JSCanvasLineJoin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BDC1F5E0FB50088F3E6 /* JSCanvasLineJoin.h */; };
+               7C193BF71F5E10990088F3E6 /* JSCanvasTextAlign.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BD21F5E0FAE0088F3E6 /* JSCanvasTextAlign.cpp */; };
+               7C193BF81F5E10990088F3E6 /* JSCanvasTextAlign.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BE11F5E0FB80088F3E6 /* JSCanvasTextAlign.h */; };
+               7C193BF91F5E10990088F3E6 /* JSCanvasTextBaseline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BD31F5E0FAF0088F3E6 /* JSCanvasTextBaseline.cpp */; };
+               7C193BFA1F5E10990088F3E6 /* JSCanvasTextBaseline.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BD41F5E0FB00088F3E6 /* JSCanvasTextBaseline.h */; };
+               7C193C001F5E11050088F3E6 /* JSImageSmoothingQuality.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BFB1F5E10C40088F3E6 /* JSImageSmoothingQuality.cpp */; };
+               7C193C011F5E11050088F3E6 /* JSImageSmoothingQuality.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BFC1F5E10C50088F3E6 /* JSImageSmoothingQuality.h */; };
+               7C193C021F5E11050088F3E6 /* JSPath2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BFD1F5E10D60088F3E6 /* JSPath2D.cpp */; };
+               7C193C031F5E11050088F3E6 /* JSPath2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C193BFE1F5E10D70088F3E6 /* JSPath2D.h */; };
+               7C193C061F5E1FFD0088F3E6 /* Path2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C193BA71F5E0EAF0088F3E6 /* Path2D.cpp */; };
                7C1E8D011ED0C2DA00B1D983 /* CallbackResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1E8D001ED0C2BE00B1D983 /* CallbackResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
                7C1E97271A9F9834007BF0FB /* AutoFillButtonElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */; };
                7C1E97281A9F9834007BF0FB /* AutoFillButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */; };
                FB3056C2169E5DAC0096A232 /* CSSGroupingRule.h in Headers */ = {isa = PBXBuildFile; fileRef = FB3056C1169E5DAC0096A232 /* CSSGroupingRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
                FB484F4C171F821E00040755 /* TransformFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB484F4A171F821E00040755 /* TransformFunctions.cpp */; };
                FB484F4D171F821E00040755 /* TransformFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = FB484F4B171F821E00040755 /* TransformFunctions.h */; };
-               FB91392416AE4C17001FE682 /* DOMPath.h in Headers */ = {isa = PBXBuildFile; fileRef = FB91392016AE4B0B001FE682 /* DOMPath.h */; };
-               FB91392A16AE4FC0001FE682 /* JSDOMPath.h in Headers */ = {isa = PBXBuildFile; fileRef = FB91392816AE4FC0001FE682 /* JSDOMPath.h */; };
-               FB91392B16AE4FC0001FE682 /* JSDOMPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB91392916AE4FC0001FE682 /* JSDOMPath.cpp */; };
                FB92DF4B15FED08700994433 /* ClipPathOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = FB92DF4915FED08700994433 /* ClipPathOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                FBB0C5B717BBD626003D3677 /* CSSFilterImageValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB965B8217BBB62C00E835B9 /* CSSFilterImageValue.cpp */; };
                FBB0C5B817BBD629003D3677 /* CSSFilterImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = FB965B8117BBB5F900E835B9 /* CSSFilterImageValue.h */; settings = {ATTRIBUTES = (); }; };
                2D4F96F21A1ECC240098BF88 /* TextIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextIndicator.h; sourceTree = "<group>"; };
                2D4F96F31A1ECC240098BF88 /* TextIndicatorWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextIndicatorWindow.h; sourceTree = "<group>"; };
                2D4F96F41A1ECC240098BF88 /* TextIndicatorWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextIndicatorWindow.mm; sourceTree = "<group>"; };
-               2D5002F71B56D7810020AAF7 /* DOMPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMPath.cpp; sourceTree = "<group>"; };
                2D5002F91B56D7990020AAF7 /* PathUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathUtilities.cpp; sourceTree = "<group>"; };
                2D5002FA1B56D7990020AAF7 /* PathUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathUtilities.h; sourceTree = "<group>"; };
                2D5036671BCDDDC400E20BB3 /* GestureEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GestureEvents.cpp; sourceTree = "<group>"; };
                75793EC70D0CE72D007FC0AC /* JSMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSMessageEvent.h; sourceTree = "<group>"; };
                7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocaleToScriptMapping.h; sourceTree = "<group>"; };
                7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocaleToScriptMappingDefault.cpp; sourceTree = "<group>"; };
-               76808B4E159DADFA002B5233 /* JSHTMLDialogElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLDialogElement.h; sourceTree = "<group>"; };
                7694563A1214D97C0007CBAE /* JSDOMTokenList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMTokenList.cpp; sourceTree = "<group>"; };
                7694563B1214D97C0007CBAE /* JSDOMTokenList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMTokenList.h; sourceTree = "<group>"; };
                76CDD2EC1103DA6600680521 /* AccessibilityMenuList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMenuList.cpp; sourceTree = "<group>"; };
                7C0CEF301E4A58F1008DEB80 /* JSDOMConstructorWithDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMConstructorWithDocument.cpp; sourceTree = "<group>"; };
                7C1843FB1C8B7283002EB973 /* Autofill.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Autofill.cpp; sourceTree = "<group>"; };
                7C1843FC1C8B7283002EB973 /* Autofill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Autofill.h; sourceTree = "<group>"; };
+               7C193B9A1F5E0EA70088F3E6 /* CanvasDrawImage.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasDrawImage.idl; sourceTree = "<group>"; };
+               7C193B9C1F5E0EA80088F3E6 /* CanvasLineJoin.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasLineJoin.idl; sourceTree = "<group>"; };
+               7C193B9D1F5E0EA90088F3E6 /* CanvasPathDrawingStyles.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasPathDrawingStyles.idl; sourceTree = "<group>"; };
+               7C193B9E1F5E0EA90088F3E6 /* CanvasRect.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasRect.idl; sourceTree = "<group>"; };
+               7C193B9F1F5E0EAA0088F3E6 /* CanvasLineJoin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasLineJoin.h; sourceTree = "<group>"; };
+               7C193BA01F5E0EAA0088F3E6 /* CanvasFillStrokeStyles.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasFillStrokeStyles.idl; sourceTree = "<group>"; };
+               7C193BA11F5E0EAB0088F3E6 /* CanvasFillRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasFillRule.h; sourceTree = "<group>"; };
+               7C193BA21F5E0EAB0088F3E6 /* CanvasImageData.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasImageData.idl; sourceTree = "<group>"; };
+               7C193BA31F5E0EAC0088F3E6 /* CanvasTextAlign.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasTextAlign.h; sourceTree = "<group>"; };
+               7C193BA41F5E0EAD0088F3E6 /* CanvasTextBaseline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasTextBaseline.h; sourceTree = "<group>"; };
+               7C193BA51F5E0EAE0088F3E6 /* CanvasFillRule.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasFillRule.idl; sourceTree = "<group>"; };
+               7C193BA61F5E0EAE0088F3E6 /* CanvasDrawPath.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasDrawPath.idl; sourceTree = "<group>"; };
+               7C193BA71F5E0EAF0088F3E6 /* Path2D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Path2D.cpp; sourceTree = "<group>"; };
+               7C193BA81F5E0EAF0088F3E6 /* ImageSmoothingQuality.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ImageSmoothingQuality.idl; sourceTree = "<group>"; };
+               7C193BA91F5E0EB00088F3E6 /* CanvasTextDrawingStyles.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasTextDrawingStyles.idl; sourceTree = "<group>"; };
+               7C193BAA1F5E0EB10088F3E6 /* CanvasCompositing.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasCompositing.idl; sourceTree = "<group>"; };
+               7C193BAB1F5E0EB10088F3E6 /* Path2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Path2D.h; sourceTree = "<group>"; };
+               7C193BAC1F5E0EB20088F3E6 /* CanvasDirection.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasDirection.idl; sourceTree = "<group>"; };
+               7C193BAD1F5E0EB30088F3E6 /* CanvasShadowStyles.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasShadowStyles.idl; sourceTree = "<group>"; };
+               7C193BAE1F5E0EB40088F3E6 /* CanvasTextAlign.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasTextAlign.idl; sourceTree = "<group>"; };
+               7C193BAF1F5E0EB40088F3E6 /* ImageSmoothingQuality.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSmoothingQuality.h; sourceTree = "<group>"; };
+               7C193BB01F5E0EB50088F3E6 /* CanvasImageSmoothing.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasImageSmoothing.idl; sourceTree = "<group>"; };
+               7C193BB11F5E0EB50088F3E6 /* CanvasLineCap.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasLineCap.idl; sourceTree = "<group>"; };
+               7C193BB21F5E0EB60088F3E6 /* CanvasState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasState.idl; sourceTree = "<group>"; };
+               7C193BB31F5E0EB70088F3E6 /* CanvasFilters.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasFilters.idl; sourceTree = "<group>"; };
+               7C193BB41F5E0EB70088F3E6 /* Path2D.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Path2D.idl; sourceTree = "<group>"; };
+               7C193BB51F5E0EB80088F3E6 /* CanvasTransform.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasTransform.idl; sourceTree = "<group>"; };
+               7C193BB61F5E0EB90088F3E6 /* CanvasDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasDirection.h; sourceTree = "<group>"; };
+               7C193BB71F5E0EB90088F3E6 /* CanvasTextBaseline.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasTextBaseline.idl; sourceTree = "<group>"; };
+               7C193BB81F5E0EBA0088F3E6 /* CanvasUserInterface.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasUserInterface.idl; sourceTree = "<group>"; };
+               7C193BB91F5E0EBB0088F3E6 /* CanvasText.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasText.idl; sourceTree = "<group>"; };
+               7C193BBA1F5E0EBB0088F3E6 /* CanvasLineCap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasLineCap.h; sourceTree = "<group>"; };
+               7C193BC71F5E0FA70088F3E6 /* JSCanvasLineCap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCanvasLineCap.h; sourceTree = "<group>"; };
+               7C193BC81F5E0FA80088F3E6 /* JSCanvasFillRule.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasFillRule.cpp; sourceTree = "<group>"; };
+               7C193BCF1F5E0FAD0088F3E6 /* JSCanvasDirection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasDirection.cpp; sourceTree = "<group>"; };
+               7C193BD21F5E0FAE0088F3E6 /* JSCanvasTextAlign.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasTextAlign.cpp; sourceTree = "<group>"; };
+               7C193BD31F5E0FAF0088F3E6 /* JSCanvasTextBaseline.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasTextBaseline.cpp; sourceTree = "<group>"; };
+               7C193BD41F5E0FB00088F3E6 /* JSCanvasTextBaseline.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCanvasTextBaseline.h; sourceTree = "<group>"; };
+               7C193BDB1F5E0FB40088F3E6 /* JSCanvasFillRule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCanvasFillRule.h; sourceTree = "<group>"; };
+               7C193BDC1F5E0FB50088F3E6 /* JSCanvasLineJoin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCanvasLineJoin.h; sourceTree = "<group>"; };
+               7C193BDD1F5E0FB60088F3E6 /* JSCanvasDirection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCanvasDirection.h; sourceTree = "<group>"; };
+               7C193BE11F5E0FB80088F3E6 /* JSCanvasTextAlign.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSCanvasTextAlign.h; sourceTree = "<group>"; };
+               7C193BE71F5E0FBC0088F3E6 /* JSCanvasLineJoin.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasLineJoin.cpp; sourceTree = "<group>"; };
+               7C193BEA1F5E0FBE0088F3E6 /* JSCanvasLineCap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasLineCap.cpp; sourceTree = "<group>"; };
+               7C193BFB1F5E10C40088F3E6 /* JSImageSmoothingQuality.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSImageSmoothingQuality.cpp; sourceTree = "<group>"; };
+               7C193BFC1F5E10C50088F3E6 /* JSImageSmoothingQuality.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSImageSmoothingQuality.h; sourceTree = "<group>"; };
+               7C193BFD1F5E10D60088F3E6 /* JSPath2D.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSPath2D.cpp; sourceTree = "<group>"; };
+               7C193BFE1F5E10D70088F3E6 /* JSPath2D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSPath2D.h; sourceTree = "<group>"; };
                7C1E8CFF1ED0C2BE00B1D983 /* BeforeUnloadEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BeforeUnloadEvent.idl; sourceTree = "<group>"; };
                7C1E8D001ED0C2BE00B1D983 /* CallbackResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallbackResult.h; sourceTree = "<group>"; };
                7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AutoFillButtonElement.cpp; sourceTree = "<group>"; };
                FB3056C1169E5DAC0096A232 /* CSSGroupingRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSGroupingRule.h; sourceTree = "<group>"; };
                FB484F4A171F821E00040755 /* TransformFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformFunctions.cpp; sourceTree = "<group>"; };
                FB484F4B171F821E00040755 /* TransformFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformFunctions.h; sourceTree = "<group>"; };
-               FB91392016AE4B0B001FE682 /* DOMPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMPath.h; sourceTree = "<group>"; };
-               FB91392116AE4B0B001FE682 /* DOMPath.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMPath.idl; sourceTree = "<group>"; };
-               FB91392816AE4FC0001FE682 /* JSDOMPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMPath.h; sourceTree = "<group>"; };
-               FB91392916AE4FC0001FE682 /* JSDOMPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMPath.cpp; sourceTree = "<group>"; };
                FB92DF4915FED08700994433 /* ClipPathOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClipPathOperation.h; sourceTree = "<group>"; };
                FB965B8117BBB5F900E835B9 /* CSSFilterImageValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFilterImageValue.h; sourceTree = "<group>"; };
                FB965B8217BBB62C00E835B9 /* CSSFilterImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFilterImageValue.cpp; sourceTree = "<group>"; };
                                31A795C11888B72400382F90 /* ANGLEInstancedArrays.cpp */,
                                31A795C21888B72400382F90 /* ANGLEInstancedArrays.h */,
                                31A795C31888B72400382F90 /* ANGLEInstancedArrays.idl */,
+                               7C193BAA1F5E0EB10088F3E6 /* CanvasCompositing.idl */,
+                               7C193BB61F5E0EB90088F3E6 /* CanvasDirection.h */,
+                               7C193BAC1F5E0EB20088F3E6 /* CanvasDirection.idl */,
+                               7C193B9A1F5E0EA70088F3E6 /* CanvasDrawImage.idl */,
+                               7C193BA61F5E0EAE0088F3E6 /* CanvasDrawPath.idl */,
+                               7C193BA11F5E0EAB0088F3E6 /* CanvasFillRule.h */,
+                               7C193BA51F5E0EAE0088F3E6 /* CanvasFillRule.idl */,
+                               7C193BA01F5E0EAA0088F3E6 /* CanvasFillStrokeStyles.idl */,
+                               7C193BB31F5E0EB70088F3E6 /* CanvasFilters.idl */,
                                49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */,
                                49484FB4102CF23C00187DD3 /* CanvasGradient.h */,
                                49484FB5102CF23C00187DD3 /* CanvasGradient.idl */,
+                               7C193BA21F5E0EAB0088F3E6 /* CanvasImageData.idl */,
+                               7C193BB01F5E0EB50088F3E6 /* CanvasImageSmoothing.idl */,
+                               7C193BBA1F5E0EBB0088F3E6 /* CanvasLineCap.h */,
+                               7C193BB11F5E0EB50088F3E6 /* CanvasLineCap.idl */,
+                               7C193B9F1F5E0EAA0088F3E6 /* CanvasLineJoin.h */,
+                               7C193B9C1F5E0EA80088F3E6 /* CanvasLineJoin.idl */,
                                4671E0631D67A57B00C6B497 /* CanvasPath.cpp */,
                                4671E0641D67A57B00C6B497 /* CanvasPath.h */,
                                936B21F41DBBF8300052E117 /* CanvasPath.idl */,
+                               7C193B9D1F5E0EA90088F3E6 /* CanvasPathDrawingStyles.idl */,
                                49484FB6102CF23C00187DD3 /* CanvasPattern.cpp */,
                                49484FB7102CF23C00187DD3 /* CanvasPattern.h */,
                                49484FB8102CF23C00187DD3 /* CanvasPattern.idl */,
+                               7C193B9E1F5E0EA90088F3E6 /* CanvasRect.idl */,
                                49C7B9BC1042D32F0009D447 /* CanvasRenderingContext.cpp */,
                                49C7B9BD1042D32F0009D447 /* CanvasRenderingContext.h */,
                                49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */,
                                49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */,
                                49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */,
+                               7C193BAD1F5E0EB30088F3E6 /* CanvasShadowStyles.idl */,
+                               7C193BB21F5E0EB60088F3E6 /* CanvasState.idl */,
                                49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */,
                                49484FC0102CF23C00187DD3 /* CanvasStyle.h */,
-                               2D5002F71B56D7810020AAF7 /* DOMPath.cpp */,
-                               FB91392016AE4B0B001FE682 /* DOMPath.h */,
-                               FB91392116AE4B0B001FE682 /* DOMPath.idl */,
+                               7C193BB91F5E0EBB0088F3E6 /* CanvasText.idl */,
+                               7C193BA31F5E0EAC0088F3E6 /* CanvasTextAlign.h */,
+                               7C193BAE1F5E0EB40088F3E6 /* CanvasTextAlign.idl */,
+                               7C193BA41F5E0EAD0088F3E6 /* CanvasTextBaseline.h */,
+                               7C193BB71F5E0EB90088F3E6 /* CanvasTextBaseline.idl */,
+                               7C193BA91F5E0EB00088F3E6 /* CanvasTextDrawingStyles.idl */,
+                               7C193BB51F5E0EB80088F3E6 /* CanvasTransform.idl */,
+                               7C193BB81F5E0EBA0088F3E6 /* CanvasUserInterface.idl */,
                                724ED3291A3A7E5400F5F13C /* EXTBlendMinMax.cpp */,
                                724ED32A1A3A7E5400F5F13C /* EXTBlendMinMax.h */,
                                724ED32B1A3A7E5400F5F13C /* EXTBlendMinMax.idl */,
                                7728694C14F8882500F484DC /* EXTTextureFilterAnisotropic.h */,
                                7728694D14F8882500F484DC /* EXTTextureFilterAnisotropic.idl */,
                                311518FB1E78C15F00EC514A /* GPUBasedCanvasRenderingContext.h */,
+                               7C193BAF1F5E0EB40088F3E6 /* ImageSmoothingQuality.h */,
+                               7C193BA81F5E0EAF0088F3E6 /* ImageSmoothingQuality.idl */,
                                7E5D7A73161D3F8F00896C34 /* OESElementIndexUint.cpp */,
                                7E5D7A74161D3F8F00896C34 /* OESElementIndexUint.h */,
                                E176580C180DF3A0005A96D1 /* OESElementIndexUint.idl */,
                                77A17A6E12F28182004E02F6 /* OESVertexArrayObject.cpp */,
                                77A17A6F12F28182004E02F6 /* OESVertexArrayObject.h */,
                                77A17A7012F28182004E02F6 /* OESVertexArrayObject.idl */,
+                               7C193BA71F5E0EAF0088F3E6 /* Path2D.cpp */,
+                               7C193BAB1F5E0EB10088F3E6 /* Path2D.h */,
+                               7C193BB41F5E0EB70088F3E6 /* Path2D.idl */,
                                D3F3D35B1A69A5060059FC2B /* WebGL2RenderingContext.cpp */,
                                D3F3D35C1A69A5060059FC2B /* WebGL2RenderingContext.h */,
                                D3F3D35D1A69A5060059FC2B /* WebGL2RenderingContext.idl */,
                                BE8EF03F171C8FF9009B48C3 /* JSAudioTrack.h */,
                                BE8EF040171C8FF9009B48C3 /* JSAudioTrackList.cpp */,
                                BE8EF041171C8FF9009B48C3 /* JSAudioTrackList.h */,
+                               7C193BCF1F5E0FAD0088F3E6 /* JSCanvasDirection.cpp */,
+                               7C193BDD1F5E0FB60088F3E6 /* JSCanvasDirection.h */,
+                               7C193BC81F5E0FA80088F3E6 /* JSCanvasFillRule.cpp */,
+                               7C193BDB1F5E0FB40088F3E6 /* JSCanvasFillRule.h */,
                                65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
                                65DF323409D1DE65000BE325 /* JSCanvasGradient.h */,
+                               7C193BEA1F5E0FBE0088F3E6 /* JSCanvasLineCap.cpp */,
+                               7C193BC71F5E0FA70088F3E6 /* JSCanvasLineCap.h */,
+                               7C193BE71F5E0FBC0088F3E6 /* JSCanvasLineJoin.cpp */,
+                               7C193BDC1F5E0FB50088F3E6 /* JSCanvasLineJoin.h */,
                                65DF323509D1DE65000BE325 /* JSCanvasPattern.cpp */,
                                65DF323609D1DE65000BE325 /* JSCanvasPattern.h */,
                                49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */,
                                49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */,
+                               7C193BD21F5E0FAE0088F3E6 /* JSCanvasTextAlign.cpp */,
+                               7C193BE11F5E0FB80088F3E6 /* JSCanvasTextAlign.h */,
+                               7C193BD31F5E0FAF0088F3E6 /* JSCanvasTextBaseline.cpp */,
+                               7C193BD41F5E0FB00088F3E6 /* JSCanvasTextBaseline.h */,
                                BE61039B18A9D61200DD50D7 /* JSDataCue.cpp */,
                                BE61039C18A9D61200DD50D7 /* JSDataCue.h */,
                                2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */,
                                2E0888D31148848A00AF4265 /* JSDOMFormData.h */,
-                               FB91392916AE4FC0001FE682 /* JSDOMPath.cpp */,
-                               FB91392816AE4FC0001FE682 /* JSDOMPath.h */,
                                7694563A1214D97C0007CBAE /* JSDOMTokenList.cpp */,
                                7694563B1214D97C0007CBAE /* JSDOMTokenList.h */,
                                2E37E00312DBC5A400A6B233 /* JSDOMURL.cpp */,
                                F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */,
                                D359D8BC129CA55C0006E5D2 /* JSHTMLDetailsElement.cpp */,
                                D359D8BD129CA55C0006E5D2 /* JSHTMLDetailsElement.h */,
-                               76808B4E159DADFA002B5233 /* JSHTMLDialogElement.h */,
                                1A85B1E00A1B240500D8C87C /* JSHTMLDirectoryElement.cpp */,
                                1A85B1E10A1B240500D8C87C /* JSHTMLDirectoryElement.h */,
                                1A85B2B40A1B2AC700D8C87C /* JSHTMLDivElement.cpp */,
                                E446140F0CD6826900FADA75 /* JSHTMLVideoElement.h */,
                                A77979240D6B9E64003851B9 /* JSImageData.cpp */,
                                A77979250D6B9E64003851B9 /* JSImageData.h */,
+                               7C193BFB1F5E10C40088F3E6 /* JSImageSmoothingQuality.cpp */,
+                               7C193BFC1F5E10C50088F3E6 /* JSImageSmoothingQuality.h */,
                                CD27F6E2145767580078207D /* JSMediaController.cpp */,
                                CD27F6E3145767580078207D /* JSMediaController.h */,
                                2D9BF70F1DBFD8CE007A7D99 /* JSMediaEncryptedEvent.cpp */,
                                31078CC61880AAAA008099DC /* JSOESTextureHalfFloatLinear.h */,
                                77A17AA212F28B2A004E02F6 /* JSOESVertexArrayObject.cpp */,
                                77A17AA312F28B2A004E02F6 /* JSOESVertexArrayObject.h */,
+                               7C193BFD1F5E10D60088F3E6 /* JSPath2D.cpp */,
+                               7C193BFE1F5E10D70088F3E6 /* JSPath2D.h */,
                                B658FF9F1522EF3A00DD5595 /* JSRadioNodeList.cpp */,
                                B658FFA01522EF3A00DD5595 /* JSRadioNodeList.h */,
                                BCEF45F30E687B5C001C1287 /* JSTextMetrics.cpp */,
                                073B87691E4385AC0071C0EC /* AudioSampleDataSource.h in Headers */,
                                FD8C46EC154608E700A5910C /* AudioScheduledSourceNode.h in Headers */,
                                CDA7982A170A3D0000D45C55 /* AudioSession.h in Headers */,
+                               7C193BF61F5E10990088F3E6 /* JSCanvasLineJoin.h in Headers */,
                                FD31608912B026F700C1A359 /* AudioSourceProvider.h in Headers */,
                                CD8A7BBC197735FE00CBD643 /* AudioSourceProviderAVFObjC.h in Headers */,
                                FD62F52E145898D80094B0ED /* AudioSourceProviderClient.h in Headers */,
                                CE799FA41C6A503A0097B518 /* ContentSecurityPolicyDirective.h in Headers */,
                                CE799F9C1C6A4BCD0097B518 /* ContentSecurityPolicyDirectiveList.h in Headers */,
                                CE2849871CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h in Headers */,
+                               7C193BBB1F5E0EED0088F3E6 /* CanvasDirection.h in Headers */,
                                CE7E17831C83A49100AD06AF /* ContentSecurityPolicyHash.h in Headers */,
                                CE799FA81C6A50570097B518 /* ContentSecurityPolicyMediaListDirective.h in Headers */,
                                CE6DADFA1C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h in Headers */,
                                31BC742E1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.h in Headers */,
                                CAE9F910146441F000C245B0 /* CSSAspectRatioValue.h in Headers */,
                                94DE5C821D7F3A1400164F2A /* CSSAtRuleID.h in Headers */,
+                               7C193BF21F5E10990088F3E6 /* JSCanvasFillRule.h in Headers */,
                                FBD6AF8815EF25C9008B7110 /* CSSBasicShapes.h in Headers */,
                                E16A84FA14C85CCC002977DF /* CSSBorderImage.h in Headers */,
                                BC274B2F140EBEB200EADFA6 /* CSSBorderImageSliceValue.h in Headers */,
                                52B6C9C315E3F4DF00690B05 /* DOMNamedFlowCollection.h in Headers */,
                                1ACE53E80A8D18E70022947D /* DOMParser.h in Headers */,
                                7A54881714E432A1006AE05A /* DOMPatchSupport.h in Headers */,
-                               FB91392416AE4C17001FE682 /* DOMPath.h in Headers */,
                                A9C6E4EC0D745E2B006442E9 /* DOMPlugin.h in Headers */,
                                A9C6E4F00D745E38006442E9 /* DOMPluginArray.h in Headers */,
                                0F49669D1DB408C100A274BB /* DOMPoint.h in Headers */,
                                A853123D11D0471B00D4D077 /* FragmentScriptingPermission.h in Headers */,
                                65BF022F0974816300C43196 /* Frame.h in Headers */,
                                974A862314B7ADBB003FDC76 /* FrameDestructionObserver.h in Headers */,
+                               7C193BF81F5E10990088F3E6 /* JSCanvasTextAlign.h in Headers */,
                                656D373C0ADBA5DE00A4554D /* FrameLoader.h in Headers */,
                                656D373E0ADBA5DE00A4554D /* FrameLoaderClient.h in Headers */,
                                D000EBA311BDAFD400C47726 /* FrameLoaderStateMachine.h in Headers */,
                                65A21485097A3F5300B9050A /* FrameTree.h in Headers */,
                                65CBFEFA0974F607001DAC25 /* FrameView.h in Headers */,
                                97205AB0123928CA00B17380 /* FTPDirectoryDocument.h in Headers */,
+                               7C193C031F5E11050088F3E6 /* JSPath2D.h in Headers */,
                                51C81B8A0C4422F70019ECE3 /* FTPDirectoryParser.h in Headers */,
                                26B999931803B9D900D01121 /* FunctionCall.h in Headers */,
                                FD31600D12B0267600C1A359 /* GainNode.h in Headers */,
                                5185FC9E1BB4C4E80012898F /* IDBKeyRangeData.h in Headers */,
                                5185FCA01BB4C4E80012898F /* IDBObjectStore.h in Headers */,
                                5160712F1BD8307800DBC4F2 /* IDBObjectStoreInfo.h in Headers */,
+                               7C193BC01F5E0EED0088F3E6 /* CanvasTextBaseline.h in Headers */,
                                5185FCA41BB4C4E80012898F /* IDBOpenDBRequest.h in Headers */,
                                5185FCA71BB4C4E80012898F /* IDBRecordIdentifier.h in Headers */,
                                5185FCA91BB4C4E80012898F /* IDBRequest.h in Headers */,
                                26F756B31B3B66F70005DD79 /* ImmutableNFA.h in Headers */,
                                26F756B51B3B68F20005DD79 /* ImmutableNFANodeBuilder.h in Headers */,
                                316FE1180E6E1DA700BF6088 /* ImplicitAnimation.h in Headers */,
+                               7C193BC21F5E0EED0088F3E6 /* Path2D.h in Headers */,
                                BE961C5518AD338C00D07DC5 /* InbandDataTextTrack.h in Headers */,
                                BE16C59317CFE17200852C04 /* InbandGenericTextTrack.h in Headers */,
                                07E9E12E18F5E2760011A3A4 /* InbandMetadataTextTrackPrivateAVF.h in Headers */,
                                7C8139A71ED6287400CE26E8 /* JSDOMOperation.h in Headers */,
                                7C8139A81ED6287400CE26E8 /* JSDOMOperationReturningPromise.h in Headers */,
                                1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */,
-                               FB91392A16AE4FC0001FE682 /* JSDOMPath.h in Headers */,
                                A9D247FF0D757E6900FDF959 /* JSDOMPlugin.h in Headers */,
                                A9D248010D757E6900FDF959 /* JSDOMPluginArray.h in Headers */,
                                0F4966AB1DB40C4300A274BB /* JSDOMPoint.h in Headers */,
                                8367587F1C56E99B008A1087 /* JSHTMLDataElement.h in Headers */,
                                F5C041E70FFCA96D00839D4A /* JSHTMLDataListElement.h in Headers */,
                                D359D8BF129CA55C0006E5D2 /* JSHTMLDetailsElement.h in Headers */,
-                               76808B50159DADFA002B5233 /* JSHTMLDialogElement.h in Headers */,
                                1A85B1E70A1B240500D8C87C /* JSHTMLDirectoryElement.h in Headers */,
                                1A85B2B70A1B2AC700D8C87C /* JSHTMLDivElement.h in Headers */,
                                1A85B1E90A1B240500D8C87C /* JSHTMLDListElement.h in Headers */,
                                2D9BF72D1DBFDB19007A7D99 /* JSMediaKeySystemConfiguration.h in Headers */,
                                2D9BF72E1DBFDB1C007A7D99 /* JSMediaKeySystemMediaCapability.h in Headers */,
                                BC3C39B70C0D3D8D005F4D7A /* JSMediaList.h in Headers */,
+                               7C193BF01F5E10990088F3E6 /* JSCanvasDirection.h in Headers */,
                                93D437A31D57B7E200AB85EA /* JSMediaListCustom.h in Headers */,
                                D3A94A47122DC40F00A37BBC /* JSMediaQueryList.h in Headers */,
                                7C5343FD17B74B63004232F0 /* JSMediaQueryListListener.h in Headers */,
                                77A17AA712F28B2A004E02F6 /* JSOESVertexArrayObject.h in Headers */,
                                FDF6BAF9134A4C9800822920 /* JSOfflineAudioCompletionEvent.h in Headers */,
                                FDA9326716703BA9008982DC /* JSOfflineAudioContext.h in Headers */,
+                               7C193BBF1F5E0EED0088F3E6 /* CanvasTextAlign.h in Headers */,
                                57E233651DC7DB1F00F28D01 /* JsonWebKey.h in Headers */,
                                FDEA6243152102E200479DF0 /* JSOscillatorNode.h in Headers */,
                                0704A40C1D6DFC690086DCDB /* JSOverconstrainedError.h in Headers */,
                                B59DD6A911902A71007E9684 /* JSSQLStatementErrorCallback.h in Headers */,
                                BC82432A0D0CE8A200460C8F /* JSSQLTransaction.h in Headers */,
                                B59DD69D11902A42007E9684 /* JSSQLTransactionCallback.h in Headers */,
+                               7C193BBD1F5E0EED0088F3E6 /* CanvasLineCap.h in Headers */,
                                B59DD6A111902A52007E9684 /* JSSQLTransactionErrorCallback.h in Headers */,
                                A86629D309DA2B48009633A7 /* JSStaticRange.h in Headers */,
                                51E0BAEB0DA55D4A00A9E417 /* JSStorageEvent.h in Headers */,
                                979F43D41075E44A0000F83B /* NavigationScheduler.h in Headers */,
                                A9C6E5A60D746458006442E9 /* Navigator.h in Headers */,
                                E12719C70EEEC16800F61213 /* NavigatorBase.h in Headers */,
+                               7C193BFA1F5E10990088F3E6 /* JSCanvasTextBaseline.h in Headers */,
                                8321507E1F27EA1B0095B136 /* NavigatorBeacon.h in Headers */,
                                77D510201ED72D5F00DA4C87 /* NavigatorCredentials.h in Headers */,
                                9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */,
                                0F5E200618E771FC003EC3E5 /* PlatformCAAnimationCocoa.h in Headers */,
                                0F13163E16ED0CC80035CC04 /* PlatformCAFilters.h in Headers */,
                                499B3EC5128CCC4700E726C2 /* PlatformCALayer.h in Headers */,
+                               7C193BC11F5E0EED0088F3E6 /* ImageSmoothingQuality.h in Headers */,
                                493E5E0912D6420500020081 /* PlatformCALayerClient.h in Headers */,
                                2D70BA1318074DDF0001908A /* PlatformCALayerCocoa.h in Headers */,
                                A14978711ABAF3A500CEF7E4 /* PlatformContentFilter.h in Headers */,
                                BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
                                FD45A958175D414C00C21EC8 /* RectangleShape.h in Headers */,
                                9831AE4A154225C900FE2644 /* ReferrerPolicy.h in Headers */,
+                               7C193BF41F5E10990088F3E6 /* JSCanvasLineCap.h in Headers */,
                                BCAB418213E356E800D8AAF3 /* Region.h in Headers */,
                                6CDDE8D01770BB220016E072 /* RegionOversetState.h in Headers */,
                                26B9998F1803AE7200D01121 /* RegisterAllocator.h in Headers */,
                                9B32CDA913DF7FA900F34D13 /* RenderedPosition.h in Headers */,
                                E43A023B17EB370A004CDD25 /* RenderElement.h in Headers */,
                                0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */,
+                               7C193BBC1F5E0EED0088F3E6 /* CanvasFillRule.h in Headers */,
                                066C77310AB603FD00238CC4 /* RenderFileUploadControl.h in Headers */,
                                53C8298E13D8D92700DE2DEB /* RenderFlexibleBox.h in Headers */,
                                508CCA4F13CF106B003151F3 /* RenderFlowThread.h in Headers */,
                                FD45A95B175D41EE00C21EC8 /* ShapeInterval.h in Headers */,
                                FD45A952175D3F3E00C21EC8 /* ShapeOutsideInfo.h in Headers */,
                                FD1AF1501656F15100C6D4F7 /* ShapeValue.h in Headers */,
+                               7C193BBE1F5E0EED0088F3E6 /* CanvasLineJoin.h in Headers */,
                                1A4A954E0B4EDCCB002D8C3C /* SharedBuffer.h in Headers */,
                                93309EA3099EB78C0056E581 /* SharedTimer.h in Headers */,
                                E48944A3180B57D800F165D8 /* SimpleLineLayout.h in Headers */,
                                B22279C00D00BF220071B782 /* SVGEllipseElement.h in Headers */,
                                B22279C50D00BF220071B782 /* SVGExternalResourcesRequired.h in Headers */,
                                B22279C80D00BF220071B782 /* SVGFEBlendElement.h in Headers */,
+                               7C193C011F5E11050088F3E6 /* JSImageSmoothingQuality.h in Headers */,
                                B22279CB0D00BF220071B782 /* SVGFEColorMatrixElement.h in Headers */,
                                B22279CE0D00BF220071B782 /* SVGFEComponentTransferElement.h in Headers */,
                                B22279D10D00BF220071B782 /* SVGFECompositeElement.h in Headers */,
                                CE7B2DB41586ABAD0098B3FA /* AlternativeTextUIController.mm in Sources */,
                                FD31603D12B0267600C1A359 /* AnalyserNode.cpp in Sources */,
                                31A795C81888BCB500382F90 /* ANGLEInstancedArrays.cpp in Sources */,
+                               7C193BF31F5E10990088F3E6 /* JSCanvasLineCap.cpp in Sources */,
                                490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */,
                                49E912AA0EFAC906009D0CAF /* Animation.cpp in Sources */,
                                316FE1110E6E1DA700BF6088 /* AnimationBase.cpp in Sources */,
                                570440531E5278B200356601 /* CryptoAlgorithmAES_CFB.cpp in Sources */,
                                570440581E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp in Sources */,
                                57E1E5A21E8C91B500EE37C9 /* CryptoAlgorithmAES_CTR.cpp in Sources */,
+                               7C193BF11F5E10990088F3E6 /* JSCanvasFillRule.cpp in Sources */,
                                57E1E5B11E8DD3A100EE37C9 /* CryptoAlgorithmAES_CTRMac.cpp in Sources */,
                                57B5F7F81E5BE84000F34F90 /* CryptoAlgorithmAES_GCM.cpp in Sources */,
                                57B5F80E1E5D2F2D00F34F90 /* CryptoAlgorithmAES_GCMMac.cpp in Sources */,
                                52B6C9C215E3F4DF00690B05 /* DOMNamedFlowCollection.cpp in Sources */,
                                1ACE53E70A8D18E70022947D /* DOMParser.cpp in Sources */,
                                7A54881814E432A1006AE05A /* DOMPatchSupport.cpp in Sources */,
-                               2D5002F81B56D7810020AAF7 /* DOMPath.cpp in Sources */,
                                A9C6E4EB0D745E2B006442E9 /* DOMPlugin.cpp in Sources */,
                                A9C6E4EF0D745E38006442E9 /* DOMPluginArray.cpp in Sources */,
                                0FF835B81EE3274F008B4CC7 /* DOMPointReadOnly.cpp in Sources */,
                                A8CFF7A40A156978000A4234 /* HTMLAnchorElement.cpp in Sources */,
                                A871D45E0A127CBC00B12A68 /* HTMLAppletElement.cpp in Sources */,
                                A8EA7D2F0A19385500A8EF5F /* HTMLAreaElement.cpp in Sources */,
+                               7C193C001F5E11050088F3E6 /* JSImageSmoothingQuality.cpp in Sources */,
                                7C5F28FB1A827D8400C0F31F /* HTMLAttachmentElement.cpp in Sources */,
                                E44613A10CD6331000FADA75 /* HTMLAudioElement.cpp in Sources */,
                                A871DC2A0A15205700B12A68 /* HTMLBaseElement.cpp in Sources */,
                                BC5825F30C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp in Sources */,
                                BC46C2060C0DDCA10020CFC3 /* JSCSSStyleRule.cpp in Sources */,
                                BCC5BE000C0E93110011C2DB /* JSCSSStyleSheet.cpp in Sources */,
+                               7C193BF91F5E10990088F3E6 /* JSCanvasTextBaseline.cpp in Sources */,
                                FD67773A195CB14A0072E0D3 /* JSCSSSupportsRule.cpp in Sources */,
                                9BD4E9161C462872005065BC /* JSCustomElementInterface.cpp in Sources */,
                                9BE6710B1D5AEB2100345514 /* JSCustomElementRegistry.cpp in Sources */,
                                A9D248080D757E7D00FDF959 /* JSDOMMimeTypeArray.cpp in Sources */,
                                52CCA9E215E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp in Sources */,
                                1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */,
-                               FB91392B16AE4FC0001FE682 /* JSDOMPath.cpp in Sources */,
                                A9D247FE0D757E6900FDF959 /* JSDOMPlugin.cpp in Sources */,
                                A9D248000D757E6900FDF959 /* JSDOMPluginArray.cpp in Sources */,
                                0F4966AA1DB40C4300A274BB /* JSDOMPoint.cpp in Sources */,
                                1AE2AB210A1CE63B00B42B25 /* JSHTMLLabelElement.cpp in Sources */,
                                1AE2AB230A1CE63B00B42B25 /* JSHTMLLegendElement.cpp in Sources */,
                                1AE2AB250A1CE63B00B42B25 /* JSHTMLLIElement.cpp in Sources */,
+                               7C193BF71F5E10990088F3E6 /* JSCanvasTextAlign.cpp in Sources */,
                                A80E7B100A19D606007FB8C5 /* JSHTMLLinkElement.cpp in Sources */,
                                1AE2AB270A1CE63B00B42B25 /* JSHTMLMapElement.cpp in Sources */,
                                BC491B780C023EFD009D6316 /* JSHTMLMarqueeElement.cpp in Sources */,
                                05D913CEEAB2A60534218ACF /* MathMLMencloseElement.cpp in Sources */,
                                FABE72FE1059C21100D999DD /* MathMLNames.cpp in Sources */,
                                16EA24CEEAB2A60534218ACF /* MathMLOperatorDictionary.cpp in Sources */,
+                               7C193C021F5E11050088F3E6 /* JSPath2D.cpp in Sources */,
                                FA654A6B1108ABED002616F1 /* MathMLOperatorElement.cpp in Sources */,
                                B59CA390CED66C3255F72C59 /* MathMLPaddedElement.cpp in Sources */,
                                FABE72F61059C1EB00D999DD /* MathMLPresentationElement.cpp in Sources */,
                                C6F0900E14327B6100685849 /* MutationObserver.cpp in Sources */,
                                D6E528A3149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp in Sources */,
                                D6E276AF14637455001D280A /* MutationObserverRegistration.cpp in Sources */,
+                               7C193BEF1F5E10990088F3E6 /* JSCanvasDirection.cpp in Sources */,
                                C6F08FBC1430FE8F00685849 /* MutationRecord.cpp in Sources */,
                                52B6C9C515E3F4DF00690B05 /* NamedFlowCollection.cpp in Sources */,
                                314BE3A61B3103FB00141982 /* NamedImageGeneratedImage.cpp in Sources */,
                                CDA29A301CBF74D400901CCF /* PlaybackSessionInterfaceAVKit.mm in Sources */,
                                CDA29A161CBDA56C00901CCF /* PlaybackSessionInterfaceMac.mm in Sources */,
                                CDA29A0E1CBD9CFE00901CCF /* PlaybackSessionModelMediaElement.mm in Sources */,
+                               7C193BF51F5E10990088F3E6 /* JSCanvasLineJoin.cpp in Sources */,
                                1AFFC4551D5E81D000267A66 /* PluginBlacklist.mm in Sources */,
                                A9C6E4F30D745E48006442E9 /* PluginData.cpp in Sources */,
                                97205ABB1239292700B17380 /* PluginDocument.cpp in Sources */,
                                31A089131E737D51003B6609 /* WebGPURenderPassDescriptor.cpp in Sources */,
                                31A089141E737D51003B6609 /* WebGPURenderPipelineColorAttachmentDescriptor.cpp in Sources */,
                                31A089151E737D51003B6609 /* WebGPURenderPipelineDescriptor.cpp in Sources */,
+                               7C193C061F5E1FFD0088F3E6 /* Path2D.cpp in Sources */,
                                31A089161E737D51003B6609 /* WebGPURenderPipelineState.cpp in Sources */,
                                31A089171E737D51003B6609 /* WebGPUTexture.cpp in Sources */,
                                31A089181E737D51003B6609 /* WebGPUTextureDescriptor.cpp in Sources */,
index c2378a8..69cea6f 100644 (file)
 #include "CanvasPattern.h"
 #include "CanvasRenderingContext2D.h"
 #include "DOMMatrix2DInit.h"
-#include "DOMPath.h"
 #include "Element.h"
 #include "HTMLCanvasElement.h"
 #include "HTMLImageElement.h"
 #include "HTMLVideoElement.h"
 #include "ImageData.h"
+#include "Path2D.h"
 #include <runtime/ArrayBuffer.h>
 #include <runtime/ArrayBufferView.h>
 #include <runtime/Float32Array.h>
 namespace WebCore {
 
 typedef Variant<
-    CanvasRenderingContext2D::ImageSmoothingQuality,
-    CanvasRenderingContext2D::WindingRule,
+    ImageSmoothingQuality,
+    CanvasDirection,
+    CanvasFillRule,
+    CanvasLineCap,
+    CanvasLineJoin,
+    CanvasTextAlign,
+    CanvasTextBaseline,
     DOMMatrix2DInit,
-    DOMPath*,
+    Path2D*,
     Element*,
     HTMLImageElement*,
     ImageData*,
index bd1bac9..3be82ec 100644 (file)
@@ -2044,8 +2044,8 @@ sub GenerateEnumerationImplementationContent
     my $result = "";
     $result .= "#if ${conditionalString}\n\n" if $conditionalString;
 
-    # FIXME: Change to take VM& instead of ExecState*.
-    $result .= "template<> JSString* convertEnumerationToJS(ExecState& state, $className enumerationValue)\n";
+
+    $result .= "String convertEnumerationToString($className enumerationValue)\n";
     $result .= "{\n";
     AddToImplIncludes("<wtf/NeverDestroyed.h>");
     $result .= "    static const NeverDestroyed<String> values[] = {\n";
@@ -2064,7 +2064,14 @@ sub GenerateEnumerationImplementationContent
         $index++;
     }
     $result .= "    ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));\n";
-    $result .= "    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);\n";
+    $result .= "    return values[static_cast<size_t>(enumerationValue)];\n";
+    $result .= "}\n\n";
+
+
+    # FIXME: Change to take VM& instead of ExecState*.
+    $result .= "template<> JSString* convertEnumerationToJS(ExecState& state, $className enumerationValue)\n";
+    $result .= "{\n";
+    $result .= "    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));\n";
     $result .= "}\n\n";
 
     # FIXME: Change to take VM& instead of ExecState&.
@@ -2121,6 +2128,7 @@ sub GenerateEnumerationHeaderContent
 
     my $exportMacro = GetExportMacroForJSClass($enumeration);
 
+    $result .= "${exportMacro}String convertEnumerationToString($className);\n";
     $result .= "template<> ${exportMacro}JSC::JSString* convertEnumerationToJS(JSC::ExecState&, $className);\n\n";
     $result .= "template<> ${exportMacro}std::optional<$className> parseEnumeration<$className>(JSC::ExecState&, JSC::JSValue);\n";
     $result .= "template<> ${exportMacro}const char* expectedEnumerationValues<$className>();\n\n";
@@ -5566,7 +5574,7 @@ sub GenerateParametersCheck
     foreach my $argument (@{$operation->arguments}) {
         my $type = $argument->type;
 
-        die "Optional arguments of non-nullable wrapper types are not supported" if $argument->isOptional && !$type->isNullable && $codeGenerator->IsWrapperType($type);
+        assert "Optional arguments of non-nullable wrapper types are not supported (" . $operation->name . ")" if $argument->isOptional && !$type->isNullable && $codeGenerator->IsWrapperType($type);
 
         if ($argument->isOptional && !defined($argument->default)) {
             # As per Web IDL, optional dictionary arguments are always considered to have a default value of an empty dictionary, unless otherwise specified.
index 6002277..d1511b9 100644 (file)
@@ -47,7 +47,7 @@ using namespace JSC;
 
 namespace WebCore {
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestCallbackInterface::Enum enumerationValue)
+String convertEnumerationToString(TestCallbackInterface::Enum enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("value1"),
@@ -56,7 +56,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestCallbackInterf
     static_assert(static_cast<size_t>(TestCallbackInterface::Enum::Value1) == 0, "TestCallbackInterface::Enum::Value1 is not 0 as expected");
     static_assert(static_cast<size_t>(TestCallbackInterface::Enum::Value2) == 1, "TestCallbackInterface::Enum::Value2 is not 1 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestCallbackInterface::Enum enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestCallbackInterface::Enum> parseEnumeration<TestCallbackInterface::Enum>(ExecState& state, JSValue value)
index f973aea..7b6047f 100644 (file)
@@ -66,6 +66,7 @@ private:
 JSC::JSValue toJS(TestCallbackInterface&);
 inline JSC::JSValue toJS(TestCallbackInterface* impl) { return impl ? toJS(*impl) : JSC::jsNull(); }
 
+String convertEnumerationToString(TestCallbackInterface::Enum);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestCallbackInterface::Enum);
 
 template<> std::optional<TestCallbackInterface::Enum> parseEnumeration<TestCallbackInterface::Enum>(JSC::ExecState&, JSC::JSValue);
index a1746b4..2ae1b68 100644 (file)
@@ -113,7 +113,7 @@ using namespace JSC;
 
 namespace WebCore {
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumType enumerationValue)
+String convertEnumerationToString(TestObj::EnumType enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         emptyString(),
@@ -126,7 +126,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumType
     static_assert(static_cast<size_t>(TestObj::EnumType::EnumValue2) == 2, "TestObj::EnumType::EnumValue2 is not 2 as expected");
     static_assert(static_cast<size_t>(TestObj::EnumType::EnumValue3) == 3, "TestObj::EnumType::EnumValue3 is not 3 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumType enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::EnumType> parseEnumeration<TestObj::EnumType>(ExecState& state, JSValue value)
@@ -148,7 +153,7 @@ template<> const char* expectedEnumerationValues<TestObj::EnumType>()
     return "\"\", \"enumValue1\", \"EnumValue2\", \"EnumValue3\"";
 }
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Optional enumerationValue)
+String convertEnumerationToString(TestObj::Optional enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         emptyString(),
@@ -161,7 +166,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Optional
     static_assert(static_cast<size_t>(TestObj::Optional::OptionalValue2) == 2, "TestObj::Optional::OptionalValue2 is not 2 as expected");
     static_assert(static_cast<size_t>(TestObj::Optional::OptionalValue3) == 3, "TestObj::Optional::OptionalValue3 is not 3 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Optional enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::Optional> parseEnumeration<TestObj::Optional>(ExecState& state, JSValue value)
@@ -183,7 +193,7 @@ template<> const char* expectedEnumerationValues<TestObj::Optional>()
     return "\"\", \"OptionalValue1\", \"OptionalValue2\", \"OptionalValue3\"";
 }
 
-template<> JSString* convertEnumerationToJS(ExecState& state, AlternateEnumName enumerationValue)
+String convertEnumerationToString(AlternateEnumName enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("enumValue1"),
@@ -192,7 +202,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, AlternateEnumName
     static_assert(static_cast<size_t>(AlternateEnumName::EnumValue1) == 0, "AlternateEnumName::EnumValue1 is not 0 as expected");
     static_assert(static_cast<size_t>(AlternateEnumName::EnumValue2) == 1, "AlternateEnumName::EnumValue2 is not 1 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, AlternateEnumName enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<AlternateEnumName> parseEnumeration<AlternateEnumName>(ExecState& state, JSValue value)
@@ -212,14 +227,19 @@ template<> const char* expectedEnumerationValues<AlternateEnumName>()
 
 #if ENABLE(Condition1)
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumA enumerationValue)
+String convertEnumerationToString(TestObj::EnumA enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("A"),
     };
     static_assert(static_cast<size_t>(TestObj::EnumA::A) == 0, "TestObj::EnumA::A is not 0 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumA enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::EnumA> parseEnumeration<TestObj::EnumA>(ExecState& state, JSValue value)
@@ -239,14 +259,19 @@ template<> const char* expectedEnumerationValues<TestObj::EnumA>()
 
 #if ENABLE(Condition1) && ENABLE(Condition2)
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumB enumerationValue)
+String convertEnumerationToString(TestObj::EnumB enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("B"),
     };
     static_assert(static_cast<size_t>(TestObj::EnumB::B) == 0, "TestObj::EnumB::B is not 0 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumB enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::EnumB> parseEnumeration<TestObj::EnumB>(ExecState& state, JSValue value)
@@ -266,14 +291,19 @@ template<> const char* expectedEnumerationValues<TestObj::EnumB>()
 
 #if ENABLE(Condition1) || ENABLE(Condition2)
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumC enumerationValue)
+String convertEnumerationToString(TestObj::EnumC enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("C"),
     };
     static_assert(static_cast<size_t>(TestObj::EnumC::C) == 0, "TestObj::EnumC::C is not 0 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::EnumC enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::EnumC> parseEnumeration<TestObj::EnumC>(ExecState& state, JSValue value)
@@ -291,7 +321,7 @@ template<> const char* expectedEnumerationValues<TestObj::EnumC>()
 
 #endif
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Kind enumerationValue)
+String convertEnumerationToString(TestObj::Kind enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("quick"),
@@ -300,7 +330,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Kind enum
     static_assert(static_cast<size_t>(TestObj::Kind::Quick) == 0, "TestObj::Kind::Quick is not 0 as expected");
     static_assert(static_cast<size_t>(TestObj::Kind::Dead) == 1, "TestObj::Kind::Dead is not 1 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Kind enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::Kind> parseEnumeration<TestObj::Kind>(ExecState& state, JSValue value)
@@ -318,7 +353,7 @@ template<> const char* expectedEnumerationValues<TestObj::Kind>()
     return "\"quick\", \"dead\"";
 }
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Size enumerationValue)
+String convertEnumerationToString(TestObj::Size enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("small"),
@@ -327,7 +362,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Size enum
     static_assert(static_cast<size_t>(TestObj::Size::Small) == 0, "TestObj::Size::Small is not 0 as expected");
     static_assert(static_cast<size_t>(TestObj::Size::MuchMuchLarger) == 1, "TestObj::Size::MuchMuchLarger is not 1 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Size enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::Size> parseEnumeration<TestObj::Size>(ExecState& state, JSValue value)
@@ -345,7 +385,7 @@ template<> const char* expectedEnumerationValues<TestObj::Size>()
     return "\"small\", \"much-much-larger\"";
 }
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Confidence enumerationValue)
+String convertEnumerationToString(TestObj::Confidence enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("high"),
@@ -354,7 +394,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Confidenc
     static_assert(static_cast<size_t>(TestObj::Confidence::High) == 0, "TestObj::Confidence::High is not 0 as expected");
     static_assert(static_cast<size_t>(TestObj::Confidence::KindaLow) == 1, "TestObj::Confidence::KindaLow is not 1 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestObj::Confidence enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestObj::Confidence> parseEnumeration<TestObj::Confidence>(ExecState& state, JSValue value)
index 489440c..c745216 100644 (file)
@@ -108,16 +108,19 @@ template<> struct JSDOMWrapperConverterTraits<TestObj> {
     using WrapperClass = JSTestObj;
     using ToWrappedReturnType = TestObj*;
 };
+String convertEnumerationToString(TestObj::EnumType);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::EnumType);
 
 template<> std::optional<TestObj::EnumType> parseEnumeration<TestObj::EnumType>(JSC::ExecState&, JSC::JSValue);
 template<> const char* expectedEnumerationValues<TestObj::EnumType>();
 
+String convertEnumerationToString(TestObj::Optional);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::Optional);
 
 template<> std::optional<TestObj::Optional> parseEnumeration<TestObj::Optional>(JSC::ExecState&, JSC::JSValue);
 template<> const char* expectedEnumerationValues<TestObj::Optional>();
 
+String convertEnumerationToString(AlternateEnumName);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, AlternateEnumName);
 
 template<> std::optional<AlternateEnumName> parseEnumeration<AlternateEnumName>(JSC::ExecState&, JSC::JSValue);
@@ -125,6 +128,7 @@ template<> const char* expectedEnumerationValues<AlternateEnumName>();
 
 #if ENABLE(Condition1)
 
+String convertEnumerationToString(TestObj::EnumA);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::EnumA);
 
 template<> std::optional<TestObj::EnumA> parseEnumeration<TestObj::EnumA>(JSC::ExecState&, JSC::JSValue);
@@ -134,6 +138,7 @@ template<> const char* expectedEnumerationValues<TestObj::EnumA>();
 
 #if ENABLE(Condition1) && ENABLE(Condition2)
 
+String convertEnumerationToString(TestObj::EnumB);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::EnumB);
 
 template<> std::optional<TestObj::EnumB> parseEnumeration<TestObj::EnumB>(JSC::ExecState&, JSC::JSValue);
@@ -143,6 +148,7 @@ template<> const char* expectedEnumerationValues<TestObj::EnumB>();
 
 #if ENABLE(Condition1) || ENABLE(Condition2)
 
+String convertEnumerationToString(TestObj::EnumC);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::EnumC);
 
 template<> std::optional<TestObj::EnumC> parseEnumeration<TestObj::EnumC>(JSC::ExecState&, JSC::JSValue);
@@ -150,16 +156,19 @@ template<> const char* expectedEnumerationValues<TestObj::EnumC>();
 
 #endif
 
+String convertEnumerationToString(TestObj::Kind);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::Kind);
 
 template<> std::optional<TestObj::Kind> parseEnumeration<TestObj::Kind>(JSC::ExecState&, JSC::JSValue);
 template<> const char* expectedEnumerationValues<TestObj::Kind>();
 
+String convertEnumerationToString(TestObj::Size);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::Size);
 
 template<> std::optional<TestObj::Size> parseEnumeration<TestObj::Size>(JSC::ExecState&, JSC::JSValue);
 template<> const char* expectedEnumerationValues<TestObj::Size>();
 
+String convertEnumerationToString(TestObj::Confidence);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestObj::Confidence);
 
 template<> std::optional<TestObj::Confidence> parseEnumeration<TestObj::Confidence>(JSC::ExecState&, JSC::JSValue);
index 9684439..35ba1f5 100644 (file)
@@ -67,7 +67,7 @@ template<> DictionaryImplName convertDictionary<DictionaryImplName>(ExecState& s
 
 #endif
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestStandaloneDictionary::EnumInStandaloneDictionaryFile enumerationValue)
+String convertEnumerationToString(TestStandaloneDictionary::EnumInStandaloneDictionaryFile enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("enumValue1"),
@@ -76,7 +76,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestStandaloneDict
     static_assert(static_cast<size_t>(TestStandaloneDictionary::EnumInStandaloneDictionaryFile::EnumValue1) == 0, "TestStandaloneDictionary::EnumInStandaloneDictionaryFile::EnumValue1 is not 0 as expected");
     static_assert(static_cast<size_t>(TestStandaloneDictionary::EnumInStandaloneDictionaryFile::EnumValue2) == 1, "TestStandaloneDictionary::EnumInStandaloneDictionaryFile::EnumValue2 is not 1 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestStandaloneDictionary::EnumInStandaloneDictionaryFile enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestStandaloneDictionary::EnumInStandaloneDictionaryFile> parseEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>(ExecState& state, JSValue value)
index 4224c0c..5a17150 100644 (file)
@@ -30,6 +30,7 @@ namespace WebCore {
 
 template<> DictionaryImplName convertDictionary<DictionaryImplName>(JSC::ExecState&, JSC::JSValue);
 
+String convertEnumerationToString(TestStandaloneDictionary::EnumInStandaloneDictionaryFile);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestStandaloneDictionary::EnumInStandaloneDictionaryFile);
 
 template<> std::optional<TestStandaloneDictionary::EnumInStandaloneDictionaryFile> parseEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>(JSC::ExecState&, JSC::JSValue);
index 1107293..8cf1194 100644 (file)
@@ -32,7 +32,7 @@ using namespace JSC;
 
 namespace WebCore {
 
-template<> JSString* convertEnumerationToJS(ExecState& state, TestStandaloneEnumeration enumerationValue)
+String convertEnumerationToString(TestStandaloneEnumeration enumerationValue)
 {
     static const NeverDestroyed<String> values[] = {
         MAKE_STATIC_STRING_IMPL("enumValue1"),
@@ -41,7 +41,12 @@ template<> JSString* convertEnumerationToJS(ExecState& state, TestStandaloneEnum
     static_assert(static_cast<size_t>(TestStandaloneEnumeration::EnumValue1) == 0, "TestStandaloneEnumeration::EnumValue1 is not 0 as expected");
     static_assert(static_cast<size_t>(TestStandaloneEnumeration::EnumValue2) == 1, "TestStandaloneEnumeration::EnumValue2 is not 1 as expected");
     ASSERT(static_cast<size_t>(enumerationValue) < WTF_ARRAY_LENGTH(values));
-    return jsStringWithCache(&state, values[static_cast<size_t>(enumerationValue)]);
+    return values[static_cast<size_t>(enumerationValue)];
+}
+
+template<> JSString* convertEnumerationToJS(ExecState& state, TestStandaloneEnumeration enumerationValue)
+{
+    return jsStringWithCache(&state, convertEnumerationToString(enumerationValue));
 }
 
 template<> std::optional<TestStandaloneEnumeration> parseEnumeration<TestStandaloneEnumeration>(ExecState& state, JSValue value)
index 09f5d78..a0e7bd9 100644 (file)
@@ -27,6 +27,7 @@
 
 namespace WebCore {
 
+String convertEnumerationToString(TestStandaloneEnumeration);
 template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, TestStandaloneEnumeration);
 
 template<> std::optional<TestStandaloneEnumeration> parseEnumeration<TestStandaloneEnumeration>(JSC::ExecState&, JSC::JSValue);
index 5e3fdc9..97a44ed 100644 (file)
  */
 
 [
-    Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh = 0),
     Constructor(unsigned long sw, unsigned long sh),
+    Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh = 0), // FIXME: sh should not have a default value
     ConstructorMayThrowException,
     CustomToJSObject,
     ExportMacro=WEBCORE_EXPORT,
     Exposed=(Window,Worker),
-    ImplementationLacksVTable,
+    ImplementationLacksVTable
 ] interface ImageData {
     readonly attribute unsigned long width;
     readonly attribute unsigned long height;
index 361706c..0af5092 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 [
+    Exposed=Window,
     ImplementationLacksVTable,
 ] interface TextMetrics {
-    readonly attribute unrestricted float width;
+    // FIXME: All the unrestricted float attributes below should be doubles.
+
+    // x-direction
+    readonly attribute unrestricted float width; // advance width
     readonly attribute unrestricted float actualBoundingBoxLeft;
     readonly attribute unrestricted float actualBoundingBoxRight;
+
+    // y-direction
     readonly attribute unrestricted float fontBoundingBoxAscent;
     readonly attribute unrestricted float fontBoundingBoxDescent;
     readonly attribute unrestricted float actualBoundingBoxAscent;
diff --git a/Source/WebCore/html/canvas/CanvasCompositing.idl b/Source/WebCore/html/canvas/CanvasCompositing.idl
new file mode 100644 (file)
index 0000000..8acbd43
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasCompositing {
+    // FIXME: All the unrestricted float attributes below should be unrestricted doubles.
+
+    // compositing
+    attribute unrestricted float globalAlpha; // (default 1.0)
+    attribute DOMString globalCompositeOperation; // (default source-over)
+
+
+    // Non-standard legacy functionality
+    void setAlpha(optional unrestricted float alpha = NaN);
+    void setCompositeOperation(optional DOMString compositeOperation = "undefined"); // FIXME: Using "undefined" as default parameter value is wrong.
+};
diff --git a/Source/WebCore/html/canvas/CanvasDirection.h b/Source/WebCore/html/canvas/CanvasDirection.h
new file mode 100644 (file)
index 0000000..c6a9f1e
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class CanvasDirection { Ltr, Rtl, Inherit };
+
+}
diff --git a/Source/WebCore/html/canvas/CanvasDirection.idl b/Source/WebCore/html/canvas/CanvasDirection.idl
new file mode 100644 (file)
index 0000000..aec641b
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+enum CanvasDirection { "ltr", "rtl", "inherit" };
diff --git a/Source/WebCore/html/canvas/CanvasDrawImage.idl b/Source/WebCore/html/canvas/CanvasDrawImage.idl
new file mode 100644 (file)
index 0000000..484a614
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+// FIXME: This should include SVGImageElement and ImageBitmap.
+#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
+typedef (HTMLImageElement or HTMLVideoElement or HTMLCanvasElement) CanvasImageSource;
+#else
+typedef (HTMLImageElement or HTMLCanvasElement) CanvasImageSource;
+#endif
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasDrawImage {
+    // FIXME: All the unrestricted float arguments below should be unrestricted doubles.
+
+    // drawing images
+    [MayThrowException] void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy);
+    [MayThrowException] void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
+    [MayThrowException] void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
+
+
+    // Non-standard legacy functionality.
+    void drawImageFromRect(HTMLImageElement image,
+        optional unrestricted float sx = 0, optional unrestricted float sy = 0, optional unrestricted float sw = 0, optional unrestricted float sh = 0,
+        optional unrestricted float dx = 0, optional unrestricted float dy = 0, optional unrestricted float dw = 0, optional unrestricted float dh = 0,
+        optional DOMString compositeOperation = "");
+};
diff --git a/Source/WebCore/html/canvas/CanvasDrawPath.idl b/Source/WebCore/html/canvas/CanvasDrawPath.idl
new file mode 100644 (file)
index 0000000..bfe5a8d
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasDrawPath {
+    // path API (see also CanvasPath)
+    void beginPath();
+    void fill(optional CanvasFillRule fillRule = "nonzero");
+    void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero");
+    void stroke();
+    void stroke(Path2D path);
+    void clip(optional CanvasFillRule fillRule = "nonzero");
+    void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero");
+    // FIXME: Implement resetClip.
+    // void resetClip();
+
+    // FIXME: All the unrestricted float parameters below should be unrestricted doubles.
+    boolean isPointInPath(unrestricted float x, unrestricted float y, optional CanvasFillRule fillRule = "nonzero");
+    boolean isPointInPath(Path2D path, unrestricted float x, unrestricted float y, optional CanvasFillRule fillRule = "nonzero");
+    boolean isPointInStroke(unrestricted float x, unrestricted float y);
+    boolean isPointInStroke(Path2D path, unrestricted float x, unrestricted float y);
+};
diff --git a/Source/WebCore/html/canvas/CanvasFillRule.h b/Source/WebCore/html/canvas/CanvasFillRule.h
new file mode 100644 (file)
index 0000000..d3ece5c
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class CanvasFillRule { Nonzero, Evenodd };
+
+}
diff --git a/Source/WebCore/html/canvas/CanvasFillRule.idl b/Source/WebCore/html/canvas/CanvasFillRule.idl
new file mode 100644 (file)
index 0000000..5760dae
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+enum CanvasFillRule { "nonzero", "evenodd" };
diff --git a/Source/WebCore/html/canvas/CanvasFillStrokeStyles.idl b/Source/WebCore/html/canvas/CanvasFillStrokeStyles.idl
new file mode 100644 (file)
index 0000000..e038301
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+// FIXME: This should include SVGImageElement and ImageBitmap.
+#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
+typedef (HTMLImageElement or HTMLVideoElement or HTMLCanvasElement) CanvasImageSource;
+#else
+typedef (HTMLImageElement or HTMLCanvasElement) CanvasImageSource;
+#endif
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasFillStrokeStyles {
+    // 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)
+
+    // FIXME: All the float parameters below should be doubles.
+    [MayThrowException] CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1);
+    [MayThrowException] CanvasGradient createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1);
+    [MayThrowException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
+
+
+    // Non-standard legacy aliases.
+    void setStrokeColor(DOMString color, optional unrestricted float alpha);
+    void setStrokeColor(unrestricted float grayLevel, optional float alpha = 1);
+    void setStrokeColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
+    void setStrokeColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
+    void setFillColor(DOMString color, optional unrestricted float alpha);
+    void setFillColor(unrestricted float grayLevel, optional unrestricted float alpha = 1);
+    void setFillColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
+    void setFillColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
+};
diff --git a/Source/WebCore/html/canvas/CanvasFilters.idl b/Source/WebCore/html/canvas/CanvasFilters.idl
new file mode 100644 (file)
index 0000000..b111491
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasFilters {
+    // filters
+    // FIXME: Implement filter.
+    // attribute DOMString filter; // (default "none")
+};
index d9c9d09..df4f450 100644 (file)
  */
 
 [
-    ImplementationLacksVTable,
+    Exposed=(Window,Worker),
+    ImplementationLacksVTable
 ] interface CanvasGradient {
+    // FIXME: The float parameters below should be a double.
+
+    // opaque object
     [MayThrowException] void addColorStop(float offset, DOMString color);
 };
diff --git a/Source/WebCore/html/canvas/CanvasImageData.idl b/Source/WebCore/html/canvas/CanvasImageData.idl
new file mode 100644 (file)
index 0000000..e355295
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasImageData {
+    // FIXME: All the float arguments below should be longs.
+
+    // pixel manipulation
+    [MayThrowException] ImageData createImageData(float sw, float sh);
+    [MayThrowException] ImageData createImageData(ImageData? imagedata); // FIXME: imagedata should not be optional
+    [MayThrowException] ImageData getImageData(float sx, float sy, float sw, float sh);
+    void putImageData(ImageData imagedata, float dx, float dy);
+    void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
+
+
+    // Non-standard functionality.
+    [MayThrowException] ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh);
+    void webkitPutImageDataHD(ImageData imagedata, float dx, float dy);
+    void webkitPutImageDataHD(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
+};
diff --git a/Source/WebCore/html/canvas/CanvasImageSmoothing.idl b/Source/WebCore/html/canvas/CanvasImageSmoothing.idl
new file mode 100644 (file)
index 0000000..f5eac87
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasImageSmoothing {
+    // image smoothing
+    attribute boolean imageSmoothingEnabled; // (default true)
+    attribute ImageSmoothingQuality imageSmoothingQuality; // (default low)
+
+    // Non-standard legacy alias.
+    [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled;
+};
diff --git a/Source/WebCore/html/canvas/CanvasLineCap.h b/Source/WebCore/html/canvas/CanvasLineCap.h
new file mode 100644 (file)
index 0000000..dde8875
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class CanvasLineCap { Butt, Round, Square };
+
+}
diff --git a/Source/WebCore/html/canvas/CanvasLineCap.idl b/Source/WebCore/html/canvas/CanvasLineCap.idl
new file mode 100644 (file)
index 0000000..44ffc08
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+enum CanvasLineCap { "butt", "round", "square" };
diff --git a/Source/WebCore/html/canvas/CanvasLineJoin.h b/Source/WebCore/html/canvas/CanvasLineJoin.h
new file mode 100644 (file)
index 0000000..4beb786
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class CanvasLineJoin { Round, Bevel, Miter };
+
+}
diff --git a/Source/WebCore/html/canvas/CanvasLineJoin.idl b/Source/WebCore/html/canvas/CanvasLineJoin.idl
new file mode 100644 (file)
index 0000000..e77e89a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+enum CanvasLineJoin { "round", "bevel", "miter" };
index 8a665dc..e9cab3e 100644 (file)
  */
 
 [
-    NoInterfaceObject
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
 ] interface CanvasPath {
+    // shared path API methods
     void closePath();
     void moveTo(unrestricted double x, unrestricted double y);
     void lineTo(unrestricted double x, unrestricted double y);
diff --git a/Source/WebCore/html/canvas/CanvasPathDrawingStyles.idl b/Source/WebCore/html/canvas/CanvasPathDrawingStyles.idl
new file mode 100644 (file)
index 0000000..0cbbf18
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasPathDrawingStyles {
+    // FIXME: All the unrestricted float arguments / attributes below should be unrestricted doubles.
+
+    // line caps/joins
+    attribute unrestricted float lineWidth; // (default 1)
+    attribute CanvasLineCap lineCap; // (default "butt")
+    attribute CanvasLineJoin lineJoin; // (default "miter")
+    attribute unrestricted float miterLimit; // (default 10)
+
+    // dashed lines
+    void setLineDash(sequence<unrestricted float> segments); // default empty
+    sequence<unrestricted float> getLineDash();
+    attribute unrestricted float lineDashOffset;
+
+
+    // Non-standard legacy aliases.
+    void setLineWidth(optional unrestricted float width = NaN);
+    void setLineCap(optional DOMString cap = "undefined"); // FIXME: Using "undefined" as default parameter value is wrong.
+    void setLineJoin(optional DOMString join = "undefined"); // FIXME: Using "undefined" as default parameter value is wrong.
+    void setMiterLimit(optional unrestricted float limit = NaN);
+    attribute sequence<unrestricted float> webkitLineDash;
+    [ImplementedAs=lineDashOffset] attribute unrestricted float webkitLineDashOffset;
+};
index 733d551..3c9ab34 100644 (file)
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+
 [
+    Exposed=(Window,Worker),
     ImplementationLacksVTable
 ] interface CanvasPattern {
+    // opaque object
+    // FIXME: Implement setTransform.
+    // void setTransform(optional DOMMatrix2DInit transform);
 };
-
diff --git a/Source/WebCore/html/canvas/CanvasRect.idl b/Source/WebCore/html/canvas/CanvasRect.idl
new file mode 100644 (file)
index 0000000..eac88b8
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasRect {
+    // FIXME: All the unrestricted float parameters below should be unrestricted doubles.
+
+    // rects
+    void clearRect(unrestricted float x, unrestricted float y, unrestricted float w, unrestricted float h);
+    void fillRect(unrestricted float x, unrestricted float y, unrestricted float w, unrestricted float h);
+    void strokeRect(unrestricted float x, unrestricted float y, unrestricted float w, unrestricted float h);
+};
index 53dd797..cdc89f3 100644 (file)
@@ -42,7 +42,6 @@
 #include "CanvasPattern.h"
 #include "DOMMatrix.h"
 #include "DOMMatrix2DInit.h"
-#include "DOMPath.h"
 #include "DisplayListRecorder.h"
 #include "DisplayListReplayer.h"
 #include "FloatQuad.h"
@@ -50,6 +49,7 @@
 #include "HTMLVideoElement.h"
 #include "ImageBuffer.h"
 #include "ImageData.h"
+#include "Path2D.h"
 #include "RenderElement.h"
 #include "RenderImage.h"
 #include "RenderLayer.h"
@@ -75,9 +75,9 @@ namespace WebCore {
 using namespace HTMLNames;
 
 #if USE(CG)
-const CanvasRenderingContext2D::ImageSmoothingQuality defaultSmoothingQuality = CanvasRenderingContext2D::ImageSmoothingQuality::Low;
+const ImageSmoothingQuality defaultSmoothingQuality = ImageSmoothingQuality::Low;
 #else
-const CanvasRenderingContext2D::ImageSmoothingQuality defaultSmoothingQuality = CanvasRenderingContext2D::ImageSmoothingQuality::Medium;
+const ImageSmoothingQuality defaultSmoothingQuality = ImageSmoothingQuality::Medium;
 #endif
 
 static const int defaultFontSize = 10;
@@ -465,44 +465,130 @@ void CanvasRenderingContext2D::setLineWidth(float width)
     c->setStrokeThickness(width);
 }
 
-String CanvasRenderingContext2D::lineCap() const
+static CanvasLineCap toCanvasLineCap(LineCap lineCap)
 {
-    return lineCapName(state().lineCap);
+    switch (lineCap) {
+    case ButtCap:
+        return CanvasLineCap::Butt;
+    case RoundCap:
+        return CanvasLineCap::Round;
+    case SquareCap:
+        return CanvasLineCap::Square;
+    }
+
+    ASSERT_NOT_REACHED();
+    return CanvasLineCap::Butt;
 }
 
-void CanvasRenderingContext2D::setLineCap(const String& s)
+static LineCap fromCanvasLineCap(CanvasLineCap canvasLineCap)
 {
-    LineCap cap;
-    if (!parseLineCap(s, cap))
-        return;
-    if (state().lineCap == cap)
+    switch (canvasLineCap) {
+    case CanvasLineCap::Butt:
+        return ButtCap;
+    case CanvasLineCap::Round:
+        return RoundCap;
+    case CanvasLineCap::Square:
+        return SquareCap;
+    }
+    
+    ASSERT_NOT_REACHED();
+    return ButtCap;
+}
+
+CanvasLineCap CanvasRenderingContext2D::lineCap() const
+{
+    return toCanvasLineCap(state().lineCap);
+}
+
+void CanvasRenderingContext2D::setLineCap(CanvasLineCap canvasLineCap)
+{
+    auto lineCap = fromCanvasLineCap(canvasLineCap);
+    if (state().lineCap == lineCap)
         return;
     realizeSaves();
-    modifiableState().lineCap = cap;
+    modifiableState().lineCap = lineCap;
     GraphicsContext* c = drawingContext();
     if (!c)
         return;
-    c->setLineCap(cap);
+    c->setLineCap(lineCap);
 }
 
-String CanvasRenderingContext2D::lineJoin() const
+void CanvasRenderingContext2D::setLineCap(const String& stringValue)
 {
-    return lineJoinName(state().lineJoin);
+    CanvasLineCap cap;
+    if (stringValue == "butt")
+        cap = CanvasLineCap::Butt;
+    else if (stringValue == "round")
+        cap = CanvasLineCap::Round;
+    else if (stringValue == "square")
+        cap = CanvasLineCap::Square;
+    else
+        return;
+    
+    setLineCap(cap);
 }
 
-void CanvasRenderingContext2D::setLineJoin(const String& s)
+static CanvasLineJoin toCanvasLineJoin(LineJoin lineJoin)
 {
-    LineJoin join;
-    if (!parseLineJoin(s, join))
-        return;
-    if (state().lineJoin == join)
+    switch (lineJoin) {
+    case RoundJoin:
+        return CanvasLineJoin::Round;
+    case BevelJoin:
+        return CanvasLineJoin::Bevel;
+    case MiterJoin:
+        return CanvasLineJoin::Miter;
+    }
+
+    ASSERT_NOT_REACHED();
+    return CanvasLineJoin::Round;
+}
+
+static LineJoin fromCanvasLineJoin(CanvasLineJoin canvasLineJoin)
+{
+    switch (canvasLineJoin) {
+    case CanvasLineJoin::Round:
+        return RoundJoin;
+    case CanvasLineJoin::Bevel:
+        return BevelJoin;
+    case CanvasLineJoin::Miter:
+        return MiterJoin;
+    }
+    
+    ASSERT_NOT_REACHED();
+    return RoundJoin;
+}
+
+CanvasLineJoin CanvasRenderingContext2D::lineJoin() const
+{
+    return toCanvasLineJoin(state().lineJoin);
+}
+
+void CanvasRenderingContext2D::setLineJoin(CanvasLineJoin canvasLineJoin)
+{
+    auto lineJoin = fromCanvasLineJoin(canvasLineJoin);
+    if (state().lineJoin == lineJoin)
         return;
     realizeSaves();
-    modifiableState().lineJoin = join;
+    modifiableState().lineJoin = lineJoin;
     GraphicsContext* c = drawingContext();
     if (!c)
         return;
-    c->setLineJoin(join);
+    c->setLineJoin(lineJoin);
+}
+
+void CanvasRenderingContext2D::setLineJoin(const String& stringValue)
+{
+    CanvasLineJoin join;
+    if (stringValue == "round")
+        join = CanvasLineJoin::Round;
+    if (stringValue == "bevel")
+        join = CanvasLineJoin::Bevel;
+    if (stringValue == "miter")
+        join = CanvasLineJoin::Miter;
+    else
+        return;
+
+    setLineJoin(join);
 }
 
 float CanvasRenderingContext2D::miterLimit() const
@@ -959,17 +1045,17 @@ static bool isFullCanvasCompositeMode(CompositeOperator op)
     return op == CompositeSourceIn || op == CompositeSourceOut || op == CompositeDestinationIn || op == CompositeDestinationAtop;
 }
 
-static WindRule toWindRule(CanvasRenderingContext2D::WindingRule rule)
+static WindRule toWindRule(CanvasFillRule rule)
 {
-    return rule == CanvasRenderingContext2D::WindingRule::Nonzero ? RULE_NONZERO : RULE_EVENODD;
+    return rule == CanvasFillRule::Nonzero ? RULE_NONZERO : RULE_EVENODD;
 }
 
-String CanvasRenderingContext2D::stringForWindingRule(WindingRule windingRule)
+String CanvasRenderingContext2D::stringForCanvasFillRule(CanvasFillRule windingRule)
 {
     switch (windingRule) {
-    case WindingRule::Nonzero:
+    case CanvasFillRule::Nonzero:
         return ASCIILiteral("nonzero");
-    case WindingRule::Evenodd:
+    case CanvasFillRule::Evenodd:
         return ASCIILiteral("evenodd");
     }
 
@@ -977,7 +1063,7 @@ String CanvasRenderingContext2D::stringForWindingRule(WindingRule windingRule)
     return String();
 }
 
-void CanvasRenderingContext2D::fill(WindingRule windingRule)
+void CanvasRenderingContext2D::fill(CanvasFillRule windingRule)
 {
     fillInternal(m_path, windingRule);
     clearPathForDashboardBackwardCompatibilityMode();
@@ -989,28 +1075,28 @@ void CanvasRenderingContext2D::stroke()
     clearPathForDashboardBackwardCompatibilityMode();
 }
 
-void CanvasRenderingContext2D::clip(WindingRule windingRule)
+void CanvasRenderingContext2D::clip(CanvasFillRule windingRule)
 {
     clipInternal(m_path, windingRule);
     clearPathForDashboardBackwardCompatibilityMode();
 }
 
-void CanvasRenderingContext2D::fill(DOMPath& path, WindingRule windingRule)
+void CanvasRenderingContext2D::fill(Path2D& path, CanvasFillRule windingRule)
 {
     fillInternal(path.path(), windingRule);
 }
 
-void CanvasRenderingContext2D::stroke(DOMPath& path)
+void CanvasRenderingContext2D::stroke(Path2D& path)
 {
     strokeInternal(path.path());
 }
 
-void CanvasRenderingContext2D::clip(DOMPath& path, WindingRule windingRule)
+void CanvasRenderingContext2D::clip(Path2D& path, CanvasFillRule windingRule)
 {
     clipInternal(path.path(), windingRule);
 }
 
-void CanvasRenderingContext2D::fillInternal(const Path& path, WindingRule windingRule)
+void CanvasRenderingContext2D::fillInternal(const Path& path, CanvasFillRule windingRule)
 {
     auto* c = drawingContext();
     if (!c)
@@ -1077,7 +1163,7 @@ void CanvasRenderingContext2D::strokeInternal(const Path& path)
     }
 }
 
-void CanvasRenderingContext2D::clipInternal(const Path& path, WindingRule windingRule)
+void CanvasRenderingContext2D::clipInternal(const Path& path, CanvasFillRule windingRule)
 {
     auto* c = drawingContext();
     if (!c)
@@ -1103,7 +1189,7 @@ inline void CanvasRenderingContext2D::endCompositeLayer()
 #endif
 }
 
-bool CanvasRenderingContext2D::isPointInPath(float x, float y, WindingRule windingRule)
+bool CanvasRenderingContext2D::isPointInPath(float x, float y, CanvasFillRule windingRule)
 {
     return isPointInPathInternal(m_path, x, y, windingRule);
 }
@@ -1113,17 +1199,17 @@ bool CanvasRenderingContext2D::isPointInStroke(float x, float y)
     return isPointInStrokeInternal(m_path, x, y);
 }
 
-bool CanvasRenderingContext2D::isPointInPath(DOMPath& path, float x, float y, WindingRule windingRule)
+bool CanvasRenderingContext2D::isPointInPath(Path2D& path, float x, float y, CanvasFillRule windingRule)
 {
     return isPointInPathInternal(path.path(), x, y, windingRule);
 }
 
-bool CanvasRenderingContext2D::isPointInStroke(DOMPath& path, float x, float y)
+bool CanvasRenderingContext2D::isPointInStroke(Path2D& path, float x, float y)
 {
     return isPointInStrokeInternal(path.path(), x, y);
 }
 
-bool CanvasRenderingContext2D::isPointInPathInternal(const Path& path, float x, float y, WindingRule windingRule)
+bool CanvasRenderingContext2D::isPointInPathInternal(const Path& path, float x, float y, CanvasFillRule windingRule)
 {
     auto* c = drawingContext();
     if (!c)
@@ -2081,7 +2167,7 @@ void CanvasRenderingContext2D::drawFocusIfNeeded(Element& element)
     drawFocusIfNeededInternal(m_path, element);
 }
 
-void CanvasRenderingContext2D::drawFocusIfNeeded(DOMPath& path, Element& element)
+void CanvasRenderingContext2D::drawFocusIfNeeded(Path2D& path, Element& element)
 {
     drawFocusIfNeededInternal(path.path(), element);
 }
@@ -2221,36 +2307,112 @@ void CanvasRenderingContext2D::setFont(const String& newFont)
     modifiableState().font.initialize(document.fontSelector(), *styleResolver.style());
 }
 
-String CanvasRenderingContext2D::textAlign() const
+static CanvasTextAlign toCanvasTextAlign(TextAlign textAlign)
+{
+    switch (textAlign) {
+    case StartTextAlign:
+        return CanvasTextAlign::Start;
+    case EndTextAlign:
+        return CanvasTextAlign::End;
+    case LeftTextAlign:
+        return CanvasTextAlign::Left;
+    case RightTextAlign:
+        return CanvasTextAlign::Right;
+    case CenterTextAlign:
+        return CanvasTextAlign::Center;
+    }
+
+    ASSERT_NOT_REACHED();
+    return CanvasTextAlign::Start;
+}
+
+static TextAlign fromCanvasTextAlign(CanvasTextAlign canvasTextAlign)
+{
+    switch (canvasTextAlign) {
+    case CanvasTextAlign::Start:
+        return StartTextAlign;
+    case CanvasTextAlign::End:
+        return EndTextAlign;
+    case CanvasTextAlign::Left:
+        return LeftTextAlign;
+    case CanvasTextAlign::Right:
+        return RightTextAlign;
+    case CanvasTextAlign::Center:
+        return CenterTextAlign;
+    }
+
+    ASSERT_NOT_REACHED();
+    return StartTextAlign;
+}
+
+CanvasTextAlign CanvasRenderingContext2D::textAlign() const
 {
-    return textAlignName(state().textAlign);
+    return toCanvasTextAlign(state().textAlign);
 }
 
-void CanvasRenderingContext2D::setTextAlign(const String& s)
+void CanvasRenderingContext2D::setTextAlign(CanvasTextAlign canvasTextAlign)
 {
-    TextAlign align;
-    if (!parseTextAlign(s, align))
-        return;
-    if (state().textAlign == align)
+    auto textAlign = fromCanvasTextAlign(canvasTextAlign);
+    if (state().textAlign == textAlign)
         return;
     realizeSaves();
-    modifiableState().textAlign = align;
+    modifiableState().textAlign = textAlign;
 }
 
-String CanvasRenderingContext2D::textBaseline() const
+static CanvasTextBaseline toCanvasTextBaseline(TextBaseline textBaseline)
 {
-    return textBaselineName(state().textBaseline);
+    switch (textBaseline) {
+    case TopTextBaseline:
+        return CanvasTextBaseline::Top;
+    case HangingTextBaseline:
+        return CanvasTextBaseline::Hanging;
+    case MiddleTextBaseline:
+        return CanvasTextBaseline::Middle;
+    case AlphabeticTextBaseline:
+        return CanvasTextBaseline::Alphabetic;
+    case IdeographicTextBaseline:
+        return CanvasTextBaseline::Ideographic;
+    case BottomTextBaseline:
+        return CanvasTextBaseline::Bottom;
+    }
+
+    ASSERT_NOT_REACHED();
+    return CanvasTextBaseline::Top;
+}
+
+static TextBaseline fromCanvasTextBaseline(CanvasTextBaseline canvasTextBaseline)
+{
+    switch (canvasTextBaseline) {
+    case CanvasTextBaseline::Top:
+        return TopTextBaseline;
+    case CanvasTextBaseline::Hanging:
+        return HangingTextBaseline;
+    case CanvasTextBaseline::Middle:
+        return MiddleTextBaseline;
+    case CanvasTextBaseline::Alphabetic:
+        return AlphabeticTextBaseline;
+    case CanvasTextBaseline::Ideographic:
+        return IdeographicTextBaseline;
+    case CanvasTextBaseline::Bottom:
+        return BottomTextBaseline;
+    }
+
+    ASSERT_NOT_REACHED();
+    return TopTextBaseline;
 }
 
-void CanvasRenderingContext2D::setTextBaseline(const String& s)
+CanvasTextBaseline CanvasRenderingContext2D::textBaseline() const
 {
-    TextBaseline baseline;
-    if (!parseTextBaseline(s, baseline))
-        return;
-    if (state().textBaseline == baseline)
+    return toCanvasTextBaseline(state().textBaseline);
+}
+
+void CanvasRenderingContext2D::setTextBaseline(CanvasTextBaseline canvasTextBaseline)
+{
+    auto textBaseline = fromCanvasTextBaseline(canvasTextBaseline);
+    if (state().textBaseline == textBaseline)
         return;
     realizeSaves();
-    modifiableState().textBaseline = baseline;
+    modifiableState().textBaseline = textBaseline;
 }
 
 inline TextDirection CanvasRenderingContext2D::toTextDirection(Direction direction, const RenderStyle** computedStyle) const
@@ -2261,34 +2423,24 @@ inline TextDirection CanvasRenderingContext2D::toTextDirection(Direction directi
     switch (direction) {
     case Direction::Inherit:
         return style ? style->direction() : LTR;
-    case Direction::RTL:
+    case Direction::Rtl:
         return RTL;
-    case Direction::LTR:
+    case Direction::Ltr:
         return LTR;
     }
     ASSERT_NOT_REACHED();
     return LTR;
 }
 
-String CanvasRenderingContext2D::direction() const
+CanvasDirection CanvasRenderingContext2D::direction() const
 {
     if (state().direction == Direction::Inherit)
         canvas().document().updateStyleIfNeeded();
-    return toTextDirection(state().direction) == RTL ? ASCIILiteral("rtl") : ASCIILiteral("ltr");
+    return toTextDirection(state().direction) == RTL ? CanvasDirection::Rtl : CanvasDirection::Ltr;
 }
 
-void CanvasRenderingContext2D::setDirection(const String& directionString)
+void CanvasRenderingContext2D::setDirection(CanvasDirection direction)
 {
-    Direction direction;
-    if (directionString == "inherit")
-        direction = Direction::Inherit;
-    else if (directionString == "rtl")
-        direction = Direction::RTL;
-    else if (directionString == "ltr")
-        direction = Direction::LTR;
-    else
-        return;
-
     if (state().direction == direction)
         return;
 
@@ -2586,14 +2738,14 @@ PlatformLayer* CanvasRenderingContext2D::platformLayer() const
 
 #endif
 
-static inline InterpolationQuality smoothingToInterpolationQuality(CanvasRenderingContext2D::ImageSmoothingQuality quality)
+static inline InterpolationQuality smoothingToInterpolationQuality(ImageSmoothingQuality quality)
 {
     switch (quality) {
-    case CanvasRenderingContext2D::ImageSmoothingQuality::Low:
+    case ImageSmoothingQuality::Low:
         return InterpolationLow;
-    case CanvasRenderingContext2D::ImageSmoothingQuality::Medium:
+    case ImageSmoothingQuality::Medium:
         return InterpolationMedium;
-    case CanvasRenderingContext2D::ImageSmoothingQuality::High:
+    case ImageSmoothingQuality::High:
         return InterpolationHigh;
     }
 
@@ -2601,21 +2753,6 @@ static inline InterpolationQuality smoothingToInterpolationQuality(CanvasRenderi
     return InterpolationLow;
 };
 
-String CanvasRenderingContext2D::stringForImageSmoothingQuality(ImageSmoothingQuality imageSmoothingQuality)
-{
-    switch (imageSmoothingQuality) {
-    case ImageSmoothingQuality::Low:
-        return ASCIILiteral("low");
-    case ImageSmoothingQuality::Medium:
-        return ASCIILiteral("medium");
-    case ImageSmoothingQuality::High:
-        return ASCIILiteral("high");
-    }
-
-    ASSERT_NOT_REACHED();
-    return String();
-}
-
 auto CanvasRenderingContext2D::imageSmoothingQuality() const -> ImageSmoothingQuality
 {
     return state().imageSmoothingQuality;
@@ -2653,14 +2790,14 @@ void CanvasRenderingContext2D::setImageSmoothingEnabled(bool enabled)
         c->setImageInterpolationQuality(enabled ? smoothingToInterpolationQuality(state().imageSmoothingQuality) : InterpolationNone);
 }
 
-void CanvasRenderingContext2D::setPath(DOMPath& path)
+void CanvasRenderingContext2D::setPath(Path2D& path)
 {
     m_path = path.path();
 }
 
-Ref<DOMPath> CanvasRenderingContext2D::getPath() const
+Ref<Path2D> CanvasRenderingContext2D::getPath() const
 {
-    return DOMPath::create(m_path);
+    return Path2D::create(m_path);
 }
 
 } // namespace WebCore
index 99f9324..96a7f4b 100644 (file)
 #pragma once
 
 #include "AffineTransform.h"
+#include "CanvasDirection.h"
+#include "CanvasFillRule.h"
+#include "CanvasLineCap.h"
+#include "CanvasLineJoin.h"
 #include "CanvasPath.h"
 #include "CanvasRenderingContext.h"
 #include "CanvasStyle.h"
+#include "CanvasTextAlign.h"
+#include "CanvasTextBaseline.h"
 #include "Color.h"
 #include "FloatSize.h"
 #include "FontCascade.h"
@@ -36,6 +42,7 @@
 #include "GraphicsContext.h"
 #include "GraphicsTypes.h"
 #include "ImageBuffer.h"
+#include "ImageSmoothingQuality.h"
 #include "Path.h"
 #include "PlatformLayer.h"
 #include <wtf/Vector.h>
@@ -46,13 +53,13 @@ namespace WebCore {
 class CanvasGradient;
 class CanvasPattern;
 class DOMMatrix;
-class DOMPath;
 class FloatRect;
 class GraphicsContext;
 class HTMLCanvasElement;
 class HTMLImageElement;
 class HTMLVideoElement;
 class ImageData;
+class Path2D;
 class TextMetrics;
 
 struct DOMMatrix2DInit;
@@ -71,10 +78,12 @@ public:
     float lineWidth() const;
     void setLineWidth(float);
 
-    String lineCap() const;
+    CanvasLineCap lineCap() const;
+    void setLineCap(CanvasLineCap);
     void setLineCap(const String&);
 
-    String lineJoin() const;
+    CanvasLineJoin lineJoin() const;
+    void setLineJoin(CanvasLineJoin);
     void setLineJoin(const String&);
 
     float miterLimit() const;
@@ -134,22 +143,21 @@ public:
 
     void beginPath();
 
-    enum class WindingRule { Nonzero, Evenodd };
-    static String stringForWindingRule(WindingRule);
+    static String stringForCanvasFillRule(CanvasFillRule);
 
-    void fill(WindingRule = WindingRule::Nonzero);
+    void fill(CanvasFillRule = CanvasFillRule::Nonzero);
     void stroke();
-    void clip(WindingRule = WindingRule::Nonzero);
+    void clip(CanvasFillRule = CanvasFillRule::Nonzero);
 
-    void fill(DOMPath&, WindingRule = WindingRule::Nonzero);
-    void stroke(DOMPath&);
-    void clip(DOMPath&, WindingRule = WindingRule::Nonzero);
+    void fill(Path2D&, CanvasFillRule = CanvasFillRule::Nonzero);
+    void stroke(Path2D&);
+    void clip(Path2D&, CanvasFillRule = CanvasFillRule::Nonzero);
 
-    bool isPointInPath(float x, float y, WindingRule = WindingRule::Nonzero);
+    bool isPointInPath(float x, float y, CanvasFillRule = CanvasFillRule::Nonzero);
     bool isPointInStroke(float x, float y);
 
-    bool isPointInPath(DOMPath&, float x, float y, WindingRule = WindingRule::Nonzero);
-    bool isPointInStroke(DOMPath&, float x, float y);
+    bool isPointInPath(Path2D&, float x, float y, CanvasFillRule = CanvasFillRule::Nonzero);
+    bool isPointInStroke(Path2D&, float x, float y);
 
     void clearRect(float x, float y, float width, float height);
     void fillRect(float x, float y, float width, float height);
@@ -192,7 +200,7 @@ public:
     void webkitPutImageDataHD(ImageData&, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
 
     void drawFocusIfNeeded(Element&);
-    void drawFocusIfNeeded(DOMPath&, Element&);
+    void drawFocusIfNeeded(Path2D&, Element&);
 
     float webkitBackingStorePixelRatio() const { return 1; }
 
@@ -201,14 +209,14 @@ public:
     String font() const;
     void setFont(const String&);
 
-    String textAlign() const;
-    void setTextAlign(const String&);
+    CanvasTextAlign textAlign() const;
+    void setTextAlign(CanvasTextAlign);
 
-    String textBaseline() const;
-    void setTextBaseline(const String&);
+    CanvasTextBaseline textBaseline() const;
+    void setTextBaseline(CanvasTextBaseline);
 
-    String direction() const;
-    void setDirection(const String&);
+    CanvasDirection direction() const;
+    void setDirection(CanvasDirection);
 
     void fillText(const String& text, float x, float y, std::optional<float> maxWidth = std::nullopt);
     void strokeText(const String& text, float x, float y, std::optional<float> maxWidth = std::nullopt);
@@ -220,14 +228,11 @@ public:
     bool imageSmoothingEnabled() const;
     void setImageSmoothingEnabled(bool);
 
-    enum class ImageSmoothingQuality { Low, Medium, High };
-    static String stringForImageSmoothingQuality(ImageSmoothingQuality);
-
     ImageSmoothingQuality imageSmoothingQuality() const;
     void setImageSmoothingQuality(ImageSmoothingQuality);
 
-    void setPath(DOMPath&);
-    Ref<DOMPath> getPath() const;
+    void setPath(Path2D&);
+    Ref<Path2D> getPath() const;
 
     bool usesDisplayListDrawing() const { return m_usesDisplayListDrawing; };
     void setUsesDisplayListDrawing(bool flag) { m_usesDisplayListDrawing = flag; };
@@ -238,11 +243,7 @@ public:
     String displayListAsText(DisplayList::AsTextFlags) const;
     String replayDisplayListAsText(DisplayList::AsTextFlags) const;
 
-    enum class Direction {
-        Inherit,
-        RTL,
-        LTR
-    };
+    using Direction = CanvasDirection;
 
     class FontProxy : public FontSelectorClient {
     public:
@@ -360,11 +361,11 @@ private:
     void beginCompositeLayer();
     void endCompositeLayer();
 
-    void fillInternal(const Path&, WindingRule);
+    void fillInternal(const Path&, CanvasFillRule);
     void strokeInternal(const Path&);
-    void clipInternal(const Path&, WindingRule);
+    void clipInternal(const Path&, CanvasFillRule);
 
-    bool isPointInPathInternal(const Path&, float x, float y, WindingRule);
+    bool isPointInPathInternal(const Path&, float x, float y, CanvasFillRule);
     bool isPointInStrokeInternal(const Path&, float x, float y);
 
     void drawFocusIfNeededInternal(const Path&, Element&);
index 5ed0e84..462b2fa 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-enum ImageSmoothingQuality { "low", "medium", "high" };
-enum CanvasWindingRule { "nonzero", "evenodd" };
-
-// FIXME: This should include SVGImageElement and ImageBitmap.
-#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
-typedef (HTMLImageElement or HTMLVideoElement or HTMLCanvasElement) CanvasImageSource;
-#else
-typedef (HTMLImageElement or HTMLCanvasElement) CanvasImageSource;
-#endif
-
 [
     CustomIsReachable,
     JSGenerateToJSObject,
     JSCustomMarkFunction,
     CallTracingCallback=recordCanvasAction,
 ] interface CanvasRenderingContext2D {
-
     // back-reference to the canvas
     readonly attribute HTMLCanvasElement canvas;
 
-    void save();
-    void restore();
-
+    // FIXME: This has been moved to OffscreenCanvasRenderingContext2D in the latest standard.
     void commit();
 
-    void scale(unrestricted float sx, unrestricted float sy);
-    void rotate(unrestricted float angle);
-    void translate(unrestricted float tx, unrestricted float ty);
-    void transform(unrestricted float m11, unrestricted float m12, unrestricted float m21, unrestricted float m22, 
-        unrestricted float dx, unrestricted float dy);
-
-    [NewObject] DOMMatrix getTransform();
-    void setTransform(unrestricted float m11, unrestricted float m12, unrestricted float m21, unrestricted float m22, 
-        unrestricted float dx, unrestricted float dy);
-    [MayThrowException] void setTransform(optional DOMMatrixInit transform);
-    void resetTransform();
-
-    attribute unrestricted float globalAlpha;
-
-    attribute DOMString globalCompositeOperation;
-
-    attribute unrestricted float lineWidth;
-    attribute DOMString lineCap;
-    attribute DOMString lineJoin;
-    attribute unrestricted float miterLimit;
-
-    attribute unrestricted float shadowOffsetX;
-    attribute unrestricted float shadowOffsetY;
-    attribute unrestricted float shadowBlur;
-    attribute DOMString shadowColor;
-
-    void setLineDash(sequence<unrestricted float> dash);
-    sequence<unrestricted float> getLineDash();
-    attribute unrestricted float lineDashOffset;
-
-    attribute sequence<unrestricted float> webkitLineDash;
-    [ImplementedAs=lineDashOffset] attribute unrestricted float webkitLineDashOffset;
-
-    void clearRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
-    void fillRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
-
-    void beginPath();
-
-    void fill(DOMPath path, optional CanvasWindingRule winding = "nonzero");
-    void stroke(DOMPath path);
-    void clip(DOMPath path, optional CanvasWindingRule winding = "nonzero");
-
-    void fill(optional CanvasWindingRule winding = "nonzero");
-    void stroke();
-    void clip(optional CanvasWindingRule winding = "nonzero");
-
-    boolean isPointInPath(DOMPath path, unrestricted float x, unrestricted float y, optional CanvasWindingRule winding = "nonzero");
-    boolean isPointInStroke(DOMPath path, unrestricted float x, unrestricted float y);
-
-    boolean isPointInPath(unrestricted float x, unrestricted float y, optional CanvasWindingRule winding = "nonzero");
-    boolean isPointInStroke(unrestricted float x, unrestricted float y);
-
-    // text
-    attribute DOMString font;
-    attribute DOMString textAlign;
-    attribute DOMString textBaseline;
-    attribute DOMString direction;
-
-    TextMetrics measureText(DOMString text);
-
-    // other
-
-    void setAlpha(optional unrestricted float alpha = NaN);
-
-    // FIXME: Using "undefined" as default parameter value is wrong.
-    void setCompositeOperation(optional DOMString compositeOperation = "undefined");
-
-    void setLineWidth(optional unrestricted float width = NaN);
-
-    // FIXME: Using "undefined" as default parameter value is wrong.
-    void setLineCap(optional DOMString cap = "undefined");
-    void setLineJoin(optional DOMString join = "undefined");
-
-    void setMiterLimit(optional unrestricted float limit = NaN);
-
-    void clearShadow();
-
-    void fillText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
-    void strokeText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
-
-    void setStrokeColor(DOMString color, optional unrestricted float alpha);
-    void setStrokeColor(unrestricted float grayLevel, optional float alpha = 1);
-    void setStrokeColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
-    void setStrokeColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
-
-    void setFillColor(DOMString color, optional unrestricted float alpha);
-    void setFillColor(unrestricted float grayLevel, optional unrestricted float alpha = 1);
-    void setFillColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
-    void setFillColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
-
-    void strokeRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
-
-    // FIXME: This should move to the CanvasDrawImage interface.
-    // FIXME: All the unrestricted float arguments below should be unrestricted doubles.
-    [MayThrowException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y);
-    [MayThrowException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
-    [MayThrowException] void drawImage(CanvasImageSource image, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
-
-
-    void drawImageFromRect(HTMLImageElement image,
-        optional unrestricted float sx = 0, optional unrestricted float sy = 0, optional unrestricted float sw = 0, optional unrestricted float sh = 0,
-        optional unrestricted float dx = 0, optional unrestricted float dy = 0, optional unrestricted float dw = 0, optional unrestricted float dh = 0,
-        optional DOMString compositeOperation = "");
-
-    void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, 
-        optional DOMString color, optional unrestricted float alpha);
-    void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float grayLevel, 
-        optional unrestricted float alpha = 1);
-    void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float r, 
-        unrestricted float g, unrestricted float b, unrestricted float a);
-    void setShadow(float width, unrestricted float height, unrestricted float blur, unrestricted float c, unrestricted float m, 
-        unrestricted float y, unrestricted float k, unrestricted float a);
-
-    void putImageData(ImageData imagedata, float dx, float dy);
-    void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
-
-    void webkitPutImageDataHD(ImageData imagedata, float dx, float dy);
-    void webkitPutImageDataHD(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
-
-    [MayThrowException] ImageData createImageData(ImageData? imagedata);
-    [MayThrowException] ImageData createImageData(float sw, float sh);
-
-    attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle;
-    attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle;
-    [MayThrowException] CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1);
-    [MayThrowException] CanvasGradient createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1);
-    [MayThrowException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
-
-    // pixel manipulation
-    [MayThrowException] ImageData getImageData(float sx, float sy, float sw, float sh);
-    [MayThrowException] ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh);
-    
-    // Focus rings
-    void drawFocusIfNeeded(Element element);
-    void drawFocusIfNeeded(DOMPath path, Element element);
-
+    // Non-standard functionality.
     readonly attribute float webkitBackingStorePixelRatio;
 
-    attribute boolean imageSmoothingEnabled;
-    [ImplementedAs=imageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled;
-    attribute ImageSmoothingQuality imageSmoothingQuality;
-
-    [EnabledAtRuntime=InspectorAdditions] void setPath(DOMPath path);
-    [EnabledAtRuntime=InspectorAdditions, NewObject] DOMPath getPath();
+    [EnabledAtRuntime=InspectorAdditions] void setPath(Path2D path);
+    [EnabledAtRuntime=InspectorAdditions, NewObject] Path2D getPath();
 };
 
+CanvasRenderingContext2D implements CanvasState;
+CanvasRenderingContext2D implements CanvasTransform;
+CanvasRenderingContext2D implements CanvasCompositing;
+CanvasRenderingContext2D implements CanvasImageSmoothing;
+CanvasRenderingContext2D implements CanvasFillStrokeStyles;
+CanvasRenderingContext2D implements CanvasShadowStyles;
+CanvasRenderingContext2D implements CanvasFilters;
+CanvasRenderingContext2D implements CanvasRect;
+CanvasRenderingContext2D implements CanvasDrawPath;
+CanvasRenderingContext2D implements CanvasUserInterface;
+CanvasRenderingContext2D implements CanvasText;
+CanvasRenderingContext2D implements CanvasDrawImage;
+CanvasRenderingContext2D implements CanvasImageData;
+CanvasRenderingContext2D implements CanvasPathDrawingStyles;
+CanvasRenderingContext2D implements CanvasTextDrawingStyles;
 CanvasRenderingContext2D implements CanvasPath;
diff --git a/Source/WebCore/html/canvas/CanvasShadowStyles.idl b/Source/WebCore/html/canvas/CanvasShadowStyles.idl
new file mode 100644 (file)
index 0000000..02a1e7f
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasShadowStyles {
+    // FIXME: All the unrestricted float attributes below should be unrestricted doubles.
+
+    // shadows
+    attribute unrestricted double shadowOffsetX; // (default 0)
+    attribute unrestricted double shadowOffsetY; // (default 0)
+    attribute unrestricted double shadowBlur; // (default 0)
+    attribute DOMString shadowColor; // (default transparent black)
+
+
+    // Non-standard legacy aliases.
+    void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, optional DOMString color, optional unrestricted float alpha);
+    void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float grayLevel, optional unrestricted float alpha = 1);
+    void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
+    void setShadow(float width, unrestricted float height, unrestricted float blur, unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
+    void clearShadow();
+};
diff --git a/Source/WebCore/html/canvas/CanvasState.idl b/Source/WebCore/html/canvas/CanvasState.idl
new file mode 100644 (file)
index 0000000..d20ab9d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasState {
+    // state
+    void save(); // push state on state stack
+    void restore(); // pop state stack and restore state
+};
diff --git a/Source/WebCore/html/canvas/CanvasText.idl b/Source/WebCore/html/canvas/CanvasText.idl
new file mode 100644 (file)
index 0000000..864aee1
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=Window
+] interface CanvasText {
+    // FIXME: All the unrestricted float parameters below should be unrestricted doubles.
+
+    // text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces)
+    void fillText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
+    void strokeText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
+    TextMetrics measureText(DOMString text);
+};
diff --git a/Source/WebCore/html/canvas/CanvasTextAlign.h b/Source/WebCore/html/canvas/CanvasTextAlign.h
new file mode 100644 (file)
index 0000000..dc25bcf
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class CanvasTextAlign { Start, End, Left, Right, Center };
+
+}
diff --git a/Source/WebCore/html/canvas/CanvasTextAlign.idl b/Source/WebCore/html/canvas/CanvasTextAlign.idl
new file mode 100644 (file)
index 0000000..d6a4a39
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+enum CanvasTextAlign { "start", "end", "left", "right", "center" };
diff --git a/Source/WebCore/html/canvas/CanvasTextBaseline.h b/Source/WebCore/html/canvas/CanvasTextBaseline.h
new file mode 100644 (file)
index 0000000..b61274a
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class CanvasTextBaseline { Top, Hanging, Middle, Alphabetic, Ideographic, Bottom };
+
+}
diff --git a/Source/WebCore/html/canvas/CanvasTextBaseline.idl b/Source/WebCore/html/canvas/CanvasTextBaseline.idl
new file mode 100644 (file)
index 0000000..0aa1738
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
diff --git a/Source/WebCore/html/canvas/CanvasTextDrawingStyles.idl b/Source/WebCore/html/canvas/CanvasTextDrawingStyles.idl
new file mode 100644 (file)
index 0000000..17d2368
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=Window
+] interface CanvasTextDrawingStyles {
+    // text
+    attribute DOMString font; // (default 10px sans-serif)
+    attribute CanvasTextAlign textAlign; // (default: "start")
+    attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
+    attribute CanvasDirection direction; // (default: "inherit")
+};
diff --git a/Source/WebCore/html/canvas/CanvasTransform.idl b/Source/WebCore/html/canvas/CanvasTransform.idl
new file mode 100644 (file)
index 0000000..9aab94c
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=(Window,Worker)
+] interface CanvasTransform {
+    // FIXME: All the unrestricted float parameters below should be unrestricted doubles.
+
+    // transformations (default transform is the identity matrix)
+    void scale(unrestricted float x, unrestricted float y);
+    void rotate(unrestricted float angle);
+    void translate(unrestricted float x, unrestricted float y);
+    void transform(unrestricted float a, unrestricted float b, unrestricted float c, unrestricted float d, unrestricted float e, unrestricted float f);
+
+    [NewObject] DOMMatrix getTransform();
+    void setTransform(unrestricted float a, unrestricted float b, unrestricted float c, unrestricted float d, unrestricted float e, unrestricted float f);
+    [MayThrowException] void setTransform(optional DOMMatrix2DInit transform);
+    void resetTransform();
+};
diff --git a/Source/WebCore/html/canvas/CanvasUserInterface.idl b/Source/WebCore/html/canvas/CanvasUserInterface.idl
new file mode 100644 (file)
index 0000000..6b70b0d
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+[
+    NoInterfaceObject,
+    Exposed=Window
+] interface CanvasUserInterface {
+    void drawFocusIfNeeded(Element element);
+    void drawFocusIfNeeded(Path2D path, Element element);
+
+    // FIXME: Implement scrollPathIntoView.
+    // void scrollPathIntoView();
+    // void scrollPathIntoView(Path2D path);
+};
diff --git a/Source/WebCore/html/canvas/ImageSmoothingQuality.h b/Source/WebCore/html/canvas/ImageSmoothingQuality.h
new file mode 100644 (file)
index 0000000..ffcb88b
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum ImageSmoothingQuality { Low, Medium, High };
+
+}
diff --git a/Source/WebCore/html/canvas/ImageSmoothingQuality.idl b/Source/WebCore/html/canvas/ImageSmoothingQuality.idl
new file mode 100644 (file)
index 0000000..1d661ae
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+enum ImageSmoothingQuality { "low", "medium", "high" };
similarity index 93%
rename from Source/WebCore/html/canvas/DOMPath.cpp
rename to Source/WebCore/html/canvas/Path2D.cpp
index 08b4a01..3922d51 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include "config.h"
-#include "DOMPath.h"
+#include "Path2D.h"
 
 #include "AffineTransform.h"
 #include "DOMMatrix2DInit.h"
 
 namespace WebCore {
 
-DOMPath::~DOMPath()
+Path2D::~Path2D()
 {
 }
 
-ExceptionOr<void> DOMPath::addPath(DOMPath& path, DOMMatrix2DInit&& matrixInit)
+ExceptionOr<void> Path2D::addPath(Path2D& path, DOMMatrix2DInit&& matrixInit)
 {
     auto checkValid = DOMMatrixReadOnly::validateAndFixup(matrixInit);
     if (checkValid.hasException())
similarity index 79%
rename from Source/WebCore/html/canvas/DOMPath.h
rename to Source/WebCore/html/canvas/Path2D.h
index c318d98..182d5d9 100644 (file)
@@ -36,40 +36,40 @@ namespace WebCore {
 
 struct DOMMatrix2DInit;
 
-class WEBCORE_EXPORT DOMPath final : public RefCounted<DOMPath>, public CanvasPath {
+class WEBCORE_EXPORT Path2D final : public RefCounted<Path2D>, public CanvasPath {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    virtual ~DOMPath();
+    virtual ~Path2D();
 
-    static Ref<DOMPath> create()
+    static Ref<Path2D> create()
     {
-        return adoptRef(*new DOMPath);
+        return adoptRef(*new Path2D);
     }
 
-    static Ref<DOMPath> create(const Path& path)
+    static Ref<Path2D> create(const Path& path)
     {
-        return adoptRef(*new DOMPath(path));
+        return adoptRef(*new Path2D(path));
     }
 
-    static Ref<DOMPath> create(const DOMPath& path)
+    static Ref<Path2D> create(const Path2D& path)
     {
         return create(path.path());
     }
 
-    static Ref<DOMPath> create(const String& pathData)
+    static Ref<Path2D> create(const String& pathData)
     {
         Path path;
         buildPathFromString(pathData, path);
         return create(path);
     }
 
-    ExceptionOr<void> addPath(DOMPath&, DOMMatrix2DInit&&);
+    ExceptionOr<void> addPath(Path2D&, DOMMatrix2DInit&&);
 
     const Path& path() const { return m_path; }
 
 private:
-    DOMPath() = default;
-    DOMPath(const Path& path)
+    Path2D() = default;
+    Path2D(const Path& path)
         : CanvasPath(path)
     {
     }
similarity index 78%
rename from Source/WebCore/html/canvas/DOMPath.idl
rename to Source/WebCore/html/canvas/Path2D.idl
index d26ba55..03a62c6 100644 (file)
 
 [
     Constructor,
-    Constructor(DOMPath path),
-    Constructor(DOMString text),
-    ExportMacro=WEBCORE_EXPORT,
-    InterfaceName=Path2D,
-] interface DOMPath {
-    [MayThrowException] void addPath(DOMPath path, optional DOMMatrix2DInit transform);
+    Constructor(Path2D path),
+    // FIXME: Implement missing constructor.
+    // Constructor(sequence<Path2D> paths, optional CanvasFillRule fillRule = "nonzero"),
+    Constructor(DOMString d),
+    Exposed=(Window,Worker),
+    ExportMacro=WEBCORE_EXPORT
+] interface Path2D {
+    [MayThrowException] void addPath(Path2D path, optional DOMMatrix2DInit transform);
 };
 
-DOMPath implements CanvasPath;
+Path2D implements CanvasPath;
index 890cc51..738be4e 100644 (file)
@@ -31,7 +31,6 @@
 #include "CanvasGradient.h"
 #include "CanvasPattern.h"
 #include "CanvasRenderingContext2D.h"
-#include "DOMPath.h"
 #include "Document.h"
 #include "FloatPoint.h"
 #include "Frame.h"
 #include "InspectorDOMAgent.h"
 #include "InspectorPageAgent.h"
 #include "InstrumentingAgents.h"
+#include "JSCanvasDirection.h"
+#include "JSCanvasFillRule.h"
+#include "JSCanvasLineCap.h"
+#include "JSCanvasLineJoin.h"
+#include "JSCanvasTextAlign.h"
+#include "JSCanvasTextBaseline.h"
+#include "JSImageSmoothingQuality.h"
 #include "JSMainThreadExecState.h"
+#include "Path2D.h"
 #include "Pattern.h"
 #include "SVGPathUtilities.h"
 #include "StringAdaptors.h"
@@ -397,8 +404,8 @@ RefPtr<Inspector::Protocol::Recording::InitialState> InspectorCanvas::buildIniti
         attributes->setDouble(ASCIILiteral("globalAlpha"), context2d->globalAlpha());
         attributes->setInteger(ASCIILiteral("globalCompositeOperation"), indexForData(context2d->globalCompositeOperation()));
         attributes->setDouble(ASCIILiteral("lineWidth"), context2d->lineWidth());
-        attributes->setInteger(ASCIILiteral("lineCap"), indexForData(context2d->lineCap()));
-        attributes->setInteger(ASCIILiteral("lineJoin"), indexForData(context2d->lineJoin()));
+        attributes->setInteger(ASCIILiteral("lineCap"), indexForData(convertEnumerationToString(context2d->lineCap())));
+        attributes->setInteger(ASCIILiteral("lineJoin"), indexForData(convertEnumerationToString(context2d->lineJoin())));
         attributes->setDouble(ASCIILiteral("miterLimit"), context2d->miterLimit());
         attributes->setDouble(ASCIILiteral("shadowOffsetX"), context2d->shadowOffsetX());
         attributes->setDouble(ASCIILiteral("shadowOffsetY"), context2d->shadowOffsetY());
@@ -413,9 +420,9 @@ RefPtr<Inspector::Protocol::Recording::InitialState> InspectorCanvas::buildIniti
 
         attributes->setDouble(ASCIILiteral("lineDashOffset"), context2d->lineDashOffset());
         attributes->setInteger(ASCIILiteral("font"), indexForData(context2d->font()));
-        attributes->setInteger(ASCIILiteral("textAlign"), indexForData(context2d->textAlign()));
-        attributes->setInteger(ASCIILiteral("textBaseline"), indexForData(context2d->textBaseline()));
-        attributes->setInteger(ASCIILiteral("direction"), indexForData(context2d->direction()));
+        attributes->setInteger(ASCIILiteral("textAlign"), indexForData(convertEnumerationToString(context2d->textAlign())));
+        attributes->setInteger(ASCIILiteral("textBaseline"), indexForData(convertEnumerationToString(context2d->textBaseline())));
+        attributes->setInteger(ASCIILiteral("direction"), indexForData(convertEnumerationToString(context2d->direction())));
 
         int strokeStyleIndex;
         if (CanvasGradient* canvasGradient = state.strokeStyle.canvasGradient())
@@ -436,7 +443,7 @@ RefPtr<Inspector::Protocol::Recording::InitialState> InspectorCanvas::buildIniti
         attributes->setInteger(ASCIILiteral("fillStyle"), fillStyleIndex);
 
         attributes->setBoolean(ASCIILiteral("imageSmoothingEnabled"), context2d->imageSmoothingEnabled());
-        attributes->setInteger(ASCIILiteral("imageSmoothingQuality"), indexForData(CanvasRenderingContext2D::stringForImageSmoothingQuality(context2d->imageSmoothingQuality())));
+        attributes->setInteger(ASCIILiteral("imageSmoothingQuality"), indexForData(convertEnumerationToString(context2d->imageSmoothingQuality())));
 
         auto setPath = Inspector::Protocol::Array<InspectorValue>::create();
         setPath->addItem(indexForData(buildStringFromPath(context2d->getPath()->path())));
@@ -477,13 +484,26 @@ RefPtr<Inspector::Protocol::Array<Inspector::InspectorValue>> InspectorCanvas::b
     RefPtr<Inspector::Protocol::Array<InspectorValue>> parametersData = Inspector::Protocol::Array<Inspector::InspectorValue>::create();
     for (RecordCanvasActionVariant& item : parameters) {
         WTF::switchOn(item,
-            [&] (const CanvasRenderingContext2D::WindingRule& value) {
-                String windingRule = CanvasRenderingContext2D::stringForWindingRule(value);
-                parametersData->addItem(indexForData(windingRule));
+            [&] (CanvasFillRule value) {
+                parametersData->addItem(indexForData(convertEnumerationToString(value)));
             },
-            [&] (const CanvasRenderingContext2D::ImageSmoothingQuality& value) {
-                String imageSmoothingQuality = CanvasRenderingContext2D::stringForImageSmoothingQuality(value);
-                parametersData->addItem(indexForData(imageSmoothingQuality));
+            [&] (ImageSmoothingQuality value) {
+                parametersData->addItem(indexForData(convertEnumerationToString(value)));
+            },
+            [&] (CanvasDirection value) {
+                parametersData->addItem(indexForData(convertEnumerationToString(value)));
+            },
+            [&] (CanvasLineCap value) {
+                parametersData->addItem(indexForData(convertEnumerationToString(value)));
+            },
+            [&] (CanvasLineJoin value) {
+                parametersData->addItem(indexForData(convertEnumerationToString(value)));
+            },
+            [&] (CanvasTextAlign value) {
+                parametersData->addItem(indexForData(convertEnumerationToString(value)));
+            },
+            [&] (CanvasTextBaseline value) {
+                parametersData->addItem(indexForData(convertEnumerationToString(value)));
             },
             [&] (const DOMMatrix2DInit& value) {
                 RefPtr<Inspector::Protocol::Array<double>> array = Inspector::Protocol::Array<double>::create();
@@ -495,7 +515,9 @@ RefPtr<Inspector::Protocol::Array<Inspector::InspectorValue>> InspectorCanvas::b
                 array->addItem(value.f.value_or(0));
                 parametersData->addItem(WTFMove(array));
             },
-            [&] (const DOMPath* value) { parametersData->addItem(indexForData(buildStringFromPath(value->path()))); },
+            [&] (const Path2D* value) {
+                parametersData->addItem(indexForData(buildStringFromPath(value->path())));
+            },
             [&] (const Element*) {
                 // Elements are not serializable, so add a string as a placeholder since the actual
                 // element cannot be reconstructed in the frontend.
index 9ff1670..f7417eb 100644 (file)
@@ -125,126 +125,6 @@ static String blendModeName(BlendMode blendOp)
     return blendOperatorNames[blendOp - BlendModeNormal];
 }
 
-bool parseLineCap(const String& s, LineCap& cap)
-{
-    if (s == "butt") {
-        cap = ButtCap;
-        return true;
-    }
-    if (s == "round") {
-        cap = RoundCap;
-        return true;
-    }
-    if (s == "square") {
-        cap = SquareCap;
-        return true;
-    }
-    return false;
-}
-
-String lineCapName(LineCap cap)
-{
-    ASSERT(cap >= 0);
-    ASSERT(cap < 3);
-    const char* const names[3] = { "butt", "round", "square" };
-    return names[cap];
-}
-
-bool parseLineJoin(const String& s, LineJoin& join)
-{
-    if (s == "miter") {
-        join = MiterJoin;
-        return true;
-    }
-    if (s == "round") {
-        join = RoundJoin;
-        return true;
-    }
-    if (s == "bevel") {
-        join = BevelJoin;
-        return true;
-    }
-    return false;
-}
-
-String lineJoinName(LineJoin join)
-{
-    ASSERT(join >= 0);
-    ASSERT(join < 3);
-    const char* const names[3] = { "miter", "round", "bevel" };
-    return names[join];
-}
-
-String textAlignName(TextAlign align)
-{
-    ASSERT(align >= 0);
-    ASSERT(align < 5);
-    const char* const names[5] = { "start", "end", "left", "center", "right" };
-    return names[align];
-}
-
-bool parseTextAlign(const String& s, TextAlign& align)
-{
-    if (s == "start") {
-        align = StartTextAlign;
-        return true;
-    }
-    if (s == "end") {
-        align = EndTextAlign;
-        return true;
-    }
-    if (s == "left") {
-        align = LeftTextAlign;
-        return true;
-    }
-    if (s == "center") {
-        align = CenterTextAlign;
-        return true;
-    }
-    if (s == "right") {
-        align = RightTextAlign;
-        return true;
-    }
-    return false;
-}
-
-String textBaselineName(TextBaseline baseline)
-{
-    ASSERT(baseline >= 0);
-    ASSERT(baseline < 6);
-    const char* const names[6] = { "alphabetic", "top", "middle", "bottom", "ideographic", "hanging" };
-    return names[baseline];
-}
-
-bool parseTextBaseline(const String& s, TextBaseline& baseline)
-{
-    if (s == "alphabetic") {
-        baseline = AlphabeticTextBaseline;
-        return true;
-    }
-    if (s == "top") {
-        baseline = TopTextBaseline;
-        return true;
-    }
-    if (s == "middle") {
-        baseline = MiddleTextBaseline;
-        return true;
-    }
-    if (s == "bottom") {
-        baseline = BottomTextBaseline;
-        return true;
-    }
-    if (s == "ideographic") {
-        baseline = IdeographicTextBaseline;
-        return true;
-    }
-    if (s == "hanging") {
-        baseline = HangingTextBaseline;
-        return true;
-    }
-    return false;
-}
-
 TextStream& operator<<(TextStream& ts, CompositeOperator op)
 {
     return ts << compositeOperatorName(op, BlendModeNormal);