mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Let table-related boxes adjust their overflow
values (#33400)
The `overflow` property doesn't apply to table track and track groups, and table elements only accept a few `overflow` values. Therefore, this patch adds an `effective_overflow()` method to get the actual value that needs to be used. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
027fc53e2f
commit
9175e598ad
6 changed files with 64 additions and 17 deletions
|
@ -67,7 +67,7 @@ impl BoxTree {
|
|||
// TODO: This should handle when different overflow is set multiple axes, which requires the
|
||||
// compositor scroll tree to allow setting a value per axis.
|
||||
let root_style = root_element.style(context);
|
||||
let mut root_overflow = root_style.get_box().overflow_y;
|
||||
let mut root_overflow = root_style.effective_overflow().y;
|
||||
if root_overflow == Overflow::Visible && !root_style.get_box().display.is_none() {
|
||||
for child in iter_child_nodes(root_element) {
|
||||
if !child.to_threadsafe().as_element().map_or(false, |element| {
|
||||
|
@ -78,7 +78,7 @@ impl BoxTree {
|
|||
|
||||
let style = child.style(context);
|
||||
if !style.get_box().display.is_none() {
|
||||
root_overflow = style.get_box().overflow_y;
|
||||
root_overflow = style.effective_overflow().y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue