ladybird/Libraries/LibWeb/Geometry
Luke Wilde d08d6b08d3 LibWeb: Use enum for serialization and reimplement interface exposure
Our currently implementation of structured serialization has a design
flaw, where if the serialized/transferred type was not used in the
destination realm, it would not be seen as exposed and thus we would
not re-create the type on the other side.

This is very common, for example, transferring a MessagePort to a just
inserted iframe, or the just inserted iframe transferring a MessagePort
to it's parent. This is what Google reCAPTCHA does.

This flaw occurred due to relying on lazily populated HashMaps of
constructors, namespaces and interfaces. This commit changes it so that
per-type "is exposed" implementations are generated.

Since it no longer relies on interface name strings, this commit
changes serializable types to indicate their type with an enum,
in line with how transferrable types indicate their type.

This makes Google reCAPTCHA work on https://www.google.com/recaptcha/api2/demo
It currently doesn't work on non-Google origins due to a separate
same-origin policy bug.
2025-07-15 09:20:02 -04:00
..
DOMMatrix.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMMatrix.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
DOMMatrix.idl
DOMMatrixReadOnly.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMMatrixReadOnly.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
DOMMatrixReadOnly.idl
DOMPoint.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMPoint.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
DOMPoint.idl
DOMPointReadOnly.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMPointReadOnly.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
DOMPointReadOnly.idl
DOMQuad.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMQuad.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
DOMQuad.idl
DOMRect.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMRect.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
DOMRect.idl
DOMRectList.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMRectList.h LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
DOMRectList.idl
DOMRectReadOnly.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
DOMRectReadOnly.h LibWeb: Use enum for serialization and reimplement interface exposure 2025-07-15 09:20:02 -04:00
DOMRectReadOnly.idl