From 687fc20274f1f7b6a133efea776934211dc27f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 3 Aug 2020 21:19:56 +0000 Subject: [PATCH] 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 --- components/style/style_adjuster.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index e612d3b9977..c48d1bc011a 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -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; }