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
|
@ -1287,8 +1287,7 @@ impl BoxFragment {
|
|||
parent_clip_id: &wr::ClipChainId,
|
||||
containing_block_rect: &PhysicalRect<Au>,
|
||||
) -> Option<(ScrollTreeNodeId, wr::ClipChainId, LayoutSize)> {
|
||||
let overflow_x = self.style.get_box().overflow_x;
|
||||
let overflow_y = self.style.get_box().overflow_y;
|
||||
let overflow = self.style.effective_overflow();
|
||||
if !self.style.establishes_scroll_container() {
|
||||
return None;
|
||||
}
|
||||
|
@ -1318,7 +1317,7 @@ impl BoxFragment {
|
|||
);
|
||||
|
||||
let sensitivity =
|
||||
if ComputedOverflow::Hidden == overflow_x && ComputedOverflow::Hidden == overflow_y {
|
||||
if ComputedOverflow::Hidden == overflow.x && ComputedOverflow::Hidden == overflow.y {
|
||||
ScrollSensitivity::Script
|
||||
} else {
|
||||
ScrollSensitivity::ScriptAndInputEvents
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue