aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-03-31 00:04:46 -0400
committerGitHub <noreply@github.com>2020-03-31 00:04:46 -0400
commit687156ac90d0cead80e89b63b9394d1a6f7a808e (patch)
tree2cefcf603a511d8e4451ac8ca03862f57ade9859
parent42463c4c4419a27e1779647cebf115bc8b31bd36 (diff)
parent3258bcaa8ba078516d33e553429ba00fbe9876b2 (diff)
downloadservo-687156ac90d0cead80e89b63b9394d1a6f7a808e.tar.gz
servo-687156ac90d0cead80e89b63b9394d1a6f7a808e.zip
Auto merge of #26063 - dralley:fix-assertion, r=cbrewster
Fix failing assertion -- failure to pop reference frame closes #23438 In-depth description here: https://github.com/servo/servo/issues/23438#issuecomment-605553001 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes fix #23438 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___
-rw-r--r--components/layout/display_list/items.rs5
-rw-r--r--components/layout/display_list/webrender_helpers.rs7
-rw-r--r--tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-sibling-with-3D-transform.html.ini3
3 files changed, 9 insertions, 6 deletions
diff --git a/components/layout/display_list/items.rs b/components/layout/display_list/items.rs
index ff276b674e4..62924fa6c2f 100644
--- a/components/layout/display_list/items.rs
+++ b/components/layout/display_list/items.rs
@@ -195,7 +195,7 @@ pub struct StackingContext {
/// The clip and scroll info for this StackingContext.
pub parent_clipping_and_scrolling: ClippingAndScrolling,
- /// The index of the reference frame that this stacking context estalishes.
+ /// The index of the reference frame that this stacking context establishes.
pub established_reference_frame: Option<ClipScrollNodeIndex>,
}
@@ -261,6 +261,7 @@ impl StackingContext {
let pop_item = DisplayItem::PopStackingContext(Box::new(PopStackingContextItem {
base: base_item.clone(),
stacking_context_id: self.id,
+ established_reference_frame: self.established_reference_frame.is_some(),
}));
let push_item = DisplayItem::PushStackingContext(Box::new(PushStackingContextItem {
@@ -657,6 +658,8 @@ pub struct PopStackingContextItem {
pub base: BaseDisplayItem,
pub stacking_context_id: StackingContextId,
+
+ pub established_reference_frame: bool,
}
/// Starts a group of items inside a particular scroll root.
diff --git a/components/layout/display_list/webrender_helpers.rs b/components/layout/display_list/webrender_helpers.rs
index 973ef623d5a..cc0e70a77ec 100644
--- a/components/layout/display_list/webrender_helpers.rs
+++ b/components/layout/display_list/webrender_helpers.rs
@@ -186,7 +186,7 @@ impl DisplayItem {
);
IsContentful(false)
},
- DisplayItem::PushStackingContext(ref mut item) => {
+ DisplayItem::PushStackingContext(ref item) => {
let stacking_context = &item.stacking_context;
debug_assert_eq!(stacking_context.context_type, StackingContextType::Real);
@@ -252,8 +252,11 @@ impl DisplayItem {
builder.push_item(&WrDisplayItem::PushStackingContext(wr_item));
IsContentful(false)
},
- DisplayItem::PopStackingContext(_) => {
+ DisplayItem::PopStackingContext(ref item) => {
builder.pop_stacking_context();
+ if item.established_reference_frame {
+ builder.pop_reference_frame();
+ }
IsContentful(false)
},
DisplayItem::DefineClipScrollNode(ref mut item) => {
diff --git a/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-sibling-with-3D-transform.html.ini b/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-sibling-with-3D-transform.html.ini
deleted file mode 100644
index 47ca5b4ed24..00000000000
--- a/tests/wpt/metadata/css/compositing/mix-blend-mode/mix-blend-mode-sibling-with-3D-transform.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[mix-blend-mode-sibling-with-3D-transform.html]
- type: reftest
- expected: FAIL