aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/fragment_tree/containing_block.rs
Commit message (Collapse)AuthorAgeFilesLines
* layout: Make `Fragment` hold `ArcRefCell` inside (#34923)Martin Robinson2025-01-131-1/+1
| | | | | | | | | | | | Push the interior mutability into enum variants of `Fragment`, so that they can be cloned. This saves memory in the `Fragment` tree as the `Fragment` enum is now a relatively wee 16 bytes and the interior parts can be a variety of sizes. Before, every `Fragment` was the size of the biggest kind (`BoxFragment` - 248 bytes). This a step on the way toward incremental layout. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* clippy: Fix various clippy warnings throughout the code (#33003)Ashwin Naren2024-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * replace u64::max_value() with u64::MAX Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed redundant import Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed a probable bug Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * dereference formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed excess borrow Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * ran mach fmt Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed doc comment Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed deref on an immutable reference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed minor syntax error Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted clamping Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted final clamp Signed-off-by: Ashwin Naren <arihant2math@gmail.com> --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Co-authored-by: Ashwin Naren <ashwin@pixelators.org>
* Lint layout_2020 with clippy (#31169)Oriol Brufau2024-01-251-6/+6
| | | cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-3/+3
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-1/+2
| | | | | * strict imports formatting * Reformat all imports
* Layout 2020: Move all Fragment code to the `fragment_tree` directoryMartin Robinson2023-06-041-1/+1
| | | | | | | | This is a simple code organization change with no behavior change with the idea of making Layout 2020 easier to understand by new folks to the project. The idea is that we will have a cleaner separation between the different parts of layout ie one directory for the fragment tree and one (currently multiple) directory for the box tree.
* Convert some comments into rustdocMartin Robinson2023-06-011-30/+30
| | | | | These were always meant to be rustdoc and converting them makes them show up in the IDE in a more helpful way.
* Better implement getComputedStyle() for positioned insetsMartin Robinson2023-05-091-0/+99
The specification dictates quite quite idiosyncratic return values when querying insets of positioned elements via getComputedStyle(). These depend on whether or not the elements size was overconstrained. This change adds a better implementation of that in preparation for returning proper values for position: sticky.