mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1001582 -- Transitioned FrameMetrics::mPresShellId to use a getter/setter. r=botond
This commit is contained in:
parent
3173846c11
commit
268ea2b3dc
@ -76,7 +76,6 @@ public:
|
||||
, mCumulativeResolution(1)
|
||||
, mTransformScale(1)
|
||||
, mDevPixelsPerCSSPixel(1)
|
||||
, mPresShellId(-1)
|
||||
, mMayHaveTouchListeners(false)
|
||||
, mIsRoot(false)
|
||||
, mHasScrollgrab(false)
|
||||
@ -88,6 +87,7 @@ public:
|
||||
, mRootCompositionSize(0, 0)
|
||||
, mDisplayPortMargins(0, 0, 0, 0)
|
||||
, mUseDisplayPortMargins(false)
|
||||
, mPresShellId(-1)
|
||||
{}
|
||||
|
||||
// Default copy ctor and operator= are fine
|
||||
@ -334,8 +334,6 @@ public:
|
||||
// resolution.
|
||||
CSSToLayoutDeviceScale mDevPixelsPerCSSPixel;
|
||||
|
||||
uint32_t mPresShellId;
|
||||
|
||||
// Whether or not this frame may have touch listeners.
|
||||
bool mMayHaveTouchListeners;
|
||||
|
||||
@ -432,6 +430,16 @@ public:
|
||||
return mUseDisplayPortMargins;
|
||||
}
|
||||
|
||||
uint32_t GetPresShellId() const
|
||||
{
|
||||
return mPresShellId;
|
||||
}
|
||||
|
||||
void SetPresShellId(uint32_t aPresShellId)
|
||||
{
|
||||
mPresShellId = aPresShellId;
|
||||
}
|
||||
|
||||
private:
|
||||
// New fields from now on should be made private and old fields should
|
||||
// be refactored to be private.
|
||||
@ -482,6 +490,8 @@ private:
|
||||
// If this is true then we use the display port margins on this metrics,
|
||||
// otherwise use the display port rect.
|
||||
bool mUseDisplayPortMargins;
|
||||
|
||||
uint32_t mPresShellId;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -516,7 +526,7 @@ struct ScrollableLayerGuid {
|
||||
|
||||
ScrollableLayerGuid(uint64_t aLayersId, const FrameMetrics& aMetrics)
|
||||
: mLayersId(aLayersId)
|
||||
, mPresShellId(aMetrics.mPresShellId)
|
||||
, mPresShellId(aMetrics.GetPresShellId())
|
||||
, mScrollId(aMetrics.GetScrollId())
|
||||
{
|
||||
MOZ_COUNT_CTOR(ScrollableLayerGuid);
|
||||
|
@ -69,7 +69,7 @@
|
||||
" i=(%ld %lld) cb=(%d %d %d %d) rcs=(%.3f %.3f) dp=(%.3f %.3f %.3f %.3f) dpm=(%.3f %.3f %.3f %.3f) um=%d " \
|
||||
"v=(%.3f %.3f %.3f %.3f) s=(%.3f %.3f) sr=(%.3f %.3f %.3f %.3f) z(ld=%.3f r=%.3f cr=%.3f z=%.3f ts=%.3f) u=(%d %lu)\n", \
|
||||
__VA_ARGS__, \
|
||||
fm.mPresShellId, fm.GetScrollId(), \
|
||||
fm.GetPresShellId(), fm.GetScrollId(), \
|
||||
fm.mCompositionBounds.x, fm.mCompositionBounds.y, fm.mCompositionBounds.width, fm.mCompositionBounds.height, \
|
||||
fm.GetRootCompositionSize().width, fm.GetRootCompositionSize().height, \
|
||||
fm.mDisplayPort.x, fm.mDisplayPort.y, fm.mDisplayPort.width, fm.mDisplayPort.height, \
|
||||
@ -1604,7 +1604,7 @@ void AsyncPanZoomController::RequestContentRepaint(FrameMetrics& aFrameMetrics)
|
||||
aFrameMetrics),
|
||||
GetFrameTime());
|
||||
|
||||
aFrameMetrics.mPresShellId = mLastContentPaintMetrics.mPresShellId;
|
||||
aFrameMetrics.SetPresShellId(mLastContentPaintMetrics.GetPresShellId());
|
||||
mLastPaintRequestMetrics = aFrameMetrics;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ APZCCallbackHelper::HasValidPresShellId(nsIDOMWindowUtils* aUtils,
|
||||
uint32_t presShellId;
|
||||
nsresult rv = aUtils->GetPresShellId(&presShellId);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
return NS_SUCCEEDED(rv) && aMetrics.mPresShellId == presShellId;
|
||||
return NS_SUCCEEDED(rv) && aMetrics.GetPresShellId() == presShellId;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -804,7 +804,7 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
|
||||
}
|
||||
}
|
||||
|
||||
metrics.mPresShellId = presShell->GetPresShellId();
|
||||
metrics.SetPresShellId(presShell->GetPresShellId());
|
||||
|
||||
// If the scroll frame's content is marked 'scrollgrab', record this
|
||||
// in the FrameMetrics so APZ knows to provide the scroll grabbing
|
||||
|
Loading…
Reference in New Issue
Block a user