Backed out changeset 2f2351cb2579 (bug 875060)

This commit is contained in:
Ed Morley 2013-06-17 08:50:41 +01:00
parent 4d07c30f0a
commit 572840a06d
6 changed files with 10 additions and 40 deletions

View File

@ -327,8 +327,7 @@ nsIFrame*
NS_NewHTMLScrollFrame (nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot);
nsIFrame*
NS_NewXULScrollFrame (nsIPresShell* aPresShell, nsStyleContext* aContext,
bool aIsRoot, bool aClipAllDescendants);
NS_NewXULScrollFrame (nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot);
nsIFrame*
NS_NewSliderFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
@ -4117,11 +4116,8 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsFrameConstructorState& aState,
// HTMLScrollFrame
// XXXbz this is the lone remaining consumer of IsXULDisplayType.
// I wonder whether we can eliminate that somehow.
const nsStyleDisplay* displayStyle = aContentStyle->StyleDisplay();
if (IsXULDisplayType(displayStyle)) {
gfxScrollFrame = NS_NewXULScrollFrame(mPresShell, contentStyle, aIsRoot,
displayStyle->mDisplay == NS_STYLE_DISPLAY_STACK ||
displayStyle->mDisplay == NS_STYLE_DISPLAY_INLINE_STACK);
if (IsXULDisplayType(aContentStyle->StyleDisplay())) {
gfxScrollFrame = NS_NewXULScrollFrame(mPresShell, contentStyle, aIsRoot);
} else {
gfxScrollFrame = NS_NewHTMLScrollFrame(mPresShell, contentStyle, aIsRoot);
}

View File

@ -890,22 +890,18 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
//----------nsXULScrollFrame-------------------------------------------
nsIFrame*
NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
bool aIsRoot, bool aClipAllDescendants)
NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot)
{
return new (aPresShell) nsXULScrollFrame(aPresShell, aContext, aIsRoot,
aClipAllDescendants);
return new (aPresShell) nsXULScrollFrame(aPresShell, aContext, aIsRoot);
}
NS_IMPL_FRAMEARENA_HELPERS(nsXULScrollFrame)
nsXULScrollFrame::nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext,
bool aIsRoot, bool aClipAllDescendants)
nsXULScrollFrame::nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot)
: nsBoxFrame(aShell, aContext, aIsRoot),
mInner(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot)
{
SetLayoutManager(nullptr);
mInner.mClipAllDescendants = aClipAllDescendants;
}
nsMargin
@ -1507,7 +1503,6 @@ nsGfxScrollFrameInner::nsGfxScrollFrameInner(nsContainerFrame* aOuter,
, mFrameIsUpdatingScrollbar(false)
, mDidHistoryRestore(false)
, mIsRoot(aIsRoot)
, mClipAllDescendants(aIsRoot)
, mSupppressScrollbarUpdate(false)
, mSkippedScrollbarLayout(false)
, mHadNonInitialReflow(false)
@ -2203,7 +2198,7 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (usingDisplayport) {
nsRect clip = displayPort + aBuilder->ToReferenceFrame(mOuter);
if (mClipAllDescendants) {
if (mIsRoot) {
clipState.ClipContentDescendants(clip);
} else {
clipState.ClipContainingBlockDescendants(clip, nullptr);
@ -2212,7 +2207,7 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsRect clip = mScrollPort + aBuilder->ToReferenceFrame(mOuter);
// Our override of GetBorderRadii ensures we never have a radius at
// the corners where we have a scrollbar.
if (mClipAllDescendants) {
if (mIsRoot) {
#ifdef DEBUG
nscoord radii[8];
#endif

View File

@ -320,9 +320,6 @@ public:
bool mDidHistoryRestore:1;
// Is this the scrollframe for the document's viewport?
bool mIsRoot:1;
// True if we should clip all descendants, false if we should only clip
// descendants for which we are the containing block.
bool mClipAllDescendants:1;
// If true, don't try to layout the scrollbars in Reflow(). This can be
// useful if multiple passes are involved, because we don't want to place the
// scrollbars at the wrong size.
@ -633,8 +630,7 @@ public:
NS_DECL_QUERYFRAME
NS_DECL_FRAMEARENA_HELPERS
friend nsIFrame* NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext,
bool aIsRoot, bool aClipAllDescendants);
friend nsIFrame* NS_NewXULScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot);
// Called to set the child frames. We typically have three: the scroll area,
// the vertical scrollbar, and the horizontal scrollbar.
@ -857,8 +853,7 @@ public:
#endif
protected:
nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot,
bool aClipAllDescendants);
nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot);
void ClampAndSetBounds(nsBoxLayoutState& aState,
nsRect& aRect,

View File

@ -1,7 +0,0 @@
<!DOCTYPE HTML>
<html>
<body>
<div style="display:-moz-inline-stack; width:100px; height:100px; background:yellow">
</div>
</body>
</html>

View File

@ -1,8 +0,0 @@
<!DOCTYPE HTML>
<html>
<body>
<div style="display:-moz-inline-stack; overflow:hidden; position:relative; width:100px; height:100px;">
<div style="width:200px; height:200px; background:yellow; position:absolute"></div>
</div>
</body>
</html>

View File

@ -1760,4 +1760,3 @@ test-pref(layout.css.flexbox.enabled,true) == 849407-1.html 849407-1-ref.html
== 858803-1.html 858803-1-ref.html
!= 860370.html 860370-notref.html
== 871338-1.html 871338-1-ref.html
== 875060-1.html 875060-1-ref.html