mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
LibWeb: Add DOMMatrix string constructor and set matrix value
This commit is contained in:
parent
903d3c92c8
commit
be7538961b
15 changed files with 336 additions and 120 deletions
|
@ -112,7 +112,6 @@ public:
|
|||
protected:
|
||||
DOMMatrixReadOnly(JS::Realm&, double m11, double m12, double m21, double m22, double m41, double m42);
|
||||
DOMMatrixReadOnly(JS::Realm&, double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44);
|
||||
DOMMatrixReadOnly(JS::Realm&, Optional<Variant<String, Vector<double>>> const& init);
|
||||
DOMMatrixReadOnly(JS::Realm&, DOMMatrixReadOnly const& other);
|
||||
|
||||
// NOTE: The matrix used in the spec is column-major (https://drafts.fxtf.org/geometry/#4x4-abstract-matrix) but Gfx::Matrix4x4 is row-major so we need to transpose the values.
|
||||
|
@ -130,4 +129,11 @@ private:
|
|||
WebIDL::ExceptionOr<void> validate_and_fixup_dom_matrix_2d_init(DOMMatrix2DInit& init);
|
||||
WebIDL::ExceptionOr<void> validate_and_fixup_dom_matrix_init(DOMMatrixInit& init);
|
||||
|
||||
struct ParsedMatrix {
|
||||
Gfx::DoubleMatrix4x4 matrix;
|
||||
bool is_2d_transform;
|
||||
};
|
||||
|
||||
WebIDL::ExceptionOr<ParsedMatrix> parse_dom_matrix_init_string(JS::Realm& realm, StringView transform_list);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue