aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/fragment.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2018-06-22 18:13:30 +0200
committerGlenn Watson <github@intuitionlibrary.com>2018-06-25 07:35:10 +1000
commitd41c512e980ea17dc2423f08eb5ccea608e8ca58 (patch)
tree72b14f0205350d6890774ee842524fe3fa870652 /components/layout/fragment.rs
parent2d4b223cf48d1b62df4e738db86b707409e3e50e (diff)
downloadservo-d41c512e980ea17dc2423f08eb5ccea608e8ca58.tar.gz
servo-d41c512e980ea17dc2423f08eb5ccea608e8ca58.zip
Allow inline elements to create reference frames
This is important so that transforms applied to elements actually apply to the display items created for those elements.
Diffstat (limited to 'components/layout/fragment.rs')
-rw-r--r--components/layout/fragment.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 38ea9d03b93..c3b3ce5fb3e 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -11,7 +11,7 @@ use app_units::Au;
use canvas_traits::canvas::{CanvasMsg, CanvasId};
use context::{LayoutContext, with_thread_local_font_context};
use display_list::ToLayout;
-use display_list::items::{BLUR_INFLATION_FACTOR, OpaqueNode};
+use display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
use euclid::{Point2D, Vector2D, Rect, Size2D};
use floats::ClearType;
use flow::{GetBaseFlow, ImmutableFlowUtils};
@@ -152,6 +152,11 @@ pub struct Fragment {
/// to 0, but it assigned during the collect_stacking_contexts phase of display
/// list construction.
pub stacking_context_id: StackingContextId,
+
+ /// The indices of this Fragment's ClipScrollNode. If this fragment doesn't have a
+ /// `established_reference_frame` assigned, it will use the `clipping_and_scrolling` of the
+ /// parent block.
+ pub established_reference_frame: Option<ClipScrollNodeIndex>,
}
impl Serialize for Fragment {
@@ -633,6 +638,7 @@ impl Fragment {
flags: FragmentFlags::empty(),
debug_id: DebugId::new(),
stacking_context_id: StackingContextId::root(),
+ established_reference_frame: None,
}
}
@@ -662,6 +668,7 @@ impl Fragment {
flags: FragmentFlags::empty(),
debug_id: DebugId::new(),
stacking_context_id: StackingContextId::root(),
+ established_reference_frame: None,
}
}
@@ -687,6 +694,7 @@ impl Fragment {
flags: FragmentFlags::empty(),
debug_id: DebugId::new(),
stacking_context_id: StackingContextId::root(),
+ established_reference_frame: None,
}
}
@@ -715,6 +723,7 @@ impl Fragment {
flags: FragmentFlags::empty(),
debug_id: self.debug_id.clone(),
stacking_context_id: StackingContextId::root(),
+ established_reference_frame: None,
}
}