Bug 1518584 - Remove {FrameMetrics,RepaintRequest}::mUseDisplayPortMargins. r=kats

It was always true.

Depends on D15971

Differential Revision: https://phabricator.services.mozilla.com/D15972

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2019-01-09 15:33:10 +00:00
Родитель 8cdff58f8d
Коммит 4c98f47607
7 изменённых файлов: 0 добавлений и 40 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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",

Просмотреть файл

@ -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

Просмотреть файл

@ -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<GeckoContentController> controller = GetGeckoContentController();

Просмотреть файл

@ -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);

Просмотреть файл

@ -198,7 +198,6 @@ struct ParamTraits<mozilla::layers::FrameMetrics>
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<mozilla::layers::FrameMetrics>
ReadBoolForBitfield(aMsg, aIter, aResult, &paramType::SetIsRelative) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetDoSmoothScroll) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetUseDisplayPortMargins) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetIsScrollInfoLayer));
}
@ -258,7 +255,6 @@ struct ParamTraits<mozilla::layers::RepaintRequest>
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<mozilla::layers::RepaintRequest>
ReadParam(aMsg, aIter, &aResult->mScrollUpdateType) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetIsRootContent) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetUseDisplayPortMargins) &&
ReadBoolForBitfield(aMsg, aIter, aResult,
&paramType::SetIsScrollInfoLayer));
}

Просмотреть файл

@ -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();