Bug 1498639 - Force the creation of APZ scroll data for the frames with perspective property, not just their children. r=kats
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 28 Nov 2018 15:56:58 +0000
changeset 504991 f5322374274449092b3578d5e844f862d077e109
parent 504990 94b6dac6695dff0236560b2ee92ea0fb749e2e0e
child 504992 7fa4a5ba46716d2eb35c628e18f36c765e349c0c
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1498639
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 1498639 - Force the creation of APZ scroll data for the frames with perspective property, not just their children. r=kats This fixes the assertion, though not the test-case, but now I can debug the test-case and also land it as failing for now. What was happening is that we had two ASRs (for the canvas and for the <body>), and we were creating scroll data for the CompositorHitTestInfo of the <body> (which obviously didn't have any ancestor transform) and for the nsDisplayTransform in the backface for which HasPerspective returns true for, but which already had an ancestor transform for the frame for which ChildrenHavePerspective returns true. It may be less risky to force it for both, but this doesn't make anything fail. Differential Revision: https://phabricator.services.mozilla.com/D13242
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -8902,17 +8902,17 @@ nsDisplayTransform::CreateWebRenderComma
                                                     aDisplayListBuilder);
   wr::WrAnimationProperty prop {
     wr::WrAnimationType::Transform,
     animationsId,
   };
 
   nsTArray<mozilla::wr::WrFilterOp> filters;
   Maybe<nsDisplayTransform*> deferredTransformItem;
-  if (!mFrame->HasPerspective()) {
+  if (!mFrame->ChildrenHavePerspective()) {
     // If it has perspective, we create a new scroll data via the
     // UpdateScrollData call because that scenario is more complex. Otherwise
     // we can just stash the transform on the StackingContextHelper and
     // apply it to any scroll data that are created inside this
     // nsDisplayTransform.
     deferredTransformItem = Some(this);
   }
 
@@ -8942,17 +8942,17 @@ nsDisplayTransform::CreateWebRenderComma
     aBuilder, aResources, sc, aManager, aDisplayListBuilder);
 }
 
 bool
 nsDisplayTransform::UpdateScrollData(
   mozilla::layers::WebRenderScrollData* aData,
   mozilla::layers::WebRenderLayerScrollData* aLayerData)
 {
-  if (!mFrame->HasPerspective()) {
+  if (!mFrame->ChildrenHavePerspective()) {
     // This case is handled in CreateWebRenderCommands by stashing the transform
     // on the stacking context.
     return false;
   }
   if (aLayerData) {
     aLayerData->SetTransform(GetTransform().GetMatrix());
     aLayerData->SetTransformIsPerspective(true);
   }