diff --git a/gfx/layers/FrameMetrics.cpp b/gfx/layers/FrameMetrics.cpp index d3542f60be84..eb84d22db6d5 100644 --- a/gfx/layers/FrameMetrics.cpp +++ b/gfx/layers/FrameMetrics.cpp @@ -323,8 +323,7 @@ std::ostream& operator<<(std::ostream& aStream, std::ostream& operator<<(std::ostream& aStream, const ScrollMetadata& aMetadata) { aStream << "{ [description=" << aMetadata.GetContentDescription() - << "] [metrics=" << aMetadata.GetMetrics() - << "] [color=" << aMetadata.GetBackgroundColor(); + << "] [metrics=" << aMetadata.GetMetrics(); if (aMetadata.GetScrollParentId() != ScrollableLayerGuid::NULL_SCROLL_ID) { aStream << "] [scrollParent=" << aMetadata.GetScrollParentId(); } @@ -337,11 +336,6 @@ std::ostream& operator<<(std::ostream& aStream, return aStream; } -void ScrollMetadata::SetBackgroundColor( - const gfx::sRGBColor& aBackgroundColor) { - mBackgroundColor = gfx::ToDeviceColor(aBackgroundColor); -} - StaticAutoPtr ScrollMetadata::sNullMetadata; } // namespace layers diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index 02e2ae497ecf..fde4176f2a13 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -849,7 +849,6 @@ struct ScrollMetadata { : mMetrics(), mSnapInfo(), mScrollParentId(ScrollableLayerGuid::NULL_SCROLL_ID), - mBackgroundColor(), mContentDescription(), mLineScrollAmount(0, 0), mPageScrollAmount(0, 0), @@ -868,7 +867,6 @@ struct ScrollMetadata { bool operator==(const ScrollMetadata& aOther) const { return mMetrics == aOther.mMetrics && mSnapInfo == aOther.mSnapInfo && mScrollParentId == aOther.mScrollParentId && - mBackgroundColor == aOther.mBackgroundColor && // don't compare mContentDescription mLineScrollAmount == aOther.mLineScrollAmount && mPageScrollAmount == aOther.mPageScrollAmount && @@ -910,10 +908,6 @@ struct ScrollMetadata { ViewID GetScrollParentId() const { return mScrollParentId; } void SetScrollParentId(ViewID aParentId) { mScrollParentId = aParentId; } - const gfx::DeviceColor& GetBackgroundColor() const { - return mBackgroundColor; - } - void SetBackgroundColor(const gfx::sRGBColor& aBackgroundColor); const nsCString& GetContentDescription() const { return mContentDescription; } void SetContentDescription(const nsCString& aContentDescription) { mContentDescription = aContentDescription; @@ -1022,9 +1016,6 @@ struct ScrollMetadata { // off. ViewID mScrollParentId; - // The background color to use when overscrolling. - gfx::DeviceColor mBackgroundColor; - // A description of the content element corresponding to this frame. // This is empty unless this is a scrollable layer and the // apz.printtree pref is turned on. diff --git a/gfx/layers/ipc/LayersMessageUtils.h b/gfx/layers/ipc/LayersMessageUtils.h index 01a780677f37..a5bdd6288cc8 100644 --- a/gfx/layers/ipc/LayersMessageUtils.h +++ b/gfx/layers/ipc/LayersMessageUtils.h @@ -558,7 +558,6 @@ struct ParamTraits WriteParam(aWriter, aParam.mMetrics); WriteParam(aWriter, aParam.mSnapInfo); WriteParam(aWriter, aParam.mScrollParentId); - WriteParam(aWriter, aParam.mBackgroundColor); WriteParam(aWriter, aParam.GetContentDescription()); WriteParam(aWriter, aParam.mLineScrollAmount); WriteParam(aWriter, aParam.mPageScrollAmount); @@ -591,7 +590,6 @@ struct ParamTraits return (ReadParam(aReader, &aResult->mMetrics) && ReadParam(aReader, &aResult->mSnapInfo) && ReadParam(aReader, &aResult->mScrollParentId) && - ReadParam(aReader, &aResult->mBackgroundColor) && ReadContentDescription(aReader, aResult) && ReadParam(aReader, &aResult->mLineScrollAmount) && ReadParam(aReader, &aResult->mPageScrollAmount) && diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index de60239ed047..1b9a2bd97220 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -8982,20 +8982,6 @@ ScrollMetadata nsLayoutUtils::ComputeScrollMetadata( metadata.SetHasScrollgrab(true); } - // Also compute and set the background color. - // This is needed for APZ overscrolling support. - if (aScrollFrame) { - if (isRootScrollFrame) { - metadata.SetBackgroundColor( - sRGBColor::FromABGR(presShell->GetCanvasBackground())); - } else if (const auto* backgroundStyle = - nsCSSRendering::FindBackground(aScrollFrame)) { - nscolor backgroundColor = - backgroundStyle->StyleBackground()->BackgroundColor(backgroundStyle); - metadata.SetBackgroundColor(sRGBColor::FromABGR(backgroundColor)); - } - } - if (ShouldDisableApzForElement(aContent)) { metadata.SetForceDisableApz(true); }