зеркало из https://github.com/mozilla/pjs.git
Land bug 72747 in pieces: Remove mNeverHas*Scrollbar variables which are unneeded since the m*ScrollbarBox null-checks handle their one remaining user. b=72747 r+sr=roc
This commit is contained in:
Родитель
462cb0cabd
Коммит
2260749166
|
@ -1136,8 +1136,6 @@ nsGfxScrollFrameInner::nsGfxScrollFrameInner(nsBoxFrame* aOuter)
|
||||||
mOuter(aOuter),
|
mOuter(aOuter),
|
||||||
mMaxElementWidth(0),
|
mMaxElementWidth(0),
|
||||||
mLastDir(-1),
|
mLastDir(-1),
|
||||||
mNeverHasVerticalScrollbar(PR_FALSE),
|
|
||||||
mNeverHasHorizontalScrollbar(PR_FALSE),
|
|
||||||
mHasVerticalScrollbar(PR_FALSE),
|
mHasVerticalScrollbar(PR_FALSE),
|
||||||
mHasHorizontalScrollbar(PR_FALSE),
|
mHasHorizontalScrollbar(PR_FALSE),
|
||||||
mFirstPass(PR_FALSE),
|
mFirstPass(PR_FALSE),
|
||||||
|
@ -1264,7 +1262,6 @@ nsGfxScrollFrameInner::CreateAnonymousContent(nsISupportsArray& aAnonymousChildr
|
||||||
// allow scrollbars if this is the child of the viewport, because
|
// allow scrollbars if this is the child of the viewport, because
|
||||||
// we must be the scrollbars for the print preview window
|
// we must be the scrollbars for the print preview window
|
||||||
if (!parent || parent->GetType() != nsLayoutAtoms::viewportFrame) {
|
if (!parent || parent->GetType() != nsLayoutAtoms::viewportFrame) {
|
||||||
mNeverHasVerticalScrollbar = mNeverHasHorizontalScrollbar = PR_TRUE;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1556,7 +1553,7 @@ PRBool
|
||||||
nsGfxScrollFrameInner::AddRemoveScrollbar(nsBoxLayoutState& aState, nsRect& aScrollAreaSize, PRBool aOnTop, PRBool aHorizontal, PRBool aAdd)
|
nsGfxScrollFrameInner::AddRemoveScrollbar(nsBoxLayoutState& aState, nsRect& aScrollAreaSize, PRBool aOnTop, PRBool aHorizontal, PRBool aAdd)
|
||||||
{
|
{
|
||||||
if (aHorizontal) {
|
if (aHorizontal) {
|
||||||
if (mNeverHasHorizontalScrollbar || !mHScrollbarBox)
|
if (!mHScrollbarBox)
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
nsSize hSize;
|
nsSize hSize;
|
||||||
|
@ -1573,7 +1570,7 @@ nsGfxScrollFrameInner::AddRemoveScrollbar(nsBoxLayoutState& aState, nsRect& aScr
|
||||||
|
|
||||||
return fit;
|
return fit;
|
||||||
} else {
|
} else {
|
||||||
if (mNeverHasVerticalScrollbar || !mVScrollbarBox)
|
if (!mVScrollbarBox)
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
nsSize vSize;
|
nsSize vSize;
|
||||||
|
|
|
@ -143,9 +143,6 @@ public:
|
||||||
// value that indicates "not set")
|
// value that indicates "not set")
|
||||||
PRInt16 mLastDir;
|
PRInt16 mLastDir;
|
||||||
|
|
||||||
PRPackedBool mNeverHasVerticalScrollbar;
|
|
||||||
PRPackedBool mNeverHasHorizontalScrollbar;
|
|
||||||
|
|
||||||
PRPackedBool mHasVerticalScrollbar;
|
PRPackedBool mHasVerticalScrollbar;
|
||||||
PRPackedBool mHasHorizontalScrollbar;
|
PRPackedBool mHasHorizontalScrollbar;
|
||||||
PRPackedBool mFirstPass;
|
PRPackedBool mFirstPass;
|
||||||
|
|
|
@ -1136,8 +1136,6 @@ nsGfxScrollFrameInner::nsGfxScrollFrameInner(nsBoxFrame* aOuter)
|
||||||
mOuter(aOuter),
|
mOuter(aOuter),
|
||||||
mMaxElementWidth(0),
|
mMaxElementWidth(0),
|
||||||
mLastDir(-1),
|
mLastDir(-1),
|
||||||
mNeverHasVerticalScrollbar(PR_FALSE),
|
|
||||||
mNeverHasHorizontalScrollbar(PR_FALSE),
|
|
||||||
mHasVerticalScrollbar(PR_FALSE),
|
mHasVerticalScrollbar(PR_FALSE),
|
||||||
mHasHorizontalScrollbar(PR_FALSE),
|
mHasHorizontalScrollbar(PR_FALSE),
|
||||||
mFirstPass(PR_FALSE),
|
mFirstPass(PR_FALSE),
|
||||||
|
@ -1264,7 +1262,6 @@ nsGfxScrollFrameInner::CreateAnonymousContent(nsISupportsArray& aAnonymousChildr
|
||||||
// allow scrollbars if this is the child of the viewport, because
|
// allow scrollbars if this is the child of the viewport, because
|
||||||
// we must be the scrollbars for the print preview window
|
// we must be the scrollbars for the print preview window
|
||||||
if (!parent || parent->GetType() != nsLayoutAtoms::viewportFrame) {
|
if (!parent || parent->GetType() != nsLayoutAtoms::viewportFrame) {
|
||||||
mNeverHasVerticalScrollbar = mNeverHasHorizontalScrollbar = PR_TRUE;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1556,7 +1553,7 @@ PRBool
|
||||||
nsGfxScrollFrameInner::AddRemoveScrollbar(nsBoxLayoutState& aState, nsRect& aScrollAreaSize, PRBool aOnTop, PRBool aHorizontal, PRBool aAdd)
|
nsGfxScrollFrameInner::AddRemoveScrollbar(nsBoxLayoutState& aState, nsRect& aScrollAreaSize, PRBool aOnTop, PRBool aHorizontal, PRBool aAdd)
|
||||||
{
|
{
|
||||||
if (aHorizontal) {
|
if (aHorizontal) {
|
||||||
if (mNeverHasHorizontalScrollbar || !mHScrollbarBox)
|
if (!mHScrollbarBox)
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
nsSize hSize;
|
nsSize hSize;
|
||||||
|
@ -1573,7 +1570,7 @@ nsGfxScrollFrameInner::AddRemoveScrollbar(nsBoxLayoutState& aState, nsRect& aScr
|
||||||
|
|
||||||
return fit;
|
return fit;
|
||||||
} else {
|
} else {
|
||||||
if (mNeverHasVerticalScrollbar || !mVScrollbarBox)
|
if (!mVScrollbarBox)
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
|
|
||||||
nsSize vSize;
|
nsSize vSize;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче