aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/fragment_tree/fragment.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/fragment_tree/fragment.rs')
-rw-r--r--components/layout/fragment_tree/fragment.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/components/layout/fragment_tree/fragment.rs b/components/layout/fragment_tree/fragment.rs
index 7708b0893ee..1c5324fa1c4 100644
--- a/components/layout/fragment_tree/fragment.rs
+++ b/components/layout/fragment_tree/fragment.rs
@@ -170,17 +170,28 @@ impl Fragment {
}
}
- pub fn scrolling_area(&self) -> PhysicalRect<Au> {
+ pub fn unclipped_scrolling_area(&self) -> PhysicalRect<Au> {
match self {
Fragment::Box(fragment) | Fragment::Float(fragment) => {
let fragment = fragment.borrow();
fragment.offset_by_containing_block(&fragment.scrollable_overflow())
},
- _ => self.scrollable_overflow(),
+ _ => self.scrollable_overflow_for_parent(),
+ }
+ }
+
+ pub fn scrolling_area(&self) -> PhysicalRect<Au> {
+ match self {
+ Fragment::Box(fragment) | Fragment::Float(fragment) => {
+ let fragment = fragment.borrow();
+ fragment
+ .offset_by_containing_block(&fragment.reachable_scrollable_overflow_region())
+ },
+ _ => self.scrollable_overflow_for_parent(),
}
}
- pub fn scrollable_overflow(&self) -> PhysicalRect<Au> {
+ pub fn scrollable_overflow_for_parent(&self) -> PhysicalRect<Au> {
match self {
Fragment::Box(fragment) | Fragment::Float(fragment) => {
fragment.borrow().scrollable_overflow_for_parent()