mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
layout: Implement basic overflow: scroll
functionality.
Known issues: * Display list optimization can sometimes optimize out elements that should be shown. This affects the Enyo demo. * The `overflow: scroll` container doesn't clip the inner layer properly when borders, border radius, etc. are present. * `overflow-x: scroll` and `overflow-y: scroll` don't work individually; elements are scrolled all at once. * Scrolling only works on absolutely-positioned elements.
This commit is contained in:
parent
fc13dd1169
commit
df4acbac04
8 changed files with 221 additions and 72 deletions
|
@ -252,6 +252,9 @@ pub struct StackingContext {
|
|||
|
||||
/// Whether this stacking context creates a new 3d rendering context.
|
||||
pub establishes_3d_context: bool,
|
||||
|
||||
/// Whether this stacking context scrolls its overflow area.
|
||||
pub scrolls_overflow_area: bool,
|
||||
}
|
||||
|
||||
impl StackingContext {
|
||||
|
@ -266,7 +269,8 @@ impl StackingContext {
|
|||
layer: Option<PaintLayer>,
|
||||
transform: Matrix4,
|
||||
perspective: Matrix4,
|
||||
establishes_3d_context: bool)
|
||||
establishes_3d_context: bool,
|
||||
scrolls_overflow_area: bool)
|
||||
-> StackingContext {
|
||||
StackingContext {
|
||||
display_list: display_list,
|
||||
|
@ -279,6 +283,7 @@ impl StackingContext {
|
|||
transform: transform,
|
||||
perspective: perspective,
|
||||
establishes_3d_context: establishes_3d_context,
|
||||
scrolls_overflow_area: scrolls_overflow_area,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue