From 021ed0f162806299bcb275487cec32923efc83e9 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Fri, 20 Nov 1998 23:27:59 +0000 Subject: [PATCH] Added nsHTMLAtoms::wrappedFramePseudo and changed ConstructFrame() to use it instead of nsHTMLAtoms::columnPseudo git-svn-id: svn://10.0.0.236/trunk@15068 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/content/src/nsHTMLAtoms.cpp | 3 +++ mozilla/content/html/content/src/nsHTMLAtoms.h | 1 + mozilla/content/html/style/src/nsHTMLStyleSheet.cpp | 6 +++--- mozilla/content/shared/public/nsHTMLAtoms.h | 1 + mozilla/content/shared/src/nsHTMLAtoms.cpp | 3 +++ mozilla/layout/html/base/src/nsHTMLAtoms.cpp | 3 +++ mozilla/layout/html/base/src/nsHTMLAtoms.h | 1 + mozilla/layout/html/document/src/ua.css | 4 ++++ mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp | 6 +++--- mozilla/layout/style/nsHTMLStyleSheet.cpp | 6 +++--- mozilla/layout/style/ua.css | 4 ++++ 11 files changed, 29 insertions(+), 9 deletions(-) diff --git a/mozilla/content/html/content/src/nsHTMLAtoms.cpp b/mozilla/content/html/content/src/nsHTMLAtoms.cpp index b7df5829555..44b064b164c 100644 --- a/mozilla/content/html/content/src/nsHTMLAtoms.cpp +++ b/mozilla/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/mozilla/content/html/content/src/nsHTMLAtoms.h b/mozilla/content/html/content/src/nsHTMLAtoms.h index 0b9af734b43..e6c25c659f2 100644 --- a/mozilla/content/html/content/src/nsHTMLAtoms.h +++ b/mozilla/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/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp index d5c2cf13e9a..ca638ccc870 100644 --- a/mozilla/content/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/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/mozilla/content/shared/public/nsHTMLAtoms.h b/mozilla/content/shared/public/nsHTMLAtoms.h index 0b9af734b43..e6c25c659f2 100644 --- a/mozilla/content/shared/public/nsHTMLAtoms.h +++ b/mozilla/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/mozilla/content/shared/src/nsHTMLAtoms.cpp b/mozilla/content/shared/src/nsHTMLAtoms.cpp index b7df5829555..44b064b164c 100644 --- a/mozilla/content/shared/src/nsHTMLAtoms.cpp +++ b/mozilla/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/mozilla/layout/html/base/src/nsHTMLAtoms.cpp b/mozilla/layout/html/base/src/nsHTMLAtoms.cpp index b7df5829555..44b064b164c 100644 --- a/mozilla/layout/html/base/src/nsHTMLAtoms.cpp +++ b/mozilla/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/mozilla/layout/html/base/src/nsHTMLAtoms.h b/mozilla/layout/html/base/src/nsHTMLAtoms.h index 0b9af734b43..e6c25c659f2 100644 --- a/mozilla/layout/html/base/src/nsHTMLAtoms.h +++ b/mozilla/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/mozilla/layout/html/document/src/ua.css b/mozilla/layout/html/document/src/ua.css index 24264c74cdb..1f02f2d8444 100644 --- a/mozilla/layout/html/document/src/ua.css +++ b/mozilla/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/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp b/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp index d5c2cf13e9a..ca638ccc870 100644 --- a/mozilla/layout/html/style/src/nsHTMLStyleSheet.cpp +++ b/mozilla/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/mozilla/layout/style/nsHTMLStyleSheet.cpp b/mozilla/layout/style/nsHTMLStyleSheet.cpp index d5c2cf13e9a..ca638ccc870 100644 --- a/mozilla/layout/style/nsHTMLStyleSheet.cpp +++ b/mozilla/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/mozilla/layout/style/ua.css b/mozilla/layout/style/ua.css index 24264c74cdb..1f02f2d8444 100644 --- a/mozilla/layout/style/ua.css +++ b/mozilla/layout/style/ua.css @@ -499,6 +499,10 @@ NOFRAMES { display: inherit; } +:WRAPPED-FRAME { + display: inherit; +} + :XML-ROOT { background-color: inherit; }