As indicated by the WPT: https://wpt.fyi/results/css/geometry/DOMMatrix2DInit-validate-fixup.html Relevant spec refs: https://html.spec.whatwg.org/multipage/canvas.html#dom-path2d-addpath https://drafts.fxtf.org/geometry/#matrix-validate-and-fixup-2d
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bca17f295290d53553383c739ce5731e8158a643 commit bca17f295290d53553383c739ce5731e8158a643 Author: Fredrik Söderquist <fs@opera.com> Date: Mon Oct 15 19:55:20 2018 Path2D.addPath should throw if DOMMatrix validation fails Step two of [1], invokes [2], whose step 1 invokes [3], which says to throw a TypeError if the dictionary is not "well-formed". Also remove some dead code in DOMMatrix/DOMMatrixReadOnly and remove few unused includes of svg_matrix_tear_off.h. [1] https://html.spec.whatwg.org/multipage/canvas.html#dom-path2d-addpath [2] https://drafts.fxtf.org/geometry/#create-a-dommatrix-from-the-2d-dictionary [3] https://drafts.fxtf.org/geometry/#matrix-validate-and-fixup-2d Bug: 895244 Change-Id: Icd3f7058ce945d761ab7128e294ccc2e3fd3a879 Reviewed-on: https://chromium-review.googlesource.com/c/1278789 Reviewed-by: Fernando Serboncini <fserb@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#599723} [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/WebKit/LayoutTests/external/wpt/css/geometry/DOMMatrix2DInit-validate-fixup-expected.txt [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/blink/renderer/core/geometry/dom_matrix.cc [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/blink/renderer/core/geometry/dom_matrix.h [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/blink/renderer/core/geometry/dom_matrix_read_only.cc [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/blink/renderer/core/geometry/dom_matrix_read_only.h [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/blink/renderer/modules/canvas/canvas2d/canvas_pattern.h [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/blink/renderer/modules/canvas/canvas2d/path_2d.h [modify] https://crrev.com/bca17f295290d53553383c739ce5731e8158a643/third_party/blink/renderer/modules/canvas/canvas2d/path_2d.idl
Comment 1 by f...@opera.com
, Oct 15