diff --git a/layout/generic/nsHTMLFrame.cpp b/layout/generic/nsHTMLFrame.cpp
index c41d9d672961..f01a2a03ada3 100644
--- a/layout/generic/nsHTMLFrame.cpp
+++ b/layout/generic/nsHTMLFrame.cpp
@@ -571,6 +571,13 @@ CanvasFrame::Reflow(nsPresContext* aPresContext,
nsSize(aReflowState.availableWidth,
NS_UNCONSTRAINEDSIZE));
+ if (aReflowState.mFlags.mVResize &&
+ (kidFrame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_HEIGHT)) {
+ // Tell our kid it's being vertically resized too. Bit of a
+ // hack for framesets.
+ kidReflowState.mFlags.mVResize = PR_TRUE;
+ }
+
// Reflow the frame
ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowState,
kidReflowState.mComputedMargin.left, kidReflowState.mComputedMargin.top,