From 5eaa6343ea9cd2da6f84e88d07ccd51a50de95fa Mon Sep 17 00:00:00 2001 From: "saari%netscape.com" Date: Sat, 19 Feb 2000 23:33:51 +0000 Subject: [PATCH] Fix for PDT+ 26618. Typing for hyatt, r=saari git-svn-id: svn://10.0.0.236/trunk@61366 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xul/base/src/nsTreeRowGroupFrame.cpp | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/mozilla/layout/xul/base/src/nsTreeRowGroupFrame.cpp b/mozilla/layout/xul/base/src/nsTreeRowGroupFrame.cpp index e69cef6d972..bab218b2339 100644 --- a/mozilla/layout/xul/base/src/nsTreeRowGroupFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTreeRowGroupFrame.cpp @@ -791,7 +791,8 @@ nsTreeRowGroupFrame::PositionChanged(nsIPresContext* aPresContext, PRInt32 aOldI mTopFrame = mBottomFrame = nsnull; // Make sure everything is cleared out. // Force a reflow. - OnContentAdded(aPresContext); + nsTreeFrame* treeFrame = (nsTreeFrame*) tableFrame; + MarkTreeAsDirty(aPresContext, treeFrame); return NS_OK; } @@ -1092,7 +1093,7 @@ nsTreeRowGroupFrame::ReflowAfterRowLayout(nsIPresContext* aPresContext, // Dirty the tree for another reflow. nsTableFrame* tableFrame; nsTableFrame::GetTableFrame(this, tableFrame); - + MarkTreeAsDirty(aPresContext, (nsTreeFrame*)tableFrame); } } @@ -1411,6 +1412,10 @@ void nsTreeRowGroupFrame::OnContentAdded(nsIPresContext* aPresContext) nsTreeFrame* treeFrame = (nsTreeFrame*) tableFrame; MarkTreeAsDirty(aPresContext, treeFrame); + + nsCOMPtr shell; + aPresContext->GetShell(getter_AddRefs(shell)); + shell->ProcessReflowCommands(PR_FALSE); } void nsTreeRowGroupFrame::OnContentInserted(nsIPresContext* aPresContext, nsIFrame* aNextSibling, PRInt32 aIndex) @@ -1550,7 +1555,7 @@ nsTreeRowGroupFrame::ReflowScrollbar(nsIPresContext* aPresContext) if (!mScrollbar) return; - + nsTableFrame* tableFrame; nsTableFrame::GetTableFrame(this, tableFrame); nsTreeFrame* treeFrame = (nsTreeFrame*)tableFrame; @@ -1637,8 +1642,14 @@ nsTreeRowGroupFrame::ReflowScrollbar(nsIPresContext* aPresContext) maxpos = ch; } - // Make sure our position is accurate. - scrollbarContent->SetAttribute(kNameSpaceID_None, nsXULAtoms::maxpos, maxpos, PR_TRUE); + // Make sure our position is accurate + nsAutoString value; + scrollbarContent->GetAttribute(kNameSpaceID_None, + nsXULAtoms::maxpos, value); + + if(value != maxpos){ + scrollbarContent->SetAttribute(kNameSpaceID_None, nsXULAtoms::maxpos, maxpos, PR_TRUE); + } } void nsTreeRowGroupFrame::SetContentChain(nsISupportsArray* aContentChain)