зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1667089 - Remove some dead code for collapsed resizers on the root scroll frame. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D103272
This commit is contained in:
Родитель
79d2008ba0
Коммит
33f844c209
|
@ -1251,7 +1251,6 @@ void nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mHelper.mIsRoot) {
|
if (mHelper.mIsRoot) {
|
||||||
mHelper.mCollapsedResizer = true;
|
|
||||||
reflowScrollCorner = false;
|
reflowScrollCorner = false;
|
||||||
|
|
||||||
// Hide the scrollbar when the scrollbar-width is set to none.
|
// Hide the scrollbar when the scrollbar-width is set to none.
|
||||||
|
@ -2208,7 +2207,6 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter, bool aIsRoot)
|
||||||
mMayHaveDirtyFixedChildren(false),
|
mMayHaveDirtyFixedChildren(false),
|
||||||
mUpdateScrollbarAttributes(false),
|
mUpdateScrollbarAttributes(false),
|
||||||
mHasBeenScrolledRecently(false),
|
mHasBeenScrolledRecently(false),
|
||||||
mCollapsedResizer(false),
|
|
||||||
mWillBuildScrollableLayer(false),
|
mWillBuildScrollableLayer(false),
|
||||||
mIsScrollParent(false),
|
mIsScrollParent(false),
|
||||||
mAddClipRectToLayer(false),
|
mAddClipRectToLayer(false),
|
||||||
|
@ -5341,6 +5339,8 @@ nsresult ScrollFrameHelper::CreateAnonymousContent(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isResizable) {
|
if (isResizable) {
|
||||||
|
MOZ_ASSERT(!mIsRoot, "Root scroll frame shouldn't be resizable");
|
||||||
|
|
||||||
AnonymousContentKey key = AnonymousContentKey::Type_Resizer;
|
AnonymousContentKey key = AnonymousContentKey::Type_Resizer;
|
||||||
|
|
||||||
RefPtr<NodeInfo> nodeInfo;
|
RefPtr<NodeInfo> nodeInfo;
|
||||||
|
@ -5383,20 +5383,10 @@ nsresult ScrollFrameHelper::CreateAnonymousContent(
|
||||||
NS_WARNING("only resizable types should have resizers");
|
NS_WARNING("only resizable types should have resizers");
|
||||||
}
|
}
|
||||||
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::dir, dir, false);
|
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::dir, dir, false);
|
||||||
|
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::element,
|
||||||
if (mIsRoot) {
|
u"_parent"_ns, false);
|
||||||
mResizerContent->SetProperty(nsGkAtoms::docLevelNativeAnonymousContent,
|
|
||||||
reinterpret_cast<void*>(true));
|
|
||||||
|
|
||||||
mCollapsedResizer = true;
|
|
||||||
} else {
|
|
||||||
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::element,
|
|
||||||
u"_parent"_ns, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::clickthrough,
|
mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::clickthrough,
|
||||||
u"always"_ns, false);
|
u"always"_ns, false);
|
||||||
|
|
||||||
aElements.AppendElement(ContentInfo(mResizerContent, key));
|
aElements.AppendElement(ContentInfo(mResizerContent, key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ class ScrollFrameHelper : public nsIReflowCallback {
|
||||||
nsIFrame* aFrame, nsPresContext* aPresContext, nsRect& aRect,
|
nsIFrame* aFrame, nsPresContext* aPresContext, nsRect& aRect,
|
||||||
bool aHasResizer, mozilla::layers::ScrollDirection aDirection);
|
bool aHasResizer, mozilla::layers::ScrollDirection aDirection);
|
||||||
// returns true if a resizer should be visible
|
// returns true if a resizer should be visible
|
||||||
bool HasResizer() { return mResizerBox && !mCollapsedResizer; }
|
bool HasResizer() { return mResizerBox; }
|
||||||
void LayoutScrollbars(nsBoxLayoutState& aState, const nsRect& aContentArea,
|
void LayoutScrollbars(nsBoxLayoutState& aState, const nsRect& aContentArea,
|
||||||
const nsRect& aOldScrollArea);
|
const nsRect& aOldScrollArea);
|
||||||
|
|
||||||
|
@ -665,8 +665,6 @@ class ScrollFrameHelper : public nsIReflowCallback {
|
||||||
// If true, we should be prepared to scroll using this scrollframe
|
// If true, we should be prepared to scroll using this scrollframe
|
||||||
// by placing descendant content into its own layer(s)
|
// by placing descendant content into its own layer(s)
|
||||||
bool mHasBeenScrolledRecently : 1;
|
bool mHasBeenScrolledRecently : 1;
|
||||||
// If true, the resizer is collapsed and not displayed
|
|
||||||
bool mCollapsedResizer : 1;
|
|
||||||
|
|
||||||
// If true, the scroll frame should always be active because we always build
|
// If true, the scroll frame should always be active because we always build
|
||||||
// a scrollable layer. Used for asynchronous scrolling.
|
// a scrollable layer. Used for asynchronous scrolling.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче