diff --git a/content/html/content/src/nsHTMLAtoms.cpp b/content/html/content/src/nsHTMLAtoms.cpp
index b7df5829555a..44b064b164c5 100644
--- a/content/html/content/src/nsHTMLAtoms.cpp
+++ b/content/html/content/src/nsHTMLAtoms.cpp
@@ -242,6 +242,7 @@ nsIAtom* nsHTMLAtoms::vspace;
nsIAtom* nsHTMLAtoms::wbr;
nsIAtom* nsHTMLAtoms::width;
nsIAtom* nsHTMLAtoms::wrap;
+nsIAtom* nsHTMLAtoms::wrappedFramePseudo;
nsIAtom* nsHTMLAtoms::xmlRootPseudo;
nsIAtom* nsHTMLAtoms::zindex;
@@ -473,6 +474,7 @@ void nsHTMLAtoms::AddrefAtoms()
wbr = NS_NewAtom("WBR");
width = NS_NewAtom("WIDTH");
wrap = NS_NewAtom("WRAP");
+ wrappedFramePseudo = NS_NewAtom(":WRAPPED-FRAME");
xmlRootPseudo = NS_NewAtom(":XML-ROOT");
zindex = NS_NewAtom("ZINDEX");
}
@@ -695,6 +697,7 @@ void nsHTMLAtoms::ReleaseAtoms()
NS_RELEASE(wbr);
NS_RELEASE(width);
NS_RELEASE(wrap);
+ NS_RELEASE(wrappedFramePseudo);
NS_RELEASE(xmlRootPseudo);
NS_RELEASE(zindex);
}
diff --git a/content/html/content/src/nsHTMLAtoms.h b/content/html/content/src/nsHTMLAtoms.h
index 0b9af734b438..e6c25c659f27 100644
--- a/content/html/content/src/nsHTMLAtoms.h
+++ b/content/html/content/src/nsHTMLAtoms.h
@@ -280,6 +280,7 @@ public:
static nsIAtom* wbr;
static nsIAtom* width;
static nsIAtom* wrap;
+ static nsIAtom* wrappedFramePseudo;
static nsIAtom* xmlRootPseudo;
diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp
index d5c2cf13e9ab..ca638ccc870e 100644
--- a/content/html/style/src/nsHTMLStyleSheet.cpp
+++ b/content/html/style/src/nsHTMLStyleSheet.cpp
@@ -1742,11 +1742,11 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext,
wrapperFrame->SetStyleContext(aPresContext, scrolledPseudoStyle);
// The wrapped frame also gets a pseudo style context, but it doesn't
- // inherit any background properties
- // XXX We should define something like :WRAPPED-FRAME in ua.css
+ // inherit any background properties. It does inherit the 'display'
+ // property (very important that it does)
nsIStyleContext* wrappedPseudoStyle;
wrappedPseudoStyle = aPresContext->ResolvePseudoStyleContextFor
- (aContent, nsHTMLAtoms::columnPseudo,
+ (aContent, nsHTMLAtoms::wrappedFramePseudo,
scrolledPseudoStyle);
NS_RELEASE(scrolledPseudoStyle);
aParentFrame = wrapperFrame;
diff --git a/content/shared/public/nsHTMLAtoms.h b/content/shared/public/nsHTMLAtoms.h
index 0b9af734b438..e6c25c659f27 100644
--- a/content/shared/public/nsHTMLAtoms.h
+++ b/content/shared/public/nsHTMLAtoms.h
@@ -280,6 +280,7 @@ public:
static nsIAtom* wbr;
static nsIAtom* width;
static nsIAtom* wrap;
+ static nsIAtom* wrappedFramePseudo;
static nsIAtom* xmlRootPseudo;
diff --git a/content/shared/src/nsHTMLAtoms.cpp b/content/shared/src/nsHTMLAtoms.cpp
index b7df5829555a..44b064b164c5 100644
--- a/content/shared/src/nsHTMLAtoms.cpp
+++ b/content/shared/src/nsHTMLAtoms.cpp
@@ -242,6 +242,7 @@ nsIAtom* nsHTMLAtoms::vspace;
nsIAtom* nsHTMLAtoms::wbr;
nsIAtom* nsHTMLAtoms::width;
nsIAtom* nsHTMLAtoms::wrap;
+nsIAtom* nsHTMLAtoms::wrappedFramePseudo;
nsIAtom* nsHTMLAtoms::xmlRootPseudo;
nsIAtom* nsHTMLAtoms::zindex;
@@ -473,6 +474,7 @@ void nsHTMLAtoms::AddrefAtoms()
wbr = NS_NewAtom("WBR");
width = NS_NewAtom("WIDTH");
wrap = NS_NewAtom("WRAP");
+ wrappedFramePseudo = NS_NewAtom(":WRAPPED-FRAME");
xmlRootPseudo = NS_NewAtom(":XML-ROOT");
zindex = NS_NewAtom("ZINDEX");
}
@@ -695,6 +697,7 @@ void nsHTMLAtoms::ReleaseAtoms()
NS_RELEASE(wbr);
NS_RELEASE(width);
NS_RELEASE(wrap);
+ NS_RELEASE(wrappedFramePseudo);
NS_RELEASE(xmlRootPseudo);
NS_RELEASE(zindex);
}
diff --git a/layout/html/base/src/nsHTMLAtoms.cpp b/layout/html/base/src/nsHTMLAtoms.cpp
index b7df5829555a..44b064b164c5 100644
--- a/layout/html/base/src/nsHTMLAtoms.cpp
+++ b/layout/html/base/src/nsHTMLAtoms.cpp
@@ -242,6 +242,7 @@ nsIAtom* nsHTMLAtoms::vspace;
nsIAtom* nsHTMLAtoms::wbr;
nsIAtom* nsHTMLAtoms::width;
nsIAtom* nsHTMLAtoms::wrap;
+nsIAtom* nsHTMLAtoms::wrappedFramePseudo;
nsIAtom* nsHTMLAtoms::xmlRootPseudo;
nsIAtom* nsHTMLAtoms::zindex;
@@ -473,6 +474,7 @@ void nsHTMLAtoms::AddrefAtoms()
wbr = NS_NewAtom("WBR");
width = NS_NewAtom("WIDTH");
wrap = NS_NewAtom("WRAP");
+ wrappedFramePseudo = NS_NewAtom(":WRAPPED-FRAME");
xmlRootPseudo = NS_NewAtom(":XML-ROOT");
zindex = NS_NewAtom("ZINDEX");
}
@@ -695,6 +697,7 @@ void nsHTMLAtoms::ReleaseAtoms()
NS_RELEASE(wbr);
NS_RELEASE(width);
NS_RELEASE(wrap);
+ NS_RELEASE(wrappedFramePseudo);
NS_RELEASE(xmlRootPseudo);
NS_RELEASE(zindex);
}
diff --git a/layout/html/base/src/nsHTMLAtoms.h b/layout/html/base/src/nsHTMLAtoms.h
index 0b9af734b438..e6c25c659f27 100644
--- a/layout/html/base/src/nsHTMLAtoms.h
+++ b/layout/html/base/src/nsHTMLAtoms.h
@@ -280,6 +280,7 @@ public:
static nsIAtom* wbr;
static nsIAtom* width;
static nsIAtom* wrap;
+ static nsIAtom* wrappedFramePseudo;
static nsIAtom* xmlRootPseudo;
diff --git a/layout/html/document/src/ua.css b/layout/html/document/src/ua.css
index 24264c74cdb3..1f02f2d8444e 100644
--- a/layout/html/document/src/ua.css
+++ b/layout/html/document/src/ua.css
@@ -499,6 +499,10 @@ NOFRAMES {
display: inherit;
}
+:WRAPPED-FRAME {
+ display: inherit;
+}
+
:XML-ROOT {
background-color: inherit;
}
diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp
index d5c2cf13e9ab..ca638ccc870e 100644
--- a/layout/html/style/src/nsHTMLStyleSheet.cpp
+++ b/layout/html/style/src/nsHTMLStyleSheet.cpp
@@ -1742,11 +1742,11 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext,
wrapperFrame->SetStyleContext(aPresContext, scrolledPseudoStyle);
// The wrapped frame also gets a pseudo style context, but it doesn't
- // inherit any background properties
- // XXX We should define something like :WRAPPED-FRAME in ua.css
+ // inherit any background properties. It does inherit the 'display'
+ // property (very important that it does)
nsIStyleContext* wrappedPseudoStyle;
wrappedPseudoStyle = aPresContext->ResolvePseudoStyleContextFor
- (aContent, nsHTMLAtoms::columnPseudo,
+ (aContent, nsHTMLAtoms::wrappedFramePseudo,
scrolledPseudoStyle);
NS_RELEASE(scrolledPseudoStyle);
aParentFrame = wrapperFrame;
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index d5c2cf13e9ab..ca638ccc870e 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -1742,11 +1742,11 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext,
wrapperFrame->SetStyleContext(aPresContext, scrolledPseudoStyle);
// The wrapped frame also gets a pseudo style context, but it doesn't
- // inherit any background properties
- // XXX We should define something like :WRAPPED-FRAME in ua.css
+ // inherit any background properties. It does inherit the 'display'
+ // property (very important that it does)
nsIStyleContext* wrappedPseudoStyle;
wrappedPseudoStyle = aPresContext->ResolvePseudoStyleContextFor
- (aContent, nsHTMLAtoms::columnPseudo,
+ (aContent, nsHTMLAtoms::wrappedFramePseudo,
scrolledPseudoStyle);
NS_RELEASE(scrolledPseudoStyle);
aParentFrame = wrapperFrame;
diff --git a/layout/style/ua.css b/layout/style/ua.css
index 24264c74cdb3..1f02f2d8444e 100644
--- a/layout/style/ua.css
+++ b/layout/style/ua.css
@@ -499,6 +499,10 @@ NOFRAMES {
display: inherit;
}
+:WRAPPED-FRAME {
+ display: inherit;
+}
+
:XML-ROOT {
background-color: inherit;
}