diff options
Diffstat (limited to 'components/layout_2020/fragment_tree/fragment.rs')
-rw-r--r-- | components/layout_2020/fragment_tree/fragment.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/layout_2020/fragment_tree/fragment.rs b/components/layout_2020/fragment_tree/fragment.rs index 77b575a9d42..fda4636e9e7 100644 --- a/components/layout_2020/fragment_tree/fragment.rs +++ b/components/layout_2020/fragment_tree/fragment.rs @@ -167,6 +167,15 @@ impl Fragment { } } + pub fn scrolling_area(&self, containing_block: &PhysicalRect<Length>) -> PhysicalRect<Length> { + match self { + Fragment::Box(fragment) | Fragment::Float(fragment) => fragment + .scrollable_overflow(containing_block) + .translate(containing_block.origin.to_vector()), + _ => self.scrollable_overflow(containing_block), + } + } + pub fn scrollable_overflow( &self, containing_block: &PhysicalRect<Length>, |