Bug 1514943 - Update webrender to commit 82286fdca3d27ef31640667de7b81e82be1555e2 (WR PR #3427). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Tue, 18 Dec 2018 01:35:18 +0000
changeset 451045 b2e4e173469ba90d6b7137090447f5077262a364
parent 451044 d65d6d242070557db836baa1fcc3d26529590efa
child 451046 04a614f2fceb64430d2069050f343e50e13e236b
push id74886
push userkgupta@mozilla.com
push dateTue, 18 Dec 2018 01:35:55 +0000
treeherderautoland@b2e4e173469b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1514943
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1514943 - Update webrender to commit 82286fdca3d27ef31640667de7b81e82be1555e2 (WR PR #3427). r=kats https://github.com/servo/webrender/pull/3427 Differential Revision: https://phabricator.services.mozilla.com/D14824
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/src/spatial_node.rs
gfx/wr/wrench/reftests/scrolling/nested-stickys-ref.yaml
gfx/wr/wrench/reftests/scrolling/nested-stickys.yaml
gfx/wr/wrench/reftests/scrolling/reftest.list
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-4de718f9ea3435c099cabafc02e8b51da539bc62
+82286fdca3d27ef31640667de7b81e82be1555e2
--- a/gfx/wr/webrender/src/spatial_node.rs
+++ b/gfx/wr/webrender/src/spatial_node.rs
@@ -476,16 +476,19 @@ impl SpatialNode {
         // between us and the parent reference frame. If we are a reference frame,
         // we need to reset both these values.
         match self.node_type {
             SpatialNodeType::StickyFrame(ref info) => {
                 // We don't translate the combined rect by the sticky offset, because sticky
                 // offsets actually adjust the node position itself, whereas scroll offsets
                 // only apply to contents inside the node.
                 state.parent_accumulated_scroll_offset += info.current_offset;
+                // We want nested sticky items to take into account the shift
+                // we applied as well.
+                state.nearest_scrolling_ancestor_offset += info.current_offset;
             }
             SpatialNodeType::ScrollFrame(ref scrolling) => {
                 state.parent_accumulated_scroll_offset += scrolling.offset;
                 state.nearest_scrolling_ancestor_offset = scrolling.offset;
                 state.nearest_scrolling_ancestor_viewport = scrolling.viewport_rect;
             }
             SpatialNodeType::ReferenceFrame(ref info) => {
                 state.parent_reference_frame_transform = self.world_viewport_transform;
new file mode 100644
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/nested-stickys-ref.yaml
@@ -0,0 +1,11 @@
+root:
+  items:
+    # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+    # viewport by its "bottom" sticky constraint.
+    - type: scroll-frame
+      bounds: [10, 10, 50, 50]
+      content-size: [200, 200]
+      items:
+        - type: rect
+          bounds: [10, 20, 50, 50]
+          color: green
new file mode 100644
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/nested-stickys.yaml
@@ -0,0 +1,20 @@
+root:
+  items:
+    - type: scroll-frame
+      bounds: [10, 10, 50, 50]
+      content-size: [200, 200]
+      scroll-offset: [0, 30]
+      items:
+      - type: sticky-frame
+        bounds: [10, 30, 50, 50]
+        margin-top: 5
+        vertical-offset-bounds: [0, 500]
+        items:
+        - type: sticky-frame
+          bounds: [10, 30, 50, 50]
+          margin-top: 10
+          vertical-offset-bounds: [0, 500]
+          items:
+          - type: rect
+            bounds: [10, 30, 50, 50]
+            color: green
--- a/gfx/wr/wrench/reftests/scrolling/reftest.list
+++ b/gfx/wr/wrench/reftests/scrolling/reftest.list
@@ -10,8 +10,9 @@
 == clip-and-scroll-property.yaml clip-and-scroll-property-ref.yaml
 == translate-nested.yaml translate-nested-ref.yaml
 == sticky.yaml sticky-ref.yaml
 == sticky-nested.yaml sticky-ref.yaml
 == sticky-applied.yaml sticky-applied-ref.yaml
 == sticky-transformed.yaml sticky-transformed-ref.yaml
 == sibling-hidden-clip.yaml sibling-hidden-clip-ref.yaml
 == scale-offsets.yaml scale-offsets-ref.yaml
+== nested-stickys.yaml nested-stickys-ref.yaml