Bug 1272997 - Set resize flags properly when calling SetComputed{Width,Height} on the reflow state for a viewport frame. r=dholbert

This commit is contained in:
Jonathan Kew 2016-05-18 21:07:53 +01:00
parent f98f9cb8e1
commit 8883bbb6a6

View File

@ -329,7 +329,8 @@ nsHTMLReflowState::SetComputedWidth(nscoord aComputedWidth)
if (ComputedWidth() != aComputedWidth) {
ComputedWidth() = aComputedWidth;
nsIAtom* frameType = frame->GetType();
if (frameType != nsGkAtoms::viewportFrame) { // Or check GetParent()?
if (frameType != nsGkAtoms::viewportFrame || // Or check GetParent()?
mWritingMode.IsVertical()) {
InitResizeFlags(frame->PresContext(), frameType);
}
}
@ -351,7 +352,10 @@ nsHTMLReflowState::SetComputedHeight(nscoord aComputedHeight)
NS_PRECONDITION(aComputedHeight >= 0, "Invalid computed height");
if (ComputedHeight() != aComputedHeight) {
ComputedHeight() = aComputedHeight;
InitResizeFlags(frame->PresContext(), frame->GetType());
nsIAtom* frameType = frame->GetType();
if (frameType != nsGkAtoms::viewportFrame || !mWritingMode.IsVertical()) {
InitResizeFlags(frame->PresContext(), frameType);
}
}
}