Skip to content

Instantly share code, notes, and snippets.

@lauromoura
Created February 14, 2022 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lauromoura/5a9dc10eca81ecb710a4c43d4c43ae13 to your computer and use it in GitHub Desktop.
Save lauromoura/5a9dc10eca81ecb710a4c43d4c43ae13 to your computer and use it in GitHub Desktop.
Bug 323780 changes after review
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5e9ac24cad57..e8981017e8a8 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -13,10 +13,14 @@
* platform/gtk/imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker-expected.txt: Removed.
* platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+ * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt:
+ * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+ * platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: Renamed from LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt.
2022-02-13 Andres Gonzalez <andresg_22@apple.com>
diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog
index 3ff40414b358..aa0ea2a64841 100644
--- a/LayoutTests/imported/w3c/ChangeLog
+++ b/LayoutTests/imported/w3c/ChangeLog
@@ -165,6 +165,7 @@
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker-expected.txt:
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6-expected.txt:
* web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker-expected.txt:
+ * web-platform-tests/html/dom/idlharness.https-expected.txt:
* web-platform-tests/html/dom/idlharness.worker-expected.txt:
2022-02-12 Tim Nguyen <ntim@apple.com>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
index c5a851bf6a9e..109475df78b4 100644
--- a/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
+++ b/LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
@@ -4019,7 +4019,7 @@ PASS CanvasRenderingContext2D interface: operation quadraticCurveTo(unrestricted
PASS CanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS CanvasRenderingContext2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS CanvasRenderingContext2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL CanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS CanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS CanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CanvasRenderingContext2D must be primary interface of document.createElement("canvas").getContext("2d")
@@ -4149,8 +4149,8 @@ PASS CanvasRenderingContext2D interface: document.createElement("canvas").getCon
PASS CanvasRenderingContext2D interface: calling arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type
PASS CanvasRenderingContext2D interface: calling rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
-FAIL CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)" with the proper type assert_inherits: property "roundRect" not found in prototype chain
-FAIL CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError assert_inherits: property "roundRect" not found in prototype chain
+PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)" with the proper type
+PASS CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type
PASS CanvasRenderingContext2D interface: calling arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type
@@ -4223,7 +4223,7 @@ PASS Path2D interface: operation quadraticCurveTo(unrestricted double, unrestric
PASS Path2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS Path2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS ImageBitmapRenderingContext interface: existence and properties of interface object
diff --git a/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt b/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
index ec36fc6f45cd..cc33cb554112 100644
--- a/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
+++ b/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
@@ -316,7 +316,7 @@ PASS Path2D interface: operation quadraticCurveTo(unrestricted double, unrestric
PASS Path2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS Path2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS ImageBitmapRenderingContext interface: existence and properties of interface object
@@ -424,7 +424,7 @@ PASS OffscreenCanvasRenderingContext2D interface: operation quadraticCurveTo(unr
PASS OffscreenCanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS OffscreenCanvasRenderingContext2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS OffscreenCanvasRenderingContext2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL OffscreenCanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS OffscreenCanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS OffscreenCanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS OffscreenCanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CustomElementRegistry interface: existence and properties of interface object
diff --git a/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt b/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
index e4da4b28a411..41f911716533 100644
--- a/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
+++ b/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
@@ -4009,7 +4009,7 @@ PASS CanvasRenderingContext2D interface: operation quadraticCurveTo(unrestricted
PASS CanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS CanvasRenderingContext2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS CanvasRenderingContext2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL CanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS CanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS CanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CanvasRenderingContext2D must be primary interface of document.createElement("canvas").getContext("2d")
@@ -4139,8 +4139,8 @@ PASS CanvasRenderingContext2D interface: document.createElement("canvas").getCon
PASS CanvasRenderingContext2D interface: calling arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type
PASS CanvasRenderingContext2D interface: calling rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
-FAIL CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)" with the proper type assert_inherits: property "roundRect" not found in prototype chain
-FAIL CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError assert_inherits: property "roundRect" not found in prototype chain
+PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)" with the proper type
+PASS CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type
PASS CanvasRenderingContext2D interface: calling arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type
@@ -4213,7 +4213,7 @@ PASS Path2D interface: operation quadraticCurveTo(unrestricted double, unrestric
PASS Path2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS Path2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS ImageBitmapRenderingContext interface: existence and properties of interface object
diff --git a/LayoutTests/platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt b/LayoutTests/platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
index 7f20e2be929e..acd1fc75793f 100644
--- a/LayoutTests/platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
+++ b/LayoutTests/platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
@@ -3995,7 +3995,7 @@ PASS CanvasRenderingContext2D interface: operation quadraticCurveTo(unrestricted
PASS CanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS CanvasRenderingContext2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS CanvasRenderingContext2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL CanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS CanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS CanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CanvasRenderingContext2D must be primary interface of document.createElement("canvas").getContext("2d")
@@ -4125,8 +4125,8 @@ PASS CanvasRenderingContext2D interface: document.createElement("canvas").getCon
PASS CanvasRenderingContext2D interface: calling arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)" with the proper type
PASS CanvasRenderingContext2D interface: calling rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
-FAIL CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)" with the proper type assert_inherits: property "roundRect" not found in prototype chain
-FAIL CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError assert_inherits: property "roundRect" not found in prototype chain
+PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)" with the proper type
+PASS CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type
PASS CanvasRenderingContext2D interface: calling arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError
PASS CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)" with the proper type
@@ -4193,7 +4193,7 @@ PASS Path2D interface: operation quadraticCurveTo(unrestricted double, unrestric
PASS Path2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS Path2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS ImageBitmapRenderingContext interface: existence and properties of interface object
diff --git a/LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
similarity index 97%
rename from LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
rename to LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
index 064b4ed4d0bc..cc33cb554112 100644
--- a/LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
+++ b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt
@@ -254,6 +254,12 @@ PASS HTMLTemplateElement interface: existence and properties of interface object
PASS HTMLSlotElement interface: existence and properties of interface object
PASS HTMLCanvasElement interface: existence and properties of interface object
PASS CanvasRenderingContext2D interface: existence and properties of interface object
+FAIL CanvasFilter interface: existence and properties of interface object assert_own_property: self does not have own property "CanvasFilter" expected property "CanvasFilter" missing
+FAIL CanvasFilter interface object length assert_own_property: self does not have own property "CanvasFilter" expected property "CanvasFilter" missing
+FAIL CanvasFilter interface object name assert_own_property: self does not have own property "CanvasFilter" expected property "CanvasFilter" missing
+FAIL CanvasFilter interface: existence and properties of interface prototype object assert_own_property: self does not have own property "CanvasFilter" expected property "CanvasFilter" missing
+FAIL CanvasFilter interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "CanvasFilter" expected property "CanvasFilter" missing
+FAIL CanvasFilter interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "CanvasFilter" expected property "CanvasFilter" missing
PASS CanvasGradient interface: existence and properties of interface object
PASS CanvasGradient interface object length
PASS CanvasGradient interface object name
@@ -310,7 +316,7 @@ PASS Path2D interface: operation quadraticCurveTo(unrestricted double, unrestric
PASS Path2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS Path2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS Path2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS Path2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS ImageBitmapRenderingContext interface: existence and properties of interface object
@@ -405,12 +411,12 @@ PASS OffscreenCanvasRenderingContext2D interface: attribute font
PASS OffscreenCanvasRenderingContext2D interface: attribute textAlign
PASS OffscreenCanvasRenderingContext2D interface: attribute textBaseline
PASS OffscreenCanvasRenderingContext2D interface: attribute direction
-FAIL OffscreenCanvasRenderingContext2D interface: attribute textLetterSpacing assert_true: The prototype object must have a property "textLetterSpacing" expected true got false
-FAIL OffscreenCanvasRenderingContext2D interface: attribute textWordSpacing assert_true: The prototype object must have a property "textWordSpacing" expected true got false
+FAIL OffscreenCanvasRenderingContext2D interface: attribute letterSpacing assert_true: The prototype object must have a property "letterSpacing" expected true got false
FAIL OffscreenCanvasRenderingContext2D interface: attribute fontKerning assert_true: The prototype object must have a property "fontKerning" expected true got false
FAIL OffscreenCanvasRenderingContext2D interface: attribute fontStretch assert_true: The prototype object must have a property "fontStretch" expected true got false
FAIL OffscreenCanvasRenderingContext2D interface: attribute fontVariantCaps assert_true: The prototype object must have a property "fontVariantCaps" expected true got false
FAIL OffscreenCanvasRenderingContext2D interface: attribute textRendering assert_true: The prototype object must have a property "textRendering" expected true got false
+FAIL OffscreenCanvasRenderingContext2D interface: attribute wordSpacing assert_true: The prototype object must have a property "wordSpacing" expected true got false
PASS OffscreenCanvasRenderingContext2D interface: operation closePath()
PASS OffscreenCanvasRenderingContext2D interface: operation moveTo(unrestricted double, unrestricted double)
PASS OffscreenCanvasRenderingContext2D interface: operation lineTo(unrestricted double, unrestricted double)
@@ -418,7 +424,7 @@ PASS OffscreenCanvasRenderingContext2D interface: operation quadraticCurveTo(unr
PASS OffscreenCanvasRenderingContext2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS OffscreenCanvasRenderingContext2D interface: operation arcTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)
PASS OffscreenCanvasRenderingContext2D interface: operation rect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)
-FAIL OffscreenCanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>) assert_own_property: interface prototype object missing non-static operation expected property "roundRect" missing
+PASS OffscreenCanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, sequence<(unrestricted double or DOMPointInit)>)
PASS OffscreenCanvasRenderingContext2D interface: operation arc(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS OffscreenCanvasRenderingContext2D interface: operation ellipse(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional boolean)
PASS CustomElementRegistry interface: existence and properties of interface object
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 27a0794ff747..b1ed28770737 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -16,6 +16,7 @@
(WebCore::InspectorCanvas::processArgument): Added stub for the
RadiusVariant as used in roundRect.
* inspector/InspectorCanvasCallTracer.h:
+ * inspector/agents/InspectorCanvasAgent.cpp: Add include.
* inspector/RecordingSwizzleType.h: Added DOMPointInit type.
2022-02-13 Alan Bujtas <zalan@apple.com>
diff --git a/Source/WebCore/html/canvas/CanvasPath.cpp b/Source/WebCore/html/canvas/CanvasPath.cpp
index 1b565062717e..4ca87a85e7f8 100644
--- a/Source/WebCore/html/canvas/CanvasPath.cpp
+++ b/Source/WebCore/html/canvas/CanvasPath.cpp
@@ -37,6 +37,7 @@
#include "AffineTransform.h"
#include <algorithm>
+#include "DOMPointInit.h"
#include "FloatRect.h"
#include "FloatRoundedRect.h"
#include "FloatSize.h"
@@ -240,10 +241,15 @@ void CanvasPath::rect(float x, float y, float width, float height)
ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float height, const RadiusVariant& radii)
{
- return roundRect(x, y, width, height, Vector { radii });
+ return roundRect(x, y, width, height, Span { &radii, 1 });
}
ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float height, const Vector<RadiusVariant >& radii)
+{
+ return roundRect(x, y, width, height, radii.span());
+}
+
+ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float height, const Span<const RadiusVariant>& radii)
{
// Based on Nov 5th 2021 version of https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-roundrect
// 1. If any of x, y, w, or h are infinite or NaN, then return.
@@ -252,16 +258,16 @@ ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float hei
return { };
// 2. If radii is not a list of size one, two, three, or four, then throw a RangeError.
- if (radii.size() > 4 || radii.isEmpty())
+ if (radii.size() > 4 || radii.empty())
return Exception { RangeError, makeString("radii must contain at least 1 element, up to 4. It contained ", radii.size(), " elements.") };
// 3. Let normalizedRadii be an empty list.
- auto normalizedRadii = Vector<DOMPointInit>();
+ Vector<FloatPoint, 4> normalizedRadii;
// 4. For each radius of radii:
for (auto& radius : radii) {
auto shouldReturnSilently = false;
- auto ret = WTF::switchOn(radius,
+ auto exception = WTF::switchOn(radius,
// 4.1 If radius is a DOMPointInit:
[&normalizedRadii, &shouldReturnSilently](DOMPointInit point) -> ExceptionOr<void> {
// 4.1.1 If radius["x"] or radius["y"] is infinite or NaN, then return.
@@ -275,7 +281,7 @@ ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float hei
return Exception { RangeError, makeString("radius point coordinates must be positive") };
// 4.1.3 Otherwise, append radius to normalizedRadii.
- normalizedRadii.append(point);
+ normalizedRadii.append({ static_cast<float>(point.x), static_cast<float>(point.y) });
return { };
},
// 4.2 If radius is a unrestricted double:
@@ -292,15 +298,15 @@ ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float hei
return Exception { RangeError, makeString("radius value must be positive") };
// 4.2.3 Otherwise append «[ "x" → radius, "y" → radius ]» to normalizedRadii.
- normalizedRadii.append({ radiusValue, radiusValue });
+ normalizedRadii.append({ static_cast<float>(radiusValue), static_cast<float>(radiusValue) });
return { };
}
);
- if (ret.hasException() || shouldReturnSilently)
- return ret;
+ if (exception.hasException() || shouldReturnSilently)
+ return exception;
}
- // Degenerated case, fallback to regular rect.
+ // Degenerate case, fall back to regular rect.
// We do not do this before parsing the radii in order to make sure the Exceptions can be raised.
if (!width || !height) {
rect(x, y, width, height);
@@ -308,7 +314,7 @@ ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float hei
}
// 5. Let upperLeft, upperRight, lowerRight, and lowerLeft be null.
- DOMPointInit upperLeft, upperRight, lowerRight, lowerLeft;
+ FloatPoint upperLeft, upperRight, lowerRight, lowerLeft;
switch (normalizedRadii.size()) {
case 4:
@@ -365,83 +371,79 @@ ExceptionOr<void> CanvasPath::roundRect(float x, float y, float width, float hei
// 10. Corner curves must not overlap. Scale all radii to prevent this:
// 10.1 Let top be upperLeft["x"] + upperRight["x"].
- auto top = upperLeft.x + upperRight.x;
+ auto top = upperLeft.x() + upperRight.x();
// 10.2 Let right be upperRight["y"] + lowerRight["y"].
- auto right = upperRight.y + lowerRight.y;
+ auto right = upperRight.y() + lowerRight.y();
// 10.3 Let bottom be lowerRight["x"] + lowerLeft["x"].
- auto bottom = lowerRight.x + lowerLeft.x;
+ auto bottom = lowerRight.x() + lowerLeft.x();
// 10.4 Let left be upperLeft["y"] + lowerLeft["y"].
- auto left = upperLeft.y + lowerLeft.y;
+ auto left = upperLeft.y() + lowerLeft.y();
// 10.5 Let scale be the minimum value of the ratios w / top, h / right, w / bottom, h / left.
auto scale = std::min({ width / top, height / right, width / bottom, height / left });
// 10.6 If scale is less than 1, then set the x and y members of upperLeft, upperRight, lowerLeft, and lowerRight to their current values multiplied by scale.
if (scale < 1) {
- upperLeft.x *= scale;
- upperLeft.y *= scale;
- upperRight.x *= scale;
- upperRight.y *= scale;
- lowerLeft.x *= scale;
- lowerLeft.y *= scale;
- lowerRight.x *= scale;
- lowerRight.y *= scale;
+ upperLeft.scale(scale);
+ upperRight.scale(scale);
+ lowerLeft.scale(scale);
+ lowerRight.scale(scale);
}
// 11. Create a new subpath:
- m_path.moveTo(FloatPoint(x + upperLeft.x, y));
+ m_path.moveTo({x + upperLeft.x(), y});
// The 11.x clockwise substeps are handled by Path::addRoundedRect directly.
if (clockwise) {
m_path.addRoundedRect({ FloatRect(x, y, width, height),
- { static_cast<float>(upperLeft.x), static_cast<float>(upperLeft.y) },
- { static_cast<float>(upperRight.x), static_cast<float>(upperRight.y) },
- { static_cast<float>(lowerLeft.x), static_cast<float>(lowerLeft.y) },
- { static_cast<float>(lowerRight.x), static_cast<float>(lowerRight.y) },
+ { static_cast<float>(upperLeft.x()), static_cast<float>(upperLeft.y()) },
+ { static_cast<float>(upperRight.x()), static_cast<float>(upperRight.y()) },
+ { static_cast<float>(lowerLeft.x()), static_cast<float>(lowerLeft.y()) },
+ { static_cast<float>(lowerRight.x()), static_cast<float>(lowerRight.y()) },
});
} else {
// Top Left corner
- if (upperLeft.x > 0 || upperLeft.y > 0) {
- m_path.addBezierCurveTo(FloatPoint(x + upperLeft.x * m_path.circleControlPoint(), y),
- FloatPoint(x, y + upperLeft.y * m_path.circleControlPoint()),
- FloatPoint(x, y + upperLeft.y));
+ if (upperLeft.x() > 0 || upperLeft.y() > 0) {
+ m_path.addBezierCurveTo({ x + upperLeft.x() * m_path.circleControlPoint(), y },
+ { x, y + upperLeft.y() * m_path.circleControlPoint() },
+ { x, y + upperLeft.y() });
}
// Left edge
- m_path.addLineTo(FloatPoint(x, y + height - lowerLeft.y));
+ m_path.addLineTo({ x, y + height - lowerLeft.y() });
// Bottom left corner
- if (lowerLeft.x > 0 || lowerLeft.y > 0) {
- m_path.addBezierCurveTo(FloatPoint(x, y + height - lowerLeft.y * m_path.circleControlPoint()),
- FloatPoint(x + lowerLeft.x * m_path.circleControlPoint(), y + height),
- FloatPoint(x + lowerLeft.x, y + height));
+ if (lowerLeft.x() > 0 || lowerLeft.y() > 0) {
+ m_path.addBezierCurveTo({ x, y + height - lowerLeft.y() * m_path.circleControlPoint() },
+ { x + lowerLeft.x() * m_path.circleControlPoint(), y + height },
+ { x + lowerLeft.x(), y + height });
}
// Bottom edge
- m_path.addLineTo(FloatPoint(x + width - lowerRight.x, y + height));
+ m_path.addLineTo({ x + width - lowerRight.x(), y + height });
// Bottom right corner
- if (lowerRight.x > 0 || lowerRight.y > 0) {
- m_path.addBezierCurveTo(FloatPoint(x + width - lowerRight.x * m_path.circleControlPoint(), y + height),
- FloatPoint(x + width, y + height - lowerRight.y * m_path.circleControlPoint()),
- FloatPoint(x + width, y + height - lowerRight.y));
+ if (lowerRight.x() > 0 || lowerRight.y() > 0) {
+ m_path.addBezierCurveTo({ x + width - lowerRight.x() * m_path.circleControlPoint(), y + height },
+ { x + width, y + height - lowerRight.y() * m_path.circleControlPoint() },
+ { x + width, y + height - lowerRight.y() });
}
// Right edge
- m_path.addLineTo(FloatPoint(x + width, y + upperRight.y));
+ m_path.addLineTo({ x + width, y + upperRight.y() });
// Top right corner
- if (upperRight.x > 0 || upperRight.y > 0) {
- m_path.addBezierCurveTo(FloatPoint(x + width, y + upperRight.y * m_path.circleControlPoint()),
- FloatPoint(x + width - upperRight.x * m_path.circleControlPoint(), y),
- FloatPoint(x + width - upperRight.x, y));
+ if (upperRight.x() > 0 || upperRight.y() > 0) {
+ m_path.addBezierCurveTo({ x + width, y + upperRight.y() * m_path.circleControlPoint() },
+ { x + width - upperRight.x() * m_path.circleControlPoint(), y },
+ { x + width - upperRight.x(), y });
}
// Top edge
- m_path.addLineTo(FloatPoint(x + upperLeft.x, y));
+ m_path.addLineTo({ x + upperLeft.x(), y });
}
// 12. Mark the subpath as closed.
m_path.closeSubpath();
// 13. Create a new subpath with the point (x, y) as the only point in the subpath.
- m_path.moveTo(FloatPoint(x, y));
+ m_path.moveTo({ x, y });
return { };
}
diff --git a/Source/WebCore/html/canvas/CanvasPath.h b/Source/WebCore/html/canvas/CanvasPath.h
index 0dcfcaf14dfe..c14670631ec0 100644
--- a/Source/WebCore/html/canvas/CanvasPath.h
+++ b/Source/WebCore/html/canvas/CanvasPath.h
@@ -28,15 +28,16 @@
#pragma once
-#include "DOMPointInit.h"
#include "ExceptionOr.h"
#include "Path.h"
#include <variant>
-#include <wtf/Vector.h>
+#include <wtf/Forward.h>
namespace WebCore {
+class DOMPointInit;
+
class CanvasPath {
public:
using RadiusVariant = std::variant<double, DOMPointInit>;
@@ -68,6 +69,8 @@ protected:
void lineTo(FloatPoint);
Path m_path;
+private:
+ ExceptionOr<void> roundRect(float x, float y, float width, float height, const Span<const RadiusVariant>& radii);
};
}
diff --git a/Source/WebCore/inspector/InspectorCanvas.cpp b/Source/WebCore/inspector/InspectorCanvas.cpp
index ef7738dbb2a7..bbcc79abc386 100644
--- a/Source/WebCore/inspector/InspectorCanvas.cpp
+++ b/Source/WebCore/inspector/InspectorCanvas.cpp
@@ -35,6 +35,7 @@
#include "CanvasRenderingContext2D.h"
#include "ColorSerialization.h"
#include "DOMMatrix2DInit.h"
+#include "DOMPointInit.h"
#include "Document.h"
#include "Element.h"
#include "FloatPoint.h"
diff --git a/Source/WebCore/inspector/InspectorCanvasCallTracer.cpp b/Source/WebCore/inspector/InspectorCanvasCallTracer.cpp
index e6b8e5f12f58..73ced654c05d 100644
--- a/Source/WebCore/inspector/InspectorCanvasCallTracer.cpp
+++ b/Source/WebCore/inspector/InspectorCanvasCallTracer.cpp
@@ -33,6 +33,7 @@
#include "CanvasRenderingContext.h"
#include "CanvasRenderingContext2D.h"
#include "DOMMatrix2DInit.h"
+#include "DOMPointInit.h"
#include "Element.h"
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
diff --git a/Source/WebCore/inspector/InspectorCanvasCallTracer.h b/Source/WebCore/inspector/InspectorCanvasCallTracer.h
index 58fa7e9c8e50..a376956d35e2 100644
--- a/Source/WebCore/inspector/InspectorCanvasCallTracer.h
+++ b/Source/WebCore/inspector/InspectorCanvasCallTracer.h
@@ -30,7 +30,6 @@
#include "WebGLRenderingContextBase.h"
#include <JavaScriptCore/TypedArrays.h>
#include <initializer_list>
-#include <variant>
#include <wtf/JSONValues.h>
#include <wtf/Ref.h>
#include <wtf/Vector.h>
diff --git a/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp b/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
index 8322c8db2a8a..1c1668d99c7a 100644
--- a/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
+++ b/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
@@ -33,6 +33,7 @@
#include "CanvasRenderingContext.h"
#include "CanvasRenderingContext2D.h"
#include "DOMMatrix2DInit.h"
+#include "DOMPointInit.h"
#include "Document.h"
#include "Element.h"
#include "EventLoop.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment