aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2018-06-22 17:56:11 +0200
committerGlenn Watson <github@intuitionlibrary.com>2018-06-25 07:35:26 +1000
commit7d672555be73bf0a057e8596b96d3843b0627eb2 (patch)
tree39cebcbb1bf68fd2d58d71cab9ffa6f12937b423 /components/layout
parent253117ece652a416f3fca48056462b2f57087717 (diff)
downloadservo-7d672555be73bf0a057e8596b96d3843b0627eb2.tar.gz
servo-7d672555be73bf0a057e8596b96d3843b0627eb2.zip
Give stacking contexts the right reference frame id
Stacking contexts that create reference frames should be created with the positioning node set to the reference frames that surround them.
Diffstat (limited to 'components/layout')
-rw-r--r--components/layout/display_list/webrender_helpers.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs
index a6070ecb61d..d056d8c4655 100644
--- a/components/layout/display_list/webrender_helpers.rs
+++ b/components/layout/display_list/webrender_helpers.rs
@@ -235,6 +235,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
info.rect.origin = LayoutPoint::zero();
info.clip_rect.origin = LayoutPoint::zero();
+ builder.push_clip_id(clip_id);
}
builder.push_stacking_context(
@@ -245,6 +246,10 @@ impl WebRenderDisplayItemConverter for DisplayItem {
stacking_context.filters.clone(),
GlyphRasterSpace::Screen,
);
+
+ if stacking_context.established_reference_frame.is_some() {
+ builder.pop_clip_id();
+ }
},
DisplayItem::PopStackingContext(_) => builder.pop_stacking_context(),
DisplayItem::DefineClipScrollNode(ref item) => {