mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 381120, ensure view in reflowcallback, r+sr=roc
This commit is contained in:
parent
57d8a6ea55
commit
4c1bf9be59
@ -387,6 +387,15 @@ void
|
||||
nsTreeBodyFrame::EnsureView()
|
||||
{
|
||||
if (!mView) {
|
||||
PRBool isInReflow;
|
||||
PresContext()->PresShell()->IsReflowLocked(&isInReflow);
|
||||
if (isInReflow) {
|
||||
if (!mReflowCallbackPosted) {
|
||||
mReflowCallbackPosted = PR_TRUE;
|
||||
PresContext()->PresShell()->PostReflowCallback(this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsIBoxObject> box = do_QueryInterface(mTreeBoxObject);
|
||||
if (box) {
|
||||
nsCOMPtr<nsITreeView> treeView;
|
||||
@ -433,6 +442,11 @@ nsTreeBodyFrame::SetBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRec
|
||||
PRBool
|
||||
nsTreeBodyFrame::ReflowFinished()
|
||||
{
|
||||
if (!mView) {
|
||||
nsWeakFrame weakFrame(this);
|
||||
EnsureView();
|
||||
NS_ENSURE_TRUE(weakFrame.IsAlive(), PR_FALSE);
|
||||
}
|
||||
if (mView) {
|
||||
CalcInnerBox();
|
||||
ScrollParts parts = GetScrollParts();
|
||||
|
Loading…
Reference in New Issue
Block a user