Bug 782062 - Do not attempt to move frames with views in their subtree without doing a reflow to prevent the view position from getting out of sync; r=roc

This commit is contained in:
Ehsan Akhgari
2012-08-29 09:46:09 -04:00
parent 9438764975
commit 10fa60ec6d

View File

@@ -12405,6 +12405,15 @@ nsCSSFrameConstructor::RecomputePosition(nsIFrame* aFrame)
return true;
}
// Don't process position changes on frames which have views or the ones which
// have a view somewhere in their descendants, because the corresponding view
// needs to be repositioned properly as well.
if (aFrame->HasView() ||
(aFrame->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW)) {
StyleChangeReflow(aFrame, nsChangeHint_NeedReflow);
return false;
}
const nsStyleDisplay* display = aFrame->GetStyleDisplay();
// Changes to the offsets of a non-positioned element can safely be ignored.
if (display->mPosition == NS_STYLE_POSITION_STATIC) {