mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Add a LayoutBoxBase
to inline boxes (#36513)
`LayoutBoxBase` will soon contain laid out `Fragment`s of a box tree node in order to facilitate incremental layout and also layout queries. This is currently missing for inline boxes, so this change adds a `LayoutBoxBase` to them. Testing: This should not change any observable behavior, so existing WPT suites should suffice for testing. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
440739090f
commit
d46a17a487
6 changed files with 29 additions and 24 deletions
|
@ -275,6 +275,7 @@ impl IndependentNonReplacedContents {
|
|||
depends_on_block_constraints: bool,
|
||||
) -> CacheableLayoutResult {
|
||||
if let Some(cache) = base.cached_layout_result.borrow().as_ref() {
|
||||
let cache = &**cache;
|
||||
if cache.containing_block_for_children_size.inline ==
|
||||
containing_block_for_children.size.inline &&
|
||||
(cache.containing_block_for_children_size.block ==
|
||||
|
@ -305,11 +306,11 @@ impl IndependentNonReplacedContents {
|
|||
depends_on_block_constraints,
|
||||
);
|
||||
|
||||
*base.cached_layout_result.borrow_mut() = Some(CacheableLayoutResultAndInputs {
|
||||
*base.cached_layout_result.borrow_mut() = Some(Box::new(CacheableLayoutResultAndInputs {
|
||||
result: result.clone(),
|
||||
positioning_context: child_positioning_context.clone(),
|
||||
containing_block_for_children_size: containing_block_for_children.size.clone(),
|
||||
});
|
||||
}));
|
||||
positioning_context.append(child_positioning_context);
|
||||
|
||||
result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue