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

--HG--
extra : rebase_source : 2e4ea7d139dc953a4c3d525b15e5753fb585e057
This commit is contained in:
Ehsan Akhgari 2012-08-29 09:46:09 -04:00
parent 93fef030a1
commit 73180678c6

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) {