зеркало из https://github.com/mozilla/gecko-dev.git
bug 1030741 - Make FrameMetrics::mIsRoot private and add getter/setter methods to manipulate it. r=kats
This commit is contained in:
Родитель
b5b8b210b7
Коммит
64a26a7b66
|
@ -441,7 +441,7 @@ TabChildBase::UpdateFrameHandler(const FrameMetrics& aFrameMetrics)
|
|||
{
|
||||
MOZ_ASSERT(aFrameMetrics.GetScrollId() != FrameMetrics::NULL_SCROLL_ID);
|
||||
|
||||
if (aFrameMetrics.mIsRoot) {
|
||||
if (aFrameMetrics.GetIsRoot()) {
|
||||
nsCOMPtr<nsIDOMWindowUtils> utils(GetDOMWindowUtils());
|
||||
if (APZCCallbackHelper::HasValidPresShellId(utils, aFrameMetrics)) {
|
||||
mLastRootMetrics = ProcessUpdateFrame(aFrameMetrics);
|
||||
|
|
|
@ -337,10 +337,17 @@ public:
|
|||
// Whether or not this frame may have touch caret.
|
||||
bool mMayHaveTouchCaret;
|
||||
|
||||
// Whether or not this is the root scroll frame for the root content document.
|
||||
bool mIsRoot;
|
||||
|
||||
public:
|
||||
void SetIsRoot(bool aIsRoot)
|
||||
{
|
||||
mIsRoot = aIsRoot;
|
||||
}
|
||||
|
||||
bool GetIsRoot() const
|
||||
{
|
||||
return mIsRoot;
|
||||
}
|
||||
|
||||
void SetHasScrollgrab(bool aHasScrollgrab)
|
||||
{
|
||||
mHasScrollgrab = aHasScrollgrab;
|
||||
|
@ -451,6 +458,9 @@ private:
|
|||
// New fields from now on should be made private and old fields should
|
||||
// be refactored to be private.
|
||||
|
||||
// Whether or not this is the root scroll frame for the root content document.
|
||||
bool mIsRoot;
|
||||
|
||||
// Whether or not this frame is for an element marked 'scrollgrab'.
|
||||
bool mHasScrollgrab;
|
||||
|
||||
|
|
|
@ -2864,7 +2864,7 @@ void AsyncPanZoomController::SendAsyncScrollEvent() {
|
|||
{
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
|
||||
isRoot = mFrameMetrics.mIsRoot;
|
||||
isRoot = mFrameMetrics.GetIsRoot();
|
||||
scrollableSize = mFrameMetrics.mScrollableRect.Size();
|
||||
contentRect = mFrameMetrics.CalculateCompositedRectInCssPixels();
|
||||
contentRect.MoveTo(mCurrentAsyncScrollOffset);
|
||||
|
|
|
@ -704,7 +704,7 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
|
|||
}
|
||||
|
||||
metrics.SetScrollId(scrollId);
|
||||
metrics.mIsRoot = aIsRoot;
|
||||
metrics.SetIsRoot(aIsRoot);
|
||||
|
||||
// Only the root scrollable frame for a given presShell should pick up
|
||||
// the presShell's resolution. All the other frames are 1.0.
|
||||
|
|
Загрузка…
Ссылка в новой задаче