mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
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. --> |
||
---|---|---|
.. | ||
display_list | ||
flexbox | ||
flow | ||
fragment_tree | ||
tests | ||
Cargo.toml | ||
cell.rs | ||
context.rs | ||
data.rs | ||
dom_traversal.rs | ||
element_data.rs | ||
formatting_contexts.rs | ||
fragments.rs | ||
geom.rs | ||
layout_debug.rs | ||
lib.rs | ||
lists.rs | ||
opaque_node.rs | ||
positioned.rs | ||
query.rs | ||
replaced.rs | ||
sizing.rs | ||
style_ext.rs | ||
traversal.rs | ||
wrapper.rs |