From 075228bc9fc46f142cfce2c12e712fae51cf1607 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Mon, 20 Sep 1999 07:33:25 +0000 Subject: [PATCH] Ok, so hyatt has a better way to do his frame hack. whatever. --- rdf/content/src/nsRDFXULBuilder.cpp | 36 +---------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/rdf/content/src/nsRDFXULBuilder.cpp b/rdf/content/src/nsRDFXULBuilder.cpp index dd7c5f828514..bd8af3146f8c 100644 --- a/rdf/content/src/nsRDFXULBuilder.cpp +++ b/rdf/content/src/nsRDFXULBuilder.cpp @@ -147,8 +147,6 @@ private: static PRInt32 kNameSpaceID_XUL; static nsIAtom* kDataSourcesAtom; - static nsIAtom* kFrameAtom; - static nsIAtom* kIFrameAtom; static nsIAtom* kIdAtom; static nsIAtom* kKeysetAtom; static nsIAtom* kRefAtom; @@ -219,9 +217,6 @@ public: PRBool IsHTMLElement(nsIContent* aElement); - PRBool - IsHTMLFrame(nsIContent* aElement); - PRBool IsAttributeProperty(nsIRDFResource* aProperty); @@ -247,8 +242,6 @@ PRInt32 RDFXULBuilderImpl::kNameSpaceID_RDF = kNameSpaceID_Unknown; PRInt32 RDFXULBuilderImpl::kNameSpaceID_XUL = kNameSpaceID_Unknown; nsIAtom* RDFXULBuilderImpl::kDataSourcesAtom; -nsIAtom* RDFXULBuilderImpl::kFrameAtom; -nsIAtom* RDFXULBuilderImpl::kIFrameAtom; nsIAtom* RDFXULBuilderImpl::kIdAtom; nsIAtom* RDFXULBuilderImpl::kKeysetAtom; nsIAtom* RDFXULBuilderImpl::kRefAtom; @@ -315,8 +308,6 @@ RDFXULBuilderImpl::Init() if (NS_FAILED(rv)) return rv; kDataSourcesAtom = NS_NewAtom("datasources"); - kFrameAtom = NS_NewAtom("frame"); - kIFrameAtom = NS_NewAtom("iframe"); kIdAtom = NS_NewAtom("id"); kKeysetAtom = NS_NewAtom("keyset"); kRefAtom = NS_NewAtom("ref"); @@ -392,8 +383,6 @@ RDFXULBuilderImpl::~RDFXULBuilderImpl(void) NS_IF_RELEASE(kXUL_tag); NS_IF_RELEASE(kDataSourcesAtom); - NS_IF_RELEASE(kFrameAtom); - NS_IF_RELEASE(kIFrameAtom); NS_IF_RELEASE(kIdAtom); NS_IF_RELEASE(kKeysetAtom); NS_IF_RELEASE(kRefAtom); @@ -854,7 +843,7 @@ RDFXULBuilderImpl::CreateHTMLElement(nsINameSpace* aContainingNameSpace, rv = gRDFService->IsAnonymousResource(aResource, &isAnonymous); if (NS_FAILED(rv)) return rv; - if (!isAnonymous || aForceIDAttr || IsHTMLFrame(element)) { + if (!isAnonymous || aForceIDAttr) { // Set the 'id' attribute. We set the 'id' attribute on // any content that either: // @@ -865,10 +854,6 @@ RDFXULBuilderImpl::CreateHTMLElement(nsINameSpace* aContainingNameSpace, // - because we need this to maintain partial construction // state in the nsRDFGenericBuilder. // - // 3) is an html:frame or html:iframe - // - because this is a hack of a way to get context menus - // to forward right click events to the right webshell. - // nsXPIDLCString uri; rv = aResource->GetValue( getter_Copies(uri) ); if (NS_FAILED(rv)) return rv; @@ -1152,25 +1137,6 @@ RDFXULBuilderImpl::IsHTMLElement(nsIContent* aElement) } -PRBool -RDFXULBuilderImpl::IsHTMLFrame(nsIContent* aElement) -{ - nsresult rv; - - PRInt32 nameSpaceID; - rv = aElement->GetNameSpaceID(nameSpaceID); - if (NS_SUCCEEDED(rv) && (kNameSpaceID_HTML == nameSpaceID)) { - nsCOMPtr tag; - rv = aElement->GetTag(*getter_AddRefs(tag)); - if (NS_SUCCEEDED(rv) && ((tag.get() == kFrameAtom) || (tag.get() == kIFrameAtom))) { - return PR_TRUE; - } - } - - return PR_FALSE; -} - - PRBool RDFXULBuilderImpl::IsAttributeProperty(nsIRDFResource* aProperty) {