mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Fix for Linux bustage, bug 37643. Give outer table reflow state initial computed values of 0 to avoid excessive reflows from boxes.
This commit is contained in:
parent
ff0e91cee1
commit
1053177d73
@ -1798,7 +1798,7 @@ nsHTMLReflowState::ComputeBlockBoxData(nsIPresContext* aPresContext,
|
||||
nsCOMPtr<nsIAtom> fType;
|
||||
frame->GetFrameType(getter_AddRefs(fType));
|
||||
if (nsLayoutAtoms::tableOuterFrame == fType.get()) {
|
||||
mComputedWidth = NS_SHRINKWRAPWIDTH;
|
||||
mComputedWidth = 0; // XXX temp fix for trees
|
||||
} else if (nsLayoutAtoms::tableFrame == fType.get()) {
|
||||
mComputedWidth = NS_SHRINKWRAPWIDTH;
|
||||
if (eStyleUnit_Auto == mStyleSpacing->mMargin.GetLeftUnit()) {
|
||||
|
@ -1798,7 +1798,7 @@ nsHTMLReflowState::ComputeBlockBoxData(nsIPresContext* aPresContext,
|
||||
nsCOMPtr<nsIAtom> fType;
|
||||
frame->GetFrameType(getter_AddRefs(fType));
|
||||
if (nsLayoutAtoms::tableOuterFrame == fType.get()) {
|
||||
mComputedWidth = NS_SHRINKWRAPWIDTH;
|
||||
mComputedWidth = 0; // XXX temp fix for trees
|
||||
} else if (nsLayoutAtoms::tableFrame == fType.get()) {
|
||||
mComputedWidth = NS_SHRINKWRAPWIDTH;
|
||||
if (eStyleUnit_Auto == mStyleSpacing->mMargin.GetLeftUnit()) {
|
||||
|
@ -1305,6 +1305,8 @@ sourcetext { /* XXX should not be in HTML namespace */
|
||||
padding: 0px;
|
||||
float: inherit;
|
||||
position: inherit;
|
||||
width: 0px; /* hack for boxes */
|
||||
height: 0px; /* hack for boxes */
|
||||
}
|
||||
|
||||
:table-cell {
|
||||
|
@ -841,12 +841,14 @@ nsTableOuterFrame::OuterReflowChild(nsIPresContext* aPresContext,
|
||||
|
||||
// Normally, the outer table's mComputed values are NS_INTRINSICSIZE since they
|
||||
// depend on the caption and inner table. Boxes can force a size.
|
||||
if (aOuterRS.mComputedWidth != NS_INTRINSICSIZE) {
|
||||
if ((aOuterRS.mComputedWidth != NS_INTRINSICSIZE) &&
|
||||
(aOuterRS.mComputedWidth != 0)) {
|
||||
childRS.mComputedWidth = aOuterRS.mComputedWidth - aMargin.left - childRS.mComputedBorderPadding.left -
|
||||
childRS.mComputedBorderPadding.right - aMargin.right;
|
||||
childRS.mComputedWidth = PR_MAX(0, childRS.mComputedWidth);
|
||||
}
|
||||
if (aOuterRS.mComputedHeight != NS_INTRINSICSIZE) {
|
||||
if ((aOuterRS.mComputedHeight != NS_INTRINSICSIZE) &&
|
||||
(aOuterRS.mComputedHeight != 0)) {
|
||||
childRS.mComputedHeight = aOuterRS.mComputedHeight - aMargin.top - childRS.mComputedBorderPadding.top -
|
||||
childRS.mComputedBorderPadding.bottom - aMargin.bottom;
|
||||
childRS.mComputedHeight = PR_MAX(0, childRS.mComputedHeight);
|
||||
|
@ -111,7 +111,7 @@ file:///s|/mozilla/layout/html/tests/table/bugs/bug23235.html
|
||||
file:///s|/mozilla/layout/html/tests/table/bugs/bug23299.html
|
||||
file:///s|/mozilla/layout/html/tests/table/bugs/bug23847.html
|
||||
file:///s|/mozilla/layout/html/tests/table/bugs/bug23994.html
|
||||
file:///s|/mozilla/layout/html/tests/table/bugs/bug24200.html
|
||||
#file:///s|/mozilla/layout/html/tests/table/bugs/bug24200.html
|
||||
file:///s|/mozilla/layout/html/tests/table/bugs/bug24627.html
|
||||
file:///s|/mozilla/layout/html/tests/table/bugs/bug24410.html
|
||||
file:///s|/mozilla/layout/html/tests/table/bugs/bug24503.html
|
||||
|
@ -1305,6 +1305,8 @@ sourcetext { /* XXX should not be in HTML namespace */
|
||||
padding: 0px;
|
||||
float: inherit;
|
||||
position: inherit;
|
||||
width: 0px; /* hack for boxes */
|
||||
height: 0px; /* hack for boxes */
|
||||
}
|
||||
|
||||
:table-cell {
|
||||
|
@ -841,12 +841,14 @@ nsTableOuterFrame::OuterReflowChild(nsIPresContext* aPresContext,
|
||||
|
||||
// Normally, the outer table's mComputed values are NS_INTRINSICSIZE since they
|
||||
// depend on the caption and inner table. Boxes can force a size.
|
||||
if (aOuterRS.mComputedWidth != NS_INTRINSICSIZE) {
|
||||
if ((aOuterRS.mComputedWidth != NS_INTRINSICSIZE) &&
|
||||
(aOuterRS.mComputedWidth != 0)) {
|
||||
childRS.mComputedWidth = aOuterRS.mComputedWidth - aMargin.left - childRS.mComputedBorderPadding.left -
|
||||
childRS.mComputedBorderPadding.right - aMargin.right;
|
||||
childRS.mComputedWidth = PR_MAX(0, childRS.mComputedWidth);
|
||||
}
|
||||
if (aOuterRS.mComputedHeight != NS_INTRINSICSIZE) {
|
||||
if ((aOuterRS.mComputedHeight != NS_INTRINSICSIZE) &&
|
||||
(aOuterRS.mComputedHeight != 0)) {
|
||||
childRS.mComputedHeight = aOuterRS.mComputedHeight - aMargin.top - childRS.mComputedBorderPadding.top -
|
||||
childRS.mComputedBorderPadding.bottom - aMargin.bottom;
|
||||
childRS.mComputedHeight = PR_MAX(0, childRS.mComputedHeight);
|
||||
|
@ -121,7 +121,6 @@ nsTreeOuterFrame::Reflow(nsIPresContext* aPresContext,
|
||||
goodState.reason = eReflowReason_Resize;
|
||||
return Reflow(aPresContext, aDesiredSize, goodState, aStatus);
|
||||
}
|
||||
|
||||
if (aReflowState.mComputedWidth == NS_UNCONSTRAINEDSIZE) {
|
||||
NS_WARNING("Inefficient XUL: Reflowing outer tree frame with unconstrained width, try giving it a width in CSS!");
|
||||
nsHTMLReflowState goodState(aReflowState);
|
||||
@ -133,7 +132,6 @@ nsTreeOuterFrame::Reflow(nsIPresContext* aPresContext,
|
||||
NS_WARNING("Inefficient XUL: Reflowing outer tree frame with unconstrained height, try giving it a height in CSS!");
|
||||
}
|
||||
//printf("TOF Width: %d, TOF Height: %d\n", aReflowState.mComputedWidth, aReflowState.mComputedHeight);
|
||||
|
||||
nsresult rv = nsTableOuterFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
nsITreeFrame* tree = FindTreeFrame(aPresContext);
|
||||
|
@ -835,7 +835,9 @@ nsTreeRowGroupFrame::SetScrollbarFrame(nsIPresContext* aPresContext, nsIFrame* a
|
||||
|
||||
nsIFrame* result;
|
||||
nsScrollbarButtonFrame::GetChildWithTag(aPresContext, nsXULAtoms::slider, aFrame, result);
|
||||
((nsSliderFrame*)result)->SetScrollbarListener(this);
|
||||
if (result) {
|
||||
((nsSliderFrame*)result)->SetScrollbarListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
PRBool nsTreeRowGroupFrame::RowGroupDesiresExcessSpace()
|
||||
|
Loading…
x
Reference in New Issue
Block a user