Bug 1382200 - Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. r?botond draft
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 19 Jul 2017 09:24:22 -0400
changeset 611320 a6d67a4481ed5b6b60a8adbd6464d1d53e7e98cb
parent 611299 a1ea69a3a0a760036e047f6ff89897aa7ffd4e53
child 611321 2f8977c27448ec1fc8d0050022ef0288c591db94
push id69179
push userkgupta@mozilla.com
push dateWed, 19 Jul 2017 13:24:44 +0000
reviewersbotond
bugs1382200
milestone56.0a1
Bug 1382200 - Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. r?botond MozReview-Commit-ID: 1vMBMo5zOhK
gfx/layers/Layers.cpp
gfx/layers/Layers.h
gfx/layers/composite/AsyncCompositionManager.cpp
gfx/layers/composite/ContainerLayerComposite.cpp
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -662,17 +662,17 @@ Layer::HasScrollableFrameMetrics() const
     if (GetFrameMetrics(i).IsScrollable()) {
       return true;
     }
   }
   return false;
 }
 
 bool
-Layer::IsScrollInfoLayer() const
+Layer::IsScrollableWithoutContent() const
 {
   // A scrollable container layer with no children
   return AsContainerLayer()
       && HasScrollableFrameMetrics()
       && !GetFirstChild();
 }
 
 Matrix4x4
--- a/gfx/layers/Layers.h
+++ b/gfx/layers/Layers.h
@@ -1357,17 +1357,17 @@ public:
   Maybe<ParentLayerIntRect> GetScrolledClipRect() const;
   uint32_t GetContentFlags() { return mSimpleAttrs.ContentFlags(); }
   const LayerIntRegion& GetVisibleRegion() const { return mVisibleRegion; }
   const ScrollMetadata& GetScrollMetadata(uint32_t aIndex) const;
   const FrameMetrics& GetFrameMetrics(uint32_t aIndex) const;
   uint32_t GetScrollMetadataCount() const { return mScrollMetadata.Length(); }
   const nsTArray<ScrollMetadata>& GetAllScrollMetadata() { return mScrollMetadata; }
   bool HasScrollableFrameMetrics() const;
-  bool IsScrollInfoLayer() const;
+  bool IsScrollableWithoutContent() const;
   const EventRegions& GetEventRegions() const { return mEventRegions; }
   ContainerLayer* GetParent() { return mParent; }
   Layer* GetNextSibling() {
     if (mNextSibling) {
       mNextSibling->CheckCanary();
     }
     return mNextSibling;
   }
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -919,17 +919,17 @@ AsyncCompositionManager::ApplyAsyncConte
           AsyncTransform asyncTransformWithoutOverscroll =
               controller->GetCurrentAsyncTransform(AsyncPanZoomController::eForCompositing);
           AsyncTransformComponentMatrix overscrollTransform =
               controller->GetOverscrollTransform(AsyncPanZoomController::eForCompositing);
           AsyncTransformComponentMatrix asyncTransform =
               AsyncTransformComponentMatrix(asyncTransformWithoutOverscroll)
             * overscrollTransform;
 
-          if (!layer->IsScrollInfoLayer()) {
+          if (!layer->IsScrollableWithoutContent()) {
             controller->MarkAsyncTransformAppliedToContent();
           }
 
           const ScrollMetadata& scrollMetadata = layer->GetScrollMetadata(i);
           const FrameMetrics& metrics = scrollMetadata.GetMetrics();
 
 #if defined(MOZ_WIDGET_ANDROID)
           // If we find a metrics which is the root content doc, use that. If not, use
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -621,17 +621,17 @@ ContainerRender(ContainerT* aContainer,
                  RenderTargetIntRect::FromUnknownRect(aClipRect),
                  aGeometry);
   }
 
   // If it is a scrollable container layer with no child layers, and one of the APZCs
   // attached to it has a nonempty async transform, then that transform is not applied
   // to any visible content. Display a warning box (conditioned on the FPS display being
   // enabled).
-  if (gfxPrefs::LayersDrawFPS() && aContainer->IsScrollInfoLayer()) {
+  if (gfxPrefs::LayersDrawFPS() && aContainer->IsScrollableWithoutContent()) {
     // Since aContainer doesn't have any children we can just iterate from the top metrics
     // on it down to the bottom using GetFirstChild and not worry about walking onto another
     // underlying layer.
     for (LayerMetricsWrapper i(aContainer); i; i = i.GetFirstChild()) {
       if (AsyncPanZoomController* apzc = i.GetApzc()) {
         if (!apzc->GetAsyncTransformAppliedToContent()
             && !AsyncTransformComponentMatrix(apzc->GetCurrentAsyncTransform(AsyncPanZoomController::eForHitTesting)).IsIdentity()) {
           aManager->UnusedApzTransformWarning();