mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
layout: Fix scrollParent
to skip ancestors with display: contents
(#39153)
When encountering such an ancestor, we were returning null instead of skipping it. Testing: Adding new subtest for this. And while I'm at it, another one for the root element, unrelated to this fix. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
cf1f64e73f
commit
0f9f507b46
3 changed files with 14 additions and 4 deletions
|
@ -701,10 +701,13 @@ pub(crate) fn process_scroll_parent_query(
|
|||
continue;
|
||||
};
|
||||
|
||||
let (ancestor_style, ancestor_flags) = ancestor_layout_box
|
||||
let Some((ancestor_style, ancestor_flags)) = ancestor_layout_box
|
||||
.with_base_flat(|base| vec![(base.style.clone(), base.base_fragment_info.flags)])
|
||||
.first()
|
||||
.cloned()?;
|
||||
.cloned()
|
||||
else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let is_containing_block = match current_position_value {
|
||||
Position::Static | Position::Relative | Position::Sticky => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue