Bug 917021: We should not store the NormalPositionProperty on all frames, only relatively positioned ones. r=dholbert

This also fixes nsHTMLReflowState::ApplyRelativePositioning to no-op for
svg:text, as it should (since nsIFrame::IsRelativelyPositioned() checks
more than nsStyleDisplay::IsRelativelyPositionedStyle()).
This commit is contained in:
L. David Baron 2013-09-17 04:44:16 -07:00
parent 76c677e724
commit ef01bdd9f2

View File

@ -849,6 +849,15 @@ nsHTMLReflowState::ApplyRelativePositioning(nsIFrame* aFrame,
const nsMargin& aComputedOffsets,
nsPoint* aPosition)
{
if (!aFrame->IsRelativelyPositioned()) {
NS_ASSERTION(!aFrame->Properties().Get(nsIFrame::NormalPositionProperty()),
"We assume that changing the 'position' property causes "
"frame reconstruction. If that ever changes, this code "
"should call "
"props.Delete(nsIFrame::NormalPositionProperty())");
return;
}
// Store the normal position
FrameProperties props = aFrame->Properties();
nsPoint* normalPosition = static_cast<nsPoint*>