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
|
@ -241,7 +241,7 @@ impl BoxFragment {
|
|||
\nclearance={:?}\
|
||||
\nscrollable_overflow={:?}\
|
||||
\nbaselines={:?}\
|
||||
\noverflow={:?} / {:?}",
|
||||
\noverflow={:?}",
|
||||
self.base,
|
||||
self.content_rect,
|
||||
self.padding_rect(),
|
||||
|
@ -250,8 +250,7 @@ impl BoxFragment {
|
|||
self.clearance,
|
||||
self.scrollable_overflow(),
|
||||
self.baselines,
|
||||
self.style.get_box().overflow_x,
|
||||
self.style.get_box().overflow_y,
|
||||
self.style.effective_overflow(),
|
||||
));
|
||||
|
||||
for child in &self.children {
|
||||
|
@ -274,12 +273,13 @@ impl BoxFragment {
|
|||
overflow.max_y().max(scrollable_overflow.max_y()),
|
||||
);
|
||||
|
||||
if self.style.get_box().overflow_y == ComputedOverflow::Visible {
|
||||
let overflow_style = self.style.effective_overflow();
|
||||
if overflow_style.y == ComputedOverflow::Visible {
|
||||
overflow.origin.y = overflow.origin.y.min(scrollable_overflow.origin.y);
|
||||
overflow.size.height = bottom_right.y - overflow.origin.y;
|
||||
}
|
||||
|
||||
if self.style.get_box().overflow_x == ComputedOverflow::Visible {
|
||||
if overflow_style.x == ComputedOverflow::Visible {
|
||||
overflow.origin.x = overflow.origin.x.min(scrollable_overflow.origin.x);
|
||||
overflow.size.width = bottom_right.x - overflow.origin.x;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue