Bug 1382200 - Rename Layer::IsScrollInfoLayer to better capture what the call sites care about. r?botond
MozReview-Commit-ID: 1vMBMo5zOhK
--- 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();