aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/style_adjuster.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2020-08-03 21:19:56 +0000
committerEmilio Cobos Álvarez <emilio@crisal.io>2021-02-26 16:44:05 +0100
commit687fc20274f1f7b6a133efea776934211dc27f6b (patch)
tree1c20e2fc02695e1f58addebb26bf9613a25c9bcc /components/style/style_adjuster.rs
parentb29824bf750625aa0c7b8279bbc9f2ce3ce49867 (diff)
downloadservo-687fc20274f1f7b6a133efea776934211dc27f6b.tar.gz
servo-687fc20274f1f7b6a133efea776934211dc27f6b.zip
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
Diffstat (limited to 'components/style/style_adjuster.rs')
-rw-r--r--components/style/style_adjuster.rs6
1 files changed, 1 insertions, 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;
}