aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_dom/document.rs
Commit message (Collapse)AuthorAgeFilesLines
* script: Make layout DOM wrappers not generic on layout data (#31994)Martin Robinson2024-04-041-26/+9
| | | | | | | | | Remove the type parameter from the layout DOM wrappers. This is possible now that style and layout data are separate and the `Any` nature of the layout data is exposed in the wrappers. Removing the phantom data member of the wrappers also allows using the default `derive` implementations for things like `Clone`, `Copy`, and `PartialEq`.
* script: Reduce the use of `unsafe` in LayoutDom (#31979)Martin Robinson2024-04-031-2/+2
| | | | | | | | | | | | | Remove the use of unsafe code in the layout wrappers of the DOM. The main change here is that `unsafe_get()` no longer needs to be an unsafe method, which allows us to transitively remove or reduce unsafe blocks from callers. The function itself is not renamed, because it's still a bit dangerous to start removing the layers of abstraction from actual DOM nodes. In addition `init_style_and_opaque_layout_data` can be merged into `initialize_data`, which removes one more unsafe method. Finally, a "Safety" section is added to some unsafe methods.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-7/+7
| | | | | * strict imports formatting * Reformat all imports
* Further changes required by ServoOriol Brufau2023-05-161-4/+3
|
* Eliminate duplicate Layout DOM wrappersMartin Robinson2023-05-051-0/+114
There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and one for Layout 2020. As part of cleaning up and simplifying the wrappers, this change parameterizes them on the specific layout data they contain. This allows them to be shared again. In addition, various small cleanups are included. Fixes #29691.