mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #7487 - mrobinson:paint-layer-upgrade, r=pcwalton
Have PaintLayers own StackingContexts instead of the opposite Previously, StackingContexts might have a PaintLayer. We switch the ownership, for several reasons: * We want PaintLayers to potentially contain something other than a StackingContext soon. * We want to delay the creation of PaintLayers until the last minute, so that we can synthesize new layers for sandwiched content. This commit also implements the second goal. Instead of creating PaintLayers during layout itself, wait until we are sorting and layerizing a completed DisplayList. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7487) <!-- Reviewable:end -->
This commit is contained in:
commit
8e0b010117
6 changed files with 198 additions and 161 deletions
|
@ -35,7 +35,7 @@ impl FrameTreeId {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Hash, Deserialize, Serialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Hash, Deserialize, Serialize, HeapSizeOf)]
|
||||
pub struct LayerId(pub usize, pub u32);
|
||||
|
||||
impl Debug for LayerId {
|
||||
|
@ -59,7 +59,7 @@ pub enum LayerKind {
|
|||
}
|
||||
|
||||
/// The scrolling policy of a layer.
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Deserialize, Serialize, Debug)]
|
||||
#[derive(Clone, PartialEq, Eq, Copy, Deserialize, Serialize, Debug, HeapSizeOf)]
|
||||
pub enum ScrollPolicy {
|
||||
/// These layers scroll when the parent receives a scrolling message.
|
||||
Scrollable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue