Bug 1511243 - Update webrender to commit a2b4202242d937d328eda21c2d9fcfece609283e (WR PR #3373). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Fri, 30 Nov 2018 01:56:07 +0000
changeset 508114 acd2bfce6779ada0430d1dadfc225b1f872b8db4
parent 508113 68db1bda769f81d14f2f8dbf3112dab8df9772a5
child 508115 5d864c9b503bbed76b2a72a1b522d537c1199812
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1511243
milestone65.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 1511243 - Update webrender to commit a2b4202242d937d328eda21c2d9fcfece609283e (WR PR #3373). r=kats https://github.com/servo/webrender/pull/3373 Differential Revision: https://phabricator.services.mozilla.com/D13493
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/src/spatial_node.rs
gfx/wr/webrender_api/src/display_item.rs
--- a/gfx/webrender_bindings/revision.txt
+++ b/gfx/webrender_bindings/revision.txt
@@ -1,1 +1,1 @@
-835ba47f392c47a35c9baa2d44ec6cb1903b6f2b
+a2b4202242d937d328eda21c2d9fcfece609283e
--- a/gfx/wr/webrender/src/spatial_node.rs
+++ b/gfx/wr/webrender/src/spatial_node.rs
@@ -151,30 +151,30 @@ impl SpatialNode {
             _ if old_scroll_info.offset != LayoutVector2D::zero() => {
                 warn!("Tried to scroll a non-scroll node.")
             }
             _ => {}
         }
     }
 
     pub fn set_scroll_origin(&mut self, origin: &LayoutPoint, clamp: ScrollClamping) -> bool {
-        let scrollable_size = self.scrollable_size();
-        let scrollable_width = scrollable_size.width;
-        let scrollable_height = scrollable_size.height;
-
         let scrolling = match self.node_type {
             SpatialNodeType::ScrollFrame(ref mut scrolling) => scrolling,
             _ => {
                 warn!("Tried to scroll a non-scroll node.");
                 return false;
             }
         };
 
         let new_offset = match clamp {
             ScrollClamping::ToContentBounds => {
+                let scrollable_size = scrolling.scrollable_size;
+                let scrollable_width = scrollable_size.width;
+                let scrollable_height = scrollable_size.height;
+
                 if scrollable_height <= 0. && scrollable_width <= 0. {
                     return false;
                 }
 
                 let origin = LayoutPoint::new(origin.x.max(0.0), origin.y.max(0.0));
                 LayoutVector2D::new(
                     (-origin.x).max(-scrollable_width).min(0.0).round(),
                     (-origin.y).max(-scrollable_height).min(0.0).round(),
@@ -469,44 +469,35 @@ impl SpatialNode {
         // reference frame and the offset is the accumulated offset of all the nodes
         // 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 + state.parent_accumulated_scroll_offset;
+                state.parent_accumulated_scroll_offset += info.current_offset;
             }
             SpatialNodeType::ScrollFrame(ref scrolling) => {
-                state.parent_accumulated_scroll_offset =
-                    scrolling.offset + state.parent_accumulated_scroll_offset;
+                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;
                 state.parent_accumulated_scroll_offset = LayoutVector2D::zero();
                 state.coordinate_system_relative_scale_offset = self.coordinate_system_relative_scale_offset;
                 let translation = -info.origin_in_parent_reference_frame;
                 state.nearest_scrolling_ancestor_viewport =
                     state.nearest_scrolling_ancestor_viewport
                        .translate(&translation);
             }
         }
     }
 
-    pub fn scrollable_size(&self) -> LayoutSize {
-        match self.node_type {
-           SpatialNodeType::ScrollFrame(state) => state.scrollable_size,
-            _ => LayoutSize::zero(),
-        }
-    }
-
     pub fn scroll(&mut self, scroll_location: ScrollLocation) -> bool {
         let scrolling = match self.node_type {
             SpatialNodeType::ScrollFrame(ref mut scrolling) => scrolling,
             _ => return false,
         };
 
         let delta = match scroll_location {
             ScrollLocation::Delta(delta) => delta,
--- a/gfx/wr/webrender_api/src/display_item.rs
+++ b/gfx/wr/webrender_api/src/display_item.rs
@@ -296,17 +296,17 @@ impl NormalBorder {
     }
 
     /// Normalizes a border so that we don't render disallowed stuff, like inset
     /// borders that are less than two pixels wide.
     #[inline]
     pub fn normalize(&mut self, widths: &LayoutSideOffsets) {
         debug_assert!(
             self.do_aa || self.can_disable_antialiasing(),
-            "Unexpected disabled-antialising in a border, likely won't work or will be ignored"
+            "Unexpected disabled-antialiasing in a border, likely won't work or will be ignored"
         );
 
         #[inline]
         fn renders_small_border_solid(style: BorderStyle) -> bool {
             match style {
                 BorderStyle::Groove |
                 BorderStyle::Ridge => true,
                 _ => false,