mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Use Overflow::is_scrollable in StyleAdjuster.
It was introduced in the overflow: clip work but this standalone equivalent remained. Differential Revision: https://phabricator.services.mozilla.com/D85778
This commit is contained in:
parent
b29824bf75
commit
687fc20274
1 changed files with 1 additions and 5 deletions
|
@ -533,13 +533,9 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
let overflow_x = box_style.clone_overflow_x();
|
||||
let overflow_y = box_style.clone_overflow_y();
|
||||
|
||||
fn scrollable(v: Overflow) -> bool {
|
||||
v != Overflow::Clip && v != Overflow::Visible
|
||||
}
|
||||
|
||||
// If at least one is scrollable we'll adjust the other one in
|
||||
// adjust_for_overflow if needed.
|
||||
if scrollable(overflow_x) || scrollable(overflow_y) {
|
||||
if overflow_x.is_scrollable() || overflow_y.is_scrollable() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue