servo/components/layout_2020
bors-servo 818ee77d9d
Auto merge of #29677 - mrobinson:resolved-insets, r=delan
Better implement getComputedStyle() for positioned insets

The specification dictates quite quite idiosyncratic return values when
querying insets of positioned elements via `getComputedStyle()`. These
depend on whether or not the element's size was overconstrained. This
change adds a better implementation of that in preparation for returning
proper values for `position: sticky`.

There are two changes here:
- The containing block used in `FragmentTree::find` is properly computed using the `ContainingBlockManager` data structure. This data structure is now updated during traversal through the fragment tree in `Fragment::find`.
- We now take into account whether or not a absolute elements are overconstrained when calculating their resolved insets. For absolutely positioned elements, this happens during absolute positioning. For relatively positioned elements, we can determine this when a `BoxFragment` is constructed.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2023-05-09 12:09:51 +02:00
..
display_list Better implement getComputedStyle() for positioned insets 2023-05-09 12:07:20 +02:00
flexbox Detect body elements during layout 2023-05-04 10:46:27 +02:00
flow Better implement getComputedStyle() for positioned insets 2023-05-09 12:07:20 +02:00
fragment_tree Better implement getComputedStyle() for positioned insets 2023-05-09 12:07:20 +02:00
tests Use the size of the containing block, not the size of the block formatting 2020-07-22 19:58:28 -07:00
Cargo.toml Detect body elements during layout 2023-05-04 10:46:27 +02:00
cell.rs Implement Default for ArcRefCell 2020-03-17 11:15:17 -07:00
context.rs Implement cross origin resource policy check 2020-05-08 19:15:24 +02:00
data.rs Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutData 2020-04-06 23:06:13 +02:00
dom_traversal.rs Detect body elements during layout 2023-05-04 10:46:27 +02:00
element_data.rs Eliminate duplicate Layout DOM wrappers 2023-05-05 17:16:38 +02:00
formatting_contexts.rs Detect body elements during layout 2023-05-04 10:46:27 +02:00
fragments.rs Better implement getComputedStyle() for positioned insets 2023-05-09 12:07:20 +02:00
geom.rs Add an implementation of the core float and clear placement logic in layout 2020-07-20 12:42:34 -07:00
layout_debug.rs Detect body elements during layout 2023-05-04 10:46:27 +02:00
lib.rs Detect body elements during layout 2023-05-04 10:46:27 +02:00
lists.rs Miscellaneous build / tidy fixes. 2021-02-26 17:53:55 +01:00
opaque_node.rs Remove layout_2020::display_list, use WebRender display lists instead 2019-09-07 19:38:44 +02:00
positioned.rs Better implement getComputedStyle() for positioned insets 2023-05-09 12:07:20 +02:00
query.rs Better implement getComputedStyle() for positioned insets 2023-05-09 12:07:20 +02:00
replaced.rs Detect body elements during layout 2023-05-04 10:46:27 +02:00
sizing.rs Parallelize BlockContainer::inline_content_sizes 2020-06-19 15:38:15 +02:00
style_ext.rs Fix an assertion failure in Layout 2020 2023-05-05 06:36:12 +02:00
traversal.rs Remove postorder traversal from layout 2020 during styling 2020-04-06 12:40:05 +02:00
wrapper.rs Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutData 2020-04-06 23:06:13 +02:00