Commit Graph
88 Commits
Author SHA1 Message Date
Jan Varga 23ede296c3 Bug 2038579 - Add some missing pieces to CSSMatrixComponent for Typed OM reification; r=emilio,webidl,firefox-style-system-reviewers
This patch extends CSSMatrixComponent with functionality required for
reification of <transform-list> / <transform-function> values in CSS Typed OM.

These additions are part of the initial infrastructure needed to expose
transform values and transform components through the TypedValue enum and
enable relevant WPT reification tests.

In particular, this adds storage for the matrix internal slot and support for
initializing it through the CSSMatrixComponent constructor.

Differential Revision: https://phabricator.services.mozilla.com/D300933
2026-05-23 17:44:05 +00:00
Jan Varga 4ebc4e96f9 Bug 2038579 - Change DOMMatrix serialization to UTF-8 output; r=emilio,webidl
Change DOMMatrix and DOMMatrixReadOnly serialization to UTF-8 output.

This allows existing DOMMatrix serialization logic to be reused by a follow-up
patch implementing CSSMatrixComponent serialization for Typed OM
reification.

Without this change, CSSMatrixComponent serialization would require
additional UTF-16 / UTF-8 string conversions around DOMMatrix serialization.

Differential Revision: https://phabricator.services.mozilla.com/D301727
2026-05-22 12:19:26 +00:00
serge-sans-paille 7317446ee3 Bug 2037460 - Consolidate all definitions of kRadToDegree ins a single place r=smaug,firefox-svg-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D298834
2026-05-09 20:40:46 +00:00
Silaghi ceecb0a215 Revert "Bug 2037460 - Consolidate all definitions of kRadToDegree ins a single place r=smaug,firefox-svg-reviewers" for causing bp-nu bustages at SVGArcConverter.cpp
This reverts commit 437d2a1d02.
2026-05-08 22:05:37 +00:00
serge-sans-paille 437d2a1d02 Bug 2037460 - Consolidate all definitions of kRadToDegree ins a single place r=smaug,firefox-svg-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D298834
2026-05-08 20:33:11 +00:00
Sylvestre Ledru 741bbdea29 Bug 2036402 - Apply std::move in dom/base where values can be moved instead of copied r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D298095
2026-05-04 11:17:52 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
serge-sans-paille 8a28ab1466 Bug 1992012 - Cleanup FloatingPoint.h inclusion r=emilio,media-playback-reviewers,firefox-svg-reviewers,layout-reviewers,dholbert,alwu
There was a lot of leftovers from previous code cleaning.

Also turn detail::FloatingPointTrait into FloatingPointTrait because
it's specialized in js/src/vm/Float16.h, which shows it's not an
internal API.

Differential Revision: https://phabricator.services.mozilla.com/D267467
2025-10-09 11:36:34 +00:00
serge-sans-paille b7aa5d34b0 Bug 1993159 - Remove unused inclusion of mozilla/MacroForEach.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D267907
2025-10-08 13:06:57 +00:00
serge-sans-paille 9d24f40bf8 Bug 1990656 - Cleanup mfbt/Casting.h r=emilio
- Remove useless inclusion
- Make some header dependencies conditional
- When possible implement BitwiseCast in terms of __builtin_bit_cast
- Simplify IsInBounds logic (NFC)

Differential Revision: https://phabricator.services.mozilla.com/D266084
2025-09-30 06:32:37 +00:00
Emilio Cobos Álvarez 791917d8af Bug 1976665 - Sort headers in dom/. r=dom-core,media-playback-reviewers,webrtc-reviewers,dom-storage-reviewers,padenot,janv,smaug,jesup,jib
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D256800
2025-08-05 11:47:34 +00:00
Kagami Sascha Rosylight f9d441abc7 Bug 1975174 - Fix rotateAxisAngleSelf not to always call Ensure3DMatrix r=smaug
I wonder it's worth keeping the current implementation deviation that we don't have is2D check but instead have mMatrix2D/3D. Seems that only complicates the implementation without a clear win.

Differential Revision: https://phabricator.services.mozilla.com/D256115
2025-07-07 14:49:50 +00:00
Alexandru Marc 9bb13a701c Revert "Bug 1975174 - Fix rotateAxisAngleSelf not to always call Ensure3DMatrix r=smaug" for causing mochitest failures @ test_WebKitCSSMatrix.html
This reverts commit 9ab5c68163.
2025-07-04 18:46:39 +00:00
Kagami Sascha Rosylight 9ab5c68163 Bug 1975174 - Fix rotateAxisAngleSelf not to always call Ensure3DMatrix r=smaug
I wonder it's worth keeping the current implementation deviation that we don't have is2D check but instead have mMatrix2D/3D. Seems that only complicates the implementation without a clear win.

Differential Revision: https://phabricator.services.mozilla.com/D256115
2025-07-04 17:40:43 +00:00
Olli Pettay d92943afdd Bug 1958651, don't create temporary DOMMatrixReadonly when calling addPath, r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D244534
2025-04-09 14:41:21 +00:00
Olli Pettay 093f85a623 Bug 1843477, avoid rooting hazards from AddRef, r=peterv
Depends on D188960

Differential Revision: https://phabricator.services.mozilla.com/D189208
2023-09-26 12:36:22 +00:00
Peter Van der Beken e664ec3758 Bug 1690111 - Use new TypedArray APIs for processing data. r=farre,media-playback-reviewers,padenot,chunmin,sfink
Depends on D152497

Differential Revision: https://phabricator.services.mozilla.com/D152498
2023-09-20 09:42:02 +00:00
Cosmin Sabou c3effd7450 Backed out 13 changesets (bug 1690111) for causing fetch related crashes.
Backed out changeset 5f2c25d194ad (bug 1690111)
Backed out changeset 76c408bcd053 (bug 1690111)
Backed out changeset 6d0649fdafff (bug 1690111)
Backed out changeset c1330b5e8c43 (bug 1690111)
Backed out changeset 5fa36d8fd2a5 (bug 1690111)
Backed out changeset daf7d747853a (bug 1690111)
Backed out changeset f70e09a7f5c6 (bug 1690111)
Backed out changeset 40c6d6eed7f8 (bug 1690111)
Backed out changeset 692f2a759573 (bug 1690111)
Backed out changeset 7140866dd9f6 (bug 1690111)
Backed out changeset 2865fe682139 (bug 1690111)
Backed out changeset 9dcd2416f8a5 (bug 1690111)
Backed out changeset 9c411bf84079 (bug 1690111)
2023-09-11 17:55:24 +03:00
Peter Van der Beken 312137a408 Bug 1690111 - Use new TypedArray APIs for processing data. r=farre,media-playback-reviewers,padenot,chunmin,sfink
Depends on D152497

Differential Revision: https://phabricator.services.mozilla.com/D152498
2023-09-11 12:52:20 +00:00
Andi-Bogdan Postelnicu fccbbc6b44 Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 11:35:33 +00:00
Stanca Serban 98c675ed3f Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu 2e64d79ba8 Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 09:27:57 +00:00
Andrew McCreight 188ac80e29 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Caroline Cullen 503e2e5583 Bug 1559177 - Add JS_ReadDouble. r=smaug
Depends on D142585

Differential Revision: https://phabricator.services.mozilla.com/D142637
2022-04-01 22:25:54 +00:00
Caroline Cullen 02d1446c20 Bug 1559177 - Add JS_WriteDouble. r=mgaudet,smaug
Differential Revision: https://phabricator.services.mozilla.com/D142585
2022-04-01 22:25:53 +00:00
Simon Giesecke a7ea0ac973 Bug 1673424 - Fix includes around JS/StructuredClone.h.
Differential Revision: https://phabricator.services.mozilla.com/D94762

Depends on D93568
2020-11-23 16:06:52 +00:00
Sylvestre Ledru 68b806d604 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila a6e7dcc53f Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 8f709b39e8 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Eric Rahm 274904a42d Bug 1626448 - Remove nsAutoPtr usage from dom/base. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D69119
2020-04-03 21:05:29 +00:00
Kagami Sascha Rosylight cdc338a99b Bug 1625197 - Handle validation error when multiplying r=boris
Differential Revision: https://phabricator.services.mozilla.com/D69014
2020-03-31 18:52:48 +00:00
Boris Zbarsky 19cf87ee1e Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug
Callers should pass in UTF-8, since that's what the JS engine ends up with in the end anyway.

The various URL changes are because NS_NewURI converts incoming nsAString to
UTF-8 anyway.  So we might as well do that up-front and then use the UTF-8
string for both the NS_NewURI call and the error-reporting if it fails.

Differential Revision: https://phabricator.services.mozilla.com/D65543
2020-03-06 21:08:02 +00:00
Boris Zbarsky 68a972f25b Bug 1612213 part 1. Switch most consumers of ThrowDOMException to the new methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61267
2020-02-03 20:19:11 +00:00
Edgar Chen ac8c576f36 bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514
2020-01-23 03:22:06 +00:00
Emilio Cobos Álvarez f052ee48fd Bug 1607080 - Avoid a silly UTF16 -> UTF8 round-trip in DOMMatrix. r=smaug,boris
Depends on D58710

Differential Revision: https://phabricator.services.mozilla.com/D58711
2020-01-07 09:46:53 +00:00
Boris Zbarsky 17361b9160 Bug 1581276. Require a message arg to ThrowDOMException. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D46250
2019-09-20 02:17:01 +00:00
Kagami Sascha Rosylight 734e853446 Bug 1360475: Use union for DOMMatrix constructor r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D35211
2019-07-16 21:12:38 +00:00
Kagami Sascha Rosylight 8ba7eaac5c Bug 928150: Implement canvas getTransform() and setTransform() r=bzbarsky
Adds getTransform() and setTransform() to CanvasRenderingContext2D.

Differential Revision: https://phabricator.services.mozilla.com/D36871
2019-07-11 06:14:58 +00:00
arthur.iakab 34152f9c9c Backed out changeset 0aea246d01bb (bug 928150) for causing build bustages on DOMMatrix.h CLOSED TREEE 2019-07-11 06:31:59 +03:00
Kagami Sascha Rosylight 35eb3f4f26 Bug 928150: Implement canvas getTransform() and setTransform() r=bzbarsky
Adds getTransform() and setTransform() to CanvasRenderingContext2D.

Differential Revision: https://phabricator.services.mozilla.com/D36871
2019-07-11 02:43:46 +00:00
Kagami Sascha Rosylight 3afdb368ff Bug 1364875: Append double in DOMMatrix stringifier r=bzbarsky,jwalden
Fixed the stringifier as the spec mandates [using full double precision](https://github.com/w3c/fxtf-drafts/issues/120#issuecomment-300713781).

Differential Revision: https://phabricator.services.mozilla.com/D35593
2019-07-11 02:49:51 +00:00
Kagami Sascha Rosylight ccdfb67325 Bug 1563504: Implement DOMPoint matrixTransform() r=bzbarsky
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=619248c60ce6a3f432c13abe7e7bc5bbf03c4184 (7 unexpected passes in wpt8 here have been removed)

Differential Revision: https://phabricator.services.mozilla.com/D36915
2019-07-06 06:55:53 +00:00
Kagami Sascha Rosylight 7fbe1adb1a Bug 1392722: Allow zero in rotateFromVector r=bzbarsky
Aligns to the spec. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f7c12c831fb8a6ce0d5ec6b31fcf1f708464deaf

Differential Revision: https://phabricator.services.mozilla.com/D36748
2019-07-04 07:39:45 +00:00
Boris Zbarsky 730e088116 Bug 1558101: Implement geometry static constructors r=bzbarsky
Includes .fromRect, .fromQuad, and .fromFloat32/64Array.

Differential Revision: https://phabricator.services.mozilla.com/D36464
2019-07-03 05:51:30 +00:00
Kagami Sascha Rosylight ef10d4252d Bug 1560480: Align DOMMatrix rotate*() with the spec r=bzbarsky
Supports 3D rotation as the spec does.

Differential Revision: https://phabricator.services.mozilla.com/D36411
2019-07-02 10:29:46 +02:00
Kagami Sascha Rosylight 12d38e7f2a Bug 1560119: Remove DOMMatrix scaleNonUniformSelf() r=bzbarsky
We probably just can remove it given that no other implementations are there.

Differential Revision: https://phabricator.services.mozilla.com/D36491
2019-07-01 21:07:20 +00:00
Kagami Sascha Rosylight c9605f05d7 Bug 1397945: Align DOMMatrix scale* operations to the spec r=bzbarsky
Adjusted scale() to receive six arguments, scale3d() to allow zero argument, and scaleNonUniform to support only two arguments.  Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e6484802f1961c7fe881b4d1d7f4309ec19110a7

Differential Revision: https://phabricator.services.mozilla.com/D36147
2019-06-28 15:11:00 +00:00
Kagami Sascha Rosylight a650c71cbc Bug 1560462: Implement DOMMatrix.fromMatrix r=bzbarsky
Also fixes `.multiply()` to use DOMMatrixInit.

Differential Revision: https://phabricator.services.mozilla.com/D35526
2019-06-30 03:02:13 +00:00
Coroiu Cristina 861f5e45b2 Backed out changeset d63622bdde81 (bug 1560462) for wpt failures at css/geometry/DOMMatrixInit-validate-fixup.html 2019-06-30 03:21:14 +03:00
Kagami Sascha Rosylight a80395c979 Bug 1560462: Implement DOMMatrix.fromMatrix r=bzbarsky
Also fixes `.multiply()` to use DOMMatrixInit.

Differential Revision: https://phabricator.services.mozilla.com/D35526
2019-06-29 03:24:08 +00:00