mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Ensure unique LayerIds for pseudo-elements
Currently pseudo-elements, like the fragments created for ::before and ::after, with layers will have the same LayerId as the body of their owning fragments. Instead all LayerIds should be unique. Fixes #2010.
This commit is contained in:
parent
1b6d4daf85
commit
1e6f797268
9 changed files with 128 additions and 41 deletions
|
@ -692,7 +692,7 @@ impl StackingContextLayerCreator {
|
|||
fn finish_building_current_layer(&mut self, stacking_context: &mut StackingContext) {
|
||||
if let Some(display_list) = self.display_list_for_next_layer.take() {
|
||||
let next_layer_id =
|
||||
stacking_context.display_list.layered_children.back().unwrap().id.next_layer_id();
|
||||
stacking_context.display_list.layered_children.back().unwrap().id.companion_layer_id();
|
||||
let child_stacking_context =
|
||||
Arc::new(stacking_context.create_layered_child(next_layer_id, display_list));
|
||||
stacking_context.display_list.layered_children.push_back(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue