diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index 9daf8336d05f..372bb421815d 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -107,7 +107,6 @@ struct FrameMetrics { mIsRootContent(false), mIsRelative(false), mDoSmoothScroll(false), - mUseDisplayPortMargins(false), mIsScrollInfoLayer(false) {} // Default copy ctor and operator= are fine @@ -137,7 +136,6 @@ struct FrameMetrics { mIsRootContent == aOther.mIsRootContent && mIsRelative == aOther.mIsRelative && mDoSmoothScroll == aOther.mDoSmoothScroll && - mUseDisplayPortMargins == aOther.mUseDisplayPortMargins && mIsScrollInfoLayer == aOther.mIsScrollInfoLayer; } @@ -435,12 +433,6 @@ struct FrameMetrics { return mDisplayPortMargins; } - void SetUseDisplayPortMargins(bool aValue) { - mUseDisplayPortMargins = aValue; - } - - bool GetUseDisplayPortMargins() const { return mUseDisplayPortMargins; } - uint32_t GetPresShellId() const { return mPresShellId; } void SetPresShellId(uint32_t aPresShellId) { mPresShellId = aPresShellId; } @@ -657,10 +649,6 @@ struct FrameMetrics { // smoothly transition to mScrollOffset rather than be updated instantly. bool mDoSmoothScroll : 1; - // If this is true then we use the display port margins on this metrics, - // otherwise use the display port rect. - bool mUseDisplayPortMargins : 1; - // True if this scroll frame is a scroll info layer. A scroll info layer is // not layerized and its content cannot be truly async-scrolled, but its // metrics are still sent to and updated by the compositor, with the updates diff --git a/gfx/layers/LayersLogging.cpp b/gfx/layers/LayersLogging.cpp index 5fd41a5beb2f..32bddfc66dca 100644 --- a/gfx/layers/LayersLogging.cpp +++ b/gfx/layers/LayersLogging.cpp @@ -228,7 +228,6 @@ void AppendToString(std::stringstream& aStream, const FrameMetrics& m, AppendToString(aStream, m.GetZoom(), "] [z=", "] }"); } else { AppendToString(aStream, m.GetDisplayPortMargins(), " [dpm="); - aStream << nsPrintfCString("] um=%d", m.GetUseDisplayPortMargins()).get(); AppendToString(aStream, m.GetRootCompositionSize(), "] [rcs="); AppendToString(aStream, m.GetViewport(), "] [v="); aStream << nsPrintfCString("] [z=(ld=%.3f r=%.3f", diff --git a/gfx/layers/RepaintRequest.h b/gfx/layers/RepaintRequest.h index d1c9624d20e7..c93410566a54 100644 --- a/gfx/layers/RepaintRequest.h +++ b/gfx/layers/RepaintRequest.h @@ -53,7 +53,6 @@ struct RepaintRequest { mPaintRequestTime(), mScrollUpdateType(eNone), mIsRootContent(false), - mUseDisplayPortMargins(false), mIsScrollInfoLayer(false) {} RepaintRequest(const FrameMetrics& aOther, @@ -73,7 +72,6 @@ struct RepaintRequest { mPaintRequestTime(aOther.GetPaintRequestTime()), mScrollUpdateType(aScrollUpdateType), mIsRootContent(aOther.IsRootContent()), - mUseDisplayPortMargins(aOther.GetUseDisplayPortMargins()), mIsScrollInfoLayer(aOther.IsScrollInfoLayer()) {} // Default copy ctor and operator= are fine @@ -95,7 +93,6 @@ struct RepaintRequest { mPaintRequestTime == aOther.mPaintRequestTime && mScrollUpdateType == aOther.mScrollUpdateType && mIsRootContent == aOther.mIsRootContent && - mUseDisplayPortMargins == aOther.mUseDisplayPortMargins && mIsScrollInfoLayer == aOther.mIsScrollInfoLayer; } @@ -166,8 +163,6 @@ struct RepaintRequest { return mDisplayPortMargins; } - bool GetUseDisplayPortMargins() const { return mUseDisplayPortMargins; } - uint32_t GetPresShellId() const { return mPresShellId; } const CSSRect& GetViewport() const { return mViewport; } @@ -185,10 +180,6 @@ struct RepaintRequest { mIsRootContent = aIsRootContent; } - void SetUseDisplayPortMargins(bool aValue) { - mUseDisplayPortMargins = aValue; - } - void SetIsScrollInfoLayer(bool aIsScrollInfoLayer) { mIsScrollInfoLayer = aIsScrollInfoLayer; } @@ -283,10 +274,6 @@ struct RepaintRequest { // Whether or not this is the root scroll frame for the root content document. bool mIsRootContent : 1; - // If this is true then we use the display port margins on this metrics, - // otherwise use the display port rect. - bool mUseDisplayPortMargins : 1; - // True if this scroll frame is a scroll info layer. A scroll info layer is // not layerized and its content cannot be truly async-scrolled, but its // metrics are still sent to and updated by the compositor, with the updates diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 6c82932e75cd..f5c6a59e08f5 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -3700,7 +3700,6 @@ void AsyncPanZoomController::RequestContentRepaint( ParentLayerPoint velocity = GetVelocityVector(); Metrics().SetDisplayPortMargins( CalculatePendingDisplayPort(Metrics(), velocity)); - Metrics().SetUseDisplayPortMargins(true); Metrics().SetPaintRequestTime(TimeStamp::Now()); RequestContentRepaint(Metrics(), velocity, aUpdateType); } @@ -4703,7 +4702,6 @@ void AsyncPanZoomController::ZoomToRect(CSSRect aRect, const uint32_t aFlags) { ParentLayerPoint velocity(0, 0); endZoomToMetrics.SetDisplayPortMargins( CalculatePendingDisplayPort(endZoomToMetrics, velocity)); - endZoomToMetrics.SetUseDisplayPortMargins(true); endZoomToMetrics.SetPaintRequestTime(TimeStamp::Now()); RefPtr controller = GetGeckoContentController(); diff --git a/gfx/layers/apz/util/APZCCallbackHelper.cpp b/gfx/layers/apz/util/APZCCallbackHelper.cpp index 21103d717c3b..fafdf1537377 100644 --- a/gfx/layers/apz/util/APZCCallbackHelper.cpp +++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp @@ -288,8 +288,6 @@ void APZCCallbackHelper::UpdateRootFrame(const RepaintRequest& aRequest) { return; } - MOZ_ASSERT(aRequest.GetUseDisplayPortMargins()); - if (gfxPrefs::APZAllowZooming() && aRequest.GetScrollOffsetUpdated()) { // If zooming is disabled then we don't really want to let APZ fiddle // with these things. In theory setting the resolution here should be a @@ -340,8 +338,6 @@ void APZCCallbackHelper::UpdateSubFrame(const RepaintRequest& aRequest) { return; } - MOZ_ASSERT(aRequest.GetUseDisplayPortMargins()); - // We don't currently support zooming for subframes, so nothing extra // needs to be done beyond the tasks common to this and UpdateRootFrame. ScreenMargin displayPortMargins = ScrollFrame(content, aRequest); diff --git a/gfx/layers/ipc/LayersMessageUtils.h b/gfx/layers/ipc/LayersMessageUtils.h index b22bdd699124..e71df4dec209 100644 --- a/gfx/layers/ipc/LayersMessageUtils.h +++ b/gfx/layers/ipc/LayersMessageUtils.h @@ -198,7 +198,6 @@ struct ParamTraits WriteParam(aMsg, aParam.mIsRootContent); WriteParam(aMsg, aParam.mIsRelative); WriteParam(aMsg, aParam.mDoSmoothScroll); - WriteParam(aMsg, aParam.mUseDisplayPortMargins); WriteParam(aMsg, aParam.mIsScrollInfoLayer); } @@ -230,8 +229,6 @@ struct ParamTraits ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsRelative) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetDoSmoothScroll) && - ReadBoolForBitfield(aMsg, aIter, aResult, - ¶mType::SetUseDisplayPortMargins) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsScrollInfoLayer)); } @@ -258,7 +255,6 @@ struct ParamTraits WriteParam(aMsg, aParam.mPaintRequestTime); WriteParam(aMsg, aParam.mScrollUpdateType); WriteParam(aMsg, aParam.mIsRootContent); - WriteParam(aMsg, aParam.mUseDisplayPortMargins); WriteParam(aMsg, aParam.mIsScrollInfoLayer); } @@ -280,8 +276,6 @@ struct ParamTraits ReadParam(aMsg, aIter, &aResult->mScrollUpdateType) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsRootContent) && - ReadBoolForBitfield(aMsg, aIter, aResult, - ¶mType::SetUseDisplayPortMargins) && ReadBoolForBitfield(aMsg, aIter, aResult, ¶mType::SetIsScrollInfoLayer)); } diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index fa46f011323e..208985ebf142 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -9226,8 +9226,6 @@ static void UpdateDisplayPortMarginsForPendingMetrics( return; } - MOZ_ASSERT(aMetrics.GetUseDisplayPortMargins()); - if (gfxPrefs::APZAllowZooming() && aMetrics.IsRootContent()) { // See APZCCallbackHelper::UpdateRootFrame for details. float presShellResolution = shell->GetResolution();