mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1277129 Part 4b - Rename ScrollReflowState to ScrollReflowInput. r=dbaron
MozReview-Commit-ID: ILLqDYR0vkZ --HG-- extra : rebase_source : d6167b5673e854f1a6e6b00fa942cd81e534ce49
This commit is contained in:
parent
9c26b29bf4
commit
ecfae6abac
@ -207,7 +207,7 @@ nsHTMLScrollFrame::GetType() const
|
|||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
struct MOZ_STACK_CLASS ScrollReflowState {
|
struct MOZ_STACK_CLASS ScrollReflowInput {
|
||||||
const ReflowInput& mReflowState;
|
const ReflowInput& mReflowState;
|
||||||
nsBoxLayoutState mBoxState;
|
nsBoxLayoutState mBoxState;
|
||||||
ScrollbarStyles mStyles;
|
ScrollbarStyles mStyles;
|
||||||
@ -226,7 +226,7 @@ struct MOZ_STACK_CLASS ScrollReflowState {
|
|||||||
// Whether we decided to show the vertical scrollbar
|
// Whether we decided to show the vertical scrollbar
|
||||||
bool mShowVScrollbar;
|
bool mShowVScrollbar;
|
||||||
|
|
||||||
ScrollReflowState(nsIScrollableFrame* aFrame,
|
ScrollReflowInput(nsIScrollableFrame* aFrame,
|
||||||
const ReflowInput& aState) :
|
const ReflowInput& aState) :
|
||||||
mReflowState(aState),
|
mReflowState(aState),
|
||||||
// mBoxState is just used for scrollbars so we don't need to
|
// mBoxState is just used for scrollbars so we don't need to
|
||||||
@ -239,7 +239,7 @@ struct MOZ_STACK_CLASS ScrollReflowState {
|
|||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
// XXXldb Can this go away?
|
// XXXldb Can this go away?
|
||||||
static nsSize ComputeInsideBorderSize(ScrollReflowState* aState,
|
static nsSize ComputeInsideBorderSize(ScrollReflowInput* aState,
|
||||||
const nsSize& aDesiredInsideBorderSize)
|
const nsSize& aDesiredInsideBorderSize)
|
||||||
{
|
{
|
||||||
// aDesiredInsideBorderSize is the frame size; i.e., it includes
|
// aDesiredInsideBorderSize is the frame size; i.e., it includes
|
||||||
@ -298,7 +298,7 @@ GetScrollbarMetrics(nsBoxLayoutState& aState, nsIFrame* aBox, nsSize* aMin,
|
|||||||
* whether the horizontal and/or vertical scrollbars are present,
|
* whether the horizontal and/or vertical scrollbars are present,
|
||||||
* compute the resulting layout and return true if the layout is
|
* compute the resulting layout and return true if the layout is
|
||||||
* consistent. If the layout is consistent then we fill in the
|
* consistent. If the layout is consistent then we fill in the
|
||||||
* computed fields of the ScrollReflowState.
|
* computed fields of the ScrollReflowInput.
|
||||||
*
|
*
|
||||||
* The layout is consistent when both scrollbars are showing if and only
|
* The layout is consistent when both scrollbars are showing if and only
|
||||||
* if they should be showing. A horizontal scrollbar should be showing if all
|
* if they should be showing. A horizontal scrollbar should be showing if all
|
||||||
@ -315,7 +315,7 @@ GetScrollbarMetrics(nsBoxLayoutState& aState, nsIFrame* aBox, nsSize* aMin,
|
|||||||
* @param aForce if true, then we just assume the layout is consistent.
|
* @param aForce if true, then we just assume the layout is consistent.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState,
|
nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
|
||||||
nsHTMLReflowMetrics* aKidMetrics,
|
nsHTMLReflowMetrics* aKidMetrics,
|
||||||
bool aAssumeHScroll, bool aAssumeVScroll,
|
bool aAssumeHScroll, bool aAssumeVScroll,
|
||||||
bool aForce)
|
bool aForce)
|
||||||
@ -432,7 +432,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowState* aState,
|
|||||||
// Currently this will only behave as expected for horizontal writing modes.
|
// Currently this will only behave as expected for horizontal writing modes.
|
||||||
// (See bug 1175509.)
|
// (See bug 1175509.)
|
||||||
bool
|
bool
|
||||||
nsHTMLScrollFrame::ScrolledContentDependsOnHeight(ScrollReflowState* aState)
|
nsHTMLScrollFrame::ScrolledContentDependsOnHeight(ScrollReflowInput* aState)
|
||||||
{
|
{
|
||||||
// Return true if ReflowScrolledFrame is going to do something different
|
// Return true if ReflowScrolledFrame is going to do something different
|
||||||
// based on the presence of a horizontal scrollbar.
|
// based on the presence of a horizontal scrollbar.
|
||||||
@ -444,7 +444,7 @@ nsHTMLScrollFrame::ScrolledContentDependsOnHeight(ScrollReflowState* aState)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
|
nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowInput* aState,
|
||||||
bool aAssumeHScroll,
|
bool aAssumeHScroll,
|
||||||
bool aAssumeVScroll,
|
bool aAssumeVScroll,
|
||||||
nsHTMLReflowMetrics* aMetrics,
|
nsHTMLReflowMetrics* aMetrics,
|
||||||
@ -587,7 +587,7 @@ nsHTMLScrollFrame::ReflowScrolledFrame(ScrollReflowState* aState,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsHTMLScrollFrame::GuessHScrollbarNeeded(const ScrollReflowState& aState)
|
nsHTMLScrollFrame::GuessHScrollbarNeeded(const ScrollReflowInput& aState)
|
||||||
{
|
{
|
||||||
if (aState.mStyles.mHorizontal != NS_STYLE_OVERFLOW_AUTO)
|
if (aState.mStyles.mHorizontal != NS_STYLE_OVERFLOW_AUTO)
|
||||||
// no guessing required
|
// no guessing required
|
||||||
@ -597,7 +597,7 @@ nsHTMLScrollFrame::GuessHScrollbarNeeded(const ScrollReflowState& aState)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsHTMLScrollFrame::GuessVScrollbarNeeded(const ScrollReflowState& aState)
|
nsHTMLScrollFrame::GuessVScrollbarNeeded(const ScrollReflowInput& aState)
|
||||||
{
|
{
|
||||||
if (aState.mStyles.mVertical != NS_STYLE_OVERFLOW_AUTO)
|
if (aState.mStyles.mVertical != NS_STYLE_OVERFLOW_AUTO)
|
||||||
// no guessing required
|
// no guessing required
|
||||||
@ -649,7 +649,7 @@ nsHTMLScrollFrame::InInitialReflow() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLScrollFrame::ReflowContents(ScrollReflowState* aState,
|
nsHTMLScrollFrame::ReflowContents(ScrollReflowInput* aState,
|
||||||
const nsHTMLReflowMetrics& aDesiredSize)
|
const nsHTMLReflowMetrics& aDesiredSize)
|
||||||
{
|
{
|
||||||
nsHTMLReflowMetrics kidDesiredSize(aDesiredSize.GetWritingMode(), aDesiredSize.mFlags);
|
nsHTMLReflowMetrics kidDesiredSize(aDesiredSize.GetWritingMode(), aDesiredSize.mFlags);
|
||||||
@ -723,7 +723,7 @@ nsHTMLScrollFrame::ReflowContents(ScrollReflowState* aState,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLScrollFrame::PlaceScrollArea(const ScrollReflowState& aState,
|
nsHTMLScrollFrame::PlaceScrollArea(const ScrollReflowInput& aState,
|
||||||
const nsPoint& aScrollPosition)
|
const nsPoint& aScrollPosition)
|
||||||
{
|
{
|
||||||
nsIFrame *scrolledFrame = mHelper.mScrolledFrame;
|
nsIFrame *scrolledFrame = mHelper.mScrolledFrame;
|
||||||
@ -844,7 +844,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
mHelper.HandleScrollbarStyleSwitching();
|
mHelper.HandleScrollbarStyleSwitching();
|
||||||
|
|
||||||
ScrollReflowState state(this, aReflowState);
|
ScrollReflowInput state(this, aReflowState);
|
||||||
// sanity check: ensure that if we have no scrollbar, we treat it
|
// sanity check: ensure that if we have no scrollbar, we treat it
|
||||||
// as hidden.
|
// as hidden.
|
||||||
if (!mHelper.mVScrollbarBox || mHelper.mNeverHasVerticalScrollbar)
|
if (!mHelper.mVScrollbarBox || mHelper.mNeverHasVerticalScrollbar)
|
||||||
|
@ -32,7 +32,7 @@ class nsPresState;
|
|||||||
class nsIScrollPositionListener;
|
class nsIScrollPositionListener;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
struct ScrollReflowState;
|
struct ScrollReflowInput;
|
||||||
namespace layers {
|
namespace layers {
|
||||||
class Layer;
|
class Layer;
|
||||||
} // namespace layers
|
} // namespace layers
|
||||||
@ -652,7 +652,7 @@ class nsHTMLScrollFrame : public nsContainerFrame,
|
|||||||
public:
|
public:
|
||||||
typedef mozilla::ScrollFrameHelper ScrollFrameHelper;
|
typedef mozilla::ScrollFrameHelper ScrollFrameHelper;
|
||||||
typedef mozilla::CSSIntPoint CSSIntPoint;
|
typedef mozilla::CSSIntPoint CSSIntPoint;
|
||||||
typedef mozilla::ScrollReflowState ScrollReflowState;
|
typedef mozilla::ScrollReflowInput ScrollReflowInput;
|
||||||
friend nsHTMLScrollFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell,
|
friend nsHTMLScrollFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell,
|
||||||
nsStyleContext* aContext,
|
nsStyleContext* aContext,
|
||||||
bool aIsRoot);
|
bool aIsRoot);
|
||||||
@ -674,19 +674,19 @@ public:
|
|||||||
mHelper.BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
mHelper.BuildDisplayList(aBuilder, aDirtyRect, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TryLayout(ScrollReflowState* aState,
|
bool TryLayout(ScrollReflowInput* aState,
|
||||||
nsHTMLReflowMetrics* aKidMetrics,
|
nsHTMLReflowMetrics* aKidMetrics,
|
||||||
bool aAssumeVScroll, bool aAssumeHScroll,
|
bool aAssumeVScroll, bool aAssumeHScroll,
|
||||||
bool aForce);
|
bool aForce);
|
||||||
bool ScrolledContentDependsOnHeight(ScrollReflowState* aState);
|
bool ScrolledContentDependsOnHeight(ScrollReflowInput* aState);
|
||||||
void ReflowScrolledFrame(ScrollReflowState* aState,
|
void ReflowScrolledFrame(ScrollReflowInput* aState,
|
||||||
bool aAssumeHScroll,
|
bool aAssumeHScroll,
|
||||||
bool aAssumeVScroll,
|
bool aAssumeVScroll,
|
||||||
nsHTMLReflowMetrics* aMetrics,
|
nsHTMLReflowMetrics* aMetrics,
|
||||||
bool aFirstPass);
|
bool aFirstPass);
|
||||||
void ReflowContents(ScrollReflowState* aState,
|
void ReflowContents(ScrollReflowInput* aState,
|
||||||
const nsHTMLReflowMetrics& aDesiredSize);
|
const nsHTMLReflowMetrics& aDesiredSize);
|
||||||
void PlaceScrollArea(const ScrollReflowState& aState,
|
void PlaceScrollArea(const ScrollReflowInput& aState,
|
||||||
const nsPoint& aScrollPosition);
|
const nsPoint& aScrollPosition);
|
||||||
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
|
nscoord GetIntrinsicVScrollbarWidth(nsRenderingContext *aRenderingContext);
|
||||||
|
|
||||||
@ -1023,8 +1023,8 @@ protected:
|
|||||||
void SetSuppressScrollbarUpdate(bool aSuppress) {
|
void SetSuppressScrollbarUpdate(bool aSuppress) {
|
||||||
mHelper.mSupppressScrollbarUpdate = aSuppress;
|
mHelper.mSupppressScrollbarUpdate = aSuppress;
|
||||||
}
|
}
|
||||||
bool GuessHScrollbarNeeded(const ScrollReflowState& aState);
|
bool GuessHScrollbarNeeded(const ScrollReflowInput& aState);
|
||||||
bool GuessVScrollbarNeeded(const ScrollReflowState& aState);
|
bool GuessVScrollbarNeeded(const ScrollReflowInput& aState);
|
||||||
|
|
||||||
bool IsScrollbarUpdateSuppressed() const {
|
bool IsScrollbarUpdateSuppressed() const {
|
||||||
return mHelper.mSupppressScrollbarUpdate;
|
return mHelper.mSupppressScrollbarUpdate;
|
||||||
|
Loading…
Reference in New Issue
Block a user