servo/tests
Tim van der Lippe dcc88b53aa
Implement "Create a Trusted Type" algorithm (#36454)
This algorithm is quite straightforward written in the specification,
but leads to some type awkwardness in Rust. Most notably, the callbacks
have different types and cannot be unified easily. They also return
different string types. Similarly, the returning objects are all unique
types and don't have a common denominator.

Therefore, rather than implementing it in 1-to-1 fashion with the
specification text, it instead uses callbacks to instruct the type
system of what to call when.

This is further complicated by the fact that the callback can exist
or not, as well as return a value or not. This requires multiple
unwrangling, combined with the fact that the algorithm should throw
or not.

All in all, the number of lines is relatively low compared to the
specification algorithm and the Rust compiler does a lot of heavy
lifting figuring out which type is what.

Part of https://github.com/servo/servo/issues/36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2025-04-13 03:55:23 +00:00
..
dromaeo mach: Add test-speedometer command and --bmf-output to speedometer and dromaeo (#33247) 2024-08-29 15:58:57 +00:00
html fonts: Use FontInstanceFlags::EMBEDDED_BITMAPS for color fonts on MacOS (#32203) 2024-05-02 06:50:59 +00:00
jquery
power
unit Fix Backspace deleting entire previous line in <textarea> (#36112) 2025-03-26 18:37:48 +00:00
wpt Implement "Create a Trusted Type" algorithm (#36454) 2025-04-13 03:55:23 +00:00