mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
layout: Clip the immediate fragments of block flows that establish
stacking contexts properly. The code that existed before correctly translated the clips of child elements, but not those of immediate display items belonging to the flow itself. Makes Leaflet.js maps usable.
This commit is contained in:
parent
045831748e
commit
14a544b64c
4 changed files with 90 additions and 1 deletions
|
@ -1253,6 +1253,11 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
layout_context: &LayoutContext,
|
||||
background_border_level: BackgroundAndBorderLevel) {
|
||||
// Add the box that starts the block context.
|
||||
let clip = if self.fragment.establishes_stacking_context() {
|
||||
self.base.clip.translate(&-self.base.stacking_relative_position)
|
||||
} else {
|
||||
self.base.clip.clone()
|
||||
};
|
||||
self.fragment.build_display_list(display_list,
|
||||
layout_context,
|
||||
&self.base.stacking_relative_position,
|
||||
|
@ -1263,7 +1268,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
|||
.absolute_position_info
|
||||
.relative_containing_block_mode,
|
||||
background_border_level,
|
||||
&self.base.clip);
|
||||
&clip);
|
||||
|
||||
// Add children.
|
||||
for kid in self.base.children.iter_mut() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue