Go through the normal restyling codepath in RebuildAllStyleData so that we handle in-progress transitions correctly. (Bug 583219) r=bzbarsky

This commit is contained in:
L. David Baron 2011-03-29 20:46:13 -07:00
parent 809999141b
commit ea97bc0b82

View File

@ -11627,6 +11627,8 @@ nsCSSFrameConstructor::RebuildAllStyleData(nsChangeHint aExtraHint)
return;
}
nsPresContext *presContext = mPresShell->GetPresContext();
presContext->SetProcessingRestyles(PR_TRUE);
// Recalculate all of the style contexts for the document
// Note that we can ignore the return value of ComputeStyleChangeFor
// because we never need to reframe the root frame
@ -11642,6 +11644,14 @@ nsCSSFrameConstructor::RebuildAllStyleData(nsChangeHint aExtraHint)
mPendingRestyles, PR_TRUE);
// Process the required changes
ProcessRestyledFrames(changeList);
presContext->SetProcessingRestyles(PR_FALSE);
// Make sure that we process any pending animation restyles from the
// above style change. Note that we can *almost* implement the above
// by just posting a style change -- except we really need to restyle
// the root frame rather than the root element's primary frame.
ProcessPendingRestyles();
// Tell the style set it's safe to destroy the old rule tree. We
// must do this after the ProcessRestyledFrames call in case the
// change list has frame reconstructs in it (since frames to be