mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update WR to use the new sticky positioning API
This commit is contained in:
parent
17bfe5c120
commit
f37fa0cf6d
6 changed files with 58 additions and 32 deletions
|
@ -34,7 +34,7 @@ use style_traits::cursor::Cursor;
|
|||
use text::TextRun;
|
||||
use text::glyph::ByteIndex;
|
||||
use webrender_api::{self, ClipId, ColorF, GradientStop, LocalClip, MixBlendMode, ScrollPolicy};
|
||||
use webrender_api::{ScrollSensitivity, StickyFrameInfo, TransformStyle};
|
||||
use webrender_api::{ScrollSensitivity, StickyOffsetBounds, TransformStyle};
|
||||
|
||||
pub use style::dom::OpaqueNode;
|
||||
|
||||
|
@ -321,10 +321,17 @@ impl fmt::Debug for StackingContext {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)]
|
||||
pub struct StickyFrameData {
|
||||
pub margins: SideOffsets2D<Option<f32>>,
|
||||
pub vertical_offset_bounds: StickyOffsetBounds,
|
||||
pub horizontal_offset_bounds: StickyOffsetBounds,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)]
|
||||
pub enum ClipScrollNodeType {
|
||||
ScrollFrame(ScrollSensitivity),
|
||||
StickyFrame(StickyFrameInfo),
|
||||
StickyFrame(StickyFrameData),
|
||||
Clip,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue