diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
index 838a65e60b9..64ec3727c79 100644
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -5300,6 +5300,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
NS_ASSERTION(data, "Should have frame construction data now");
if (data->mBits & FCDATA_SUPPRESS_FRAME) {
+ aState.mFrameManager->SetUndisplayedContent(aContent, styleContext);
return;
}
@@ -5309,6 +5310,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
aParentFrame->GetType() != nsGkAtoms::menuFrame)) {
if (!aState.mPopupItems.containingBlock &&
!aState.mHavePendingPopupgroup) {
+ aState.mFrameManager->SetUndisplayedContent(aContent, styleContext);
return;
}
@@ -5324,6 +5326,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
aParentFrame->GetType() == nsGkAtoms::tableColGroupFrame &&
(!(bits & FCDATA_IS_TABLE_PART) ||
display->mDisplay != NS_STYLE_DISPLAY_TABLE_COLUMN)) {
+ aState.mFrameManager->SetUndisplayedContent(aContent, styleContext);
return;
}
diff --git a/layout/reftests/bugs/490173-1-ref.html b/layout/reftests/bugs/490173-1-ref.html
new file mode 100644
index 00000000000..73bace2f3ad
--- /dev/null
+++ b/layout/reftests/bugs/490173-1-ref.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+Foo
+
+
diff --git a/layout/reftests/bugs/490173-1.html b/layout/reftests/bugs/490173-1.html
new file mode 100644
index 00000000000..4bef4d61218
--- /dev/null
+++ b/layout/reftests/bugs/490173-1.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+Foo
+
+
diff --git a/layout/reftests/bugs/490173-2-ref.html b/layout/reftests/bugs/490173-2-ref.html
new file mode 100644
index 00000000000..cab4e3f0c06
--- /dev/null
+++ b/layout/reftests/bugs/490173-2-ref.html
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/layout/reftests/bugs/490173-2.html b/layout/reftests/bugs/490173-2.html
new file mode 100644
index 00000000000..9f9f23a7493
--- /dev/null
+++ b/layout/reftests/bugs/490173-2.html
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list
index 9774cbdf875..f65e010a9e5 100644
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1229,4 +1229,6 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 481948-3.html 481948-3-ref.html # differ
== 487539-1.html about:blank
== 488390-1.html 488390-1-ref.html
== 488685-1.html 488685-1-ref.html
+-- 490173-1.html 490173-1-ref.html
+-- 490173-2.html 490173-2-ref.html
fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs EXTEND_PAD on non-Mac for correct scaling behaviour