mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #7600 - pcwalton:body-overflow-scroll, r=mbrubeck
layout: Allow the overflow area of the `<body>` to be scrolled. Fixes scrolling on Twitter. r? @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7600) <!-- Reviewable:end -->
This commit is contained in:
commit
8d7ba12f28
4 changed files with 46 additions and 1 deletions
|
@ -1031,7 +1031,11 @@ impl LayoutTask {
|
|||
flow_ref::deref_mut(layout_root));
|
||||
let root_size = {
|
||||
let root_flow = flow::base(&**layout_root);
|
||||
root_flow.position.size.to_physical(root_flow.writing_mode)
|
||||
if rw_data.stylist.constrain_viewport().is_some() {
|
||||
root_flow.position.size.to_physical(root_flow.writing_mode)
|
||||
} else {
|
||||
root_flow.overflow.size
|
||||
}
|
||||
};
|
||||
let mut display_list = box DisplayList::new();
|
||||
flow::mut_base(flow_ref::deref_mut(layout_root))
|
||||
|
|
|
@ -482,6 +482,9 @@ pub fn traverse_flow_tree_preorder(
|
|||
})
|
||||
});
|
||||
}, shared_layout_context);
|
||||
|
||||
let layout_context = LayoutContext::new(shared_layout_context);
|
||||
flow_ref::deref_mut(root).late_store_overflow(&layout_context);
|
||||
}
|
||||
|
||||
pub fn build_display_list_for_subtree(
|
||||
|
|
|
@ -92,6 +92,8 @@ pub fn traverse_flow_tree_preorder(root: &mut FlowRef,
|
|||
let assign_block_sizes = AssignBSizesAndStoreOverflow { layout_context: &layout_context };
|
||||
|
||||
doit(root, assign_inline_sizes, assign_block_sizes);
|
||||
|
||||
root.late_store_overflow(&layout_context);
|
||||
}
|
||||
|
||||
pub fn build_display_list_for_subtree(root: &mut FlowRef,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue