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:
Emilio Cobos Álvarez 2020-08-03 21:19:56 +00:00
parent b29824bf75
commit 687fc20274

View file

@ -533,13 +533,9 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
let overflow_x = box_style.clone_overflow_x(); let overflow_x = box_style.clone_overflow_x();
let overflow_y = box_style.clone_overflow_y(); 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 // If at least one is scrollable we'll adjust the other one in
// adjust_for_overflow if needed. // adjust_for_overflow if needed.
if scrollable(overflow_x) || scrollable(overflow_y) { if overflow_x.is_scrollable() || overflow_y.is_scrollable() {
return; return;
} }