diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
index 7ba99cd8946..4931301ca69 100644
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -4952,8 +4952,10 @@ nsCSSFrameConstructor::ConstructSVGForeignObjectFrame(nsFrameConstructorState& a
}
nsFrameItems childItems;
- // Claim to be relatively positioned so that we end up being the
+ // We should be relatively positioned so that we end up being the
// absolute containing block.
+ const nsStyleDisplay* disp = innerPseudoStyle->GetStyleDisplay();
+ NS_ASSERTION(disp->IsPositioned(), "How did this get to not be positioned?");
rv = ConstructBlock(aState, innerPseudoStyle->GetStyleDisplay(), content,
newFrame, newFrame, innerPseudoStyle,
&blockFrame, childItems, true,
diff --git a/layout/reftests/svg/foreignObject-dynamic-abspos-01-ref.html b/layout/reftests/svg/foreignObject-dynamic-abspos-01-ref.html
new file mode 100644
index 00000000000..37bd9b6f14b
--- /dev/null
+++ b/layout/reftests/svg/foreignObject-dynamic-abspos-01-ref.html
@@ -0,0 +1,10 @@
+
+