mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
layout: Support storing layout data for two-level nested pseudo-elements (#38678)
Add basic support for storing layout data for pseudo-elements nested to up to two levels. This removes the last unstored layout result and fixes a double-borrow issue. This change does not add properly parsing nor styling of these element types, but does prepare for those changes which must come from stylo. Testing: This fixes a intermittent panic in `tests/wpt/tests/css/css-lists/nested-marker-styling.html` Fixes: #38177. Closes: #38183. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
43da933247
commit
99ce81cf64
10 changed files with 273 additions and 177 deletions
|
@ -190,7 +190,7 @@ fn construct_for_root_element(
|
|||
|
||||
let root_box = ArcRefCell::new(root_box);
|
||||
root_element
|
||||
.element_box_slot()
|
||||
.box_slot()
|
||||
.set(LayoutBox::BlockLevel(root_box.clone()));
|
||||
vec![root_box]
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ impl<'dom> IncrementalBoxTreeUpdate<'dom> {
|
|||
return None;
|
||||
}
|
||||
|
||||
let layout_data = NodeExt::layout_data(&potential_thread_safe_dirty_root_node)?;
|
||||
let layout_data = NodeExt::inner_layout_data(&potential_thread_safe_dirty_root_node)?;
|
||||
if !layout_data.pseudo_boxes.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue