From 9a1b473bd85e65a9e651cf99da78d4f2dfccee72 Mon Sep 17 00:00:00 2001 From: "jst%netscape.com" Date: Tue, 9 Jan 2001 03:30:23 +0000 Subject: [PATCH] CVS removing old files that are no longer part of the build. git-svn-id: svn://10.0.0.236/trunk@84636 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xml/content/src/nsGenericXMLElement.cpp | 207 ------------------ .../xml/content/src/nsGenericXMLElement.h | 99 --------- 2 files changed, 306 deletions(-) delete mode 100644 mozilla/layout/xml/content/src/nsGenericXMLElement.cpp delete mode 100644 mozilla/layout/xml/content/src/nsGenericXMLElement.h diff --git a/mozilla/layout/xml/content/src/nsGenericXMLElement.cpp b/mozilla/layout/xml/content/src/nsGenericXMLElement.cpp deleted file mode 100644 index fdfb32ccd9f..00000000000 --- a/mozilla/layout/xml/content/src/nsGenericXMLElement.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * Peter Annema - */ -#include "nsGenericXMLElement.h" - -#include "nsIAtom.h" -#include "nsINodeInfo.h" -#include "nsIDocument.h" -#include "nsIDOMAttr.h" -#include "nsIDOMNamedNodeMap.h" -#include "nsIDOMNodeList.h" -#include "nsIDOMDocument.h" -#include "nsIDOMDocumentFragment.h" -#include "nsIDOMRange.h" -#include "nsRange.h" -#include "nsIScriptGlobalObject.h" -#include "nsIScriptObjectOwner.h" -#include "nsISizeOfHandler.h" -#include "nsISupportsArray.h" -#include "nsIURL.h" -#include "nsFrame.h" -#include "nsIPresShell.h" -#include "nsIView.h" -#include "nsIViewManager.h" -#include "nsString.h" -#include "nsDOMCID.h" -#include "nsIServiceManager.h" -#include "nsIDOMScriptObjectFactory.h" -#include "nsINameSpaceManager.h" -#include "nsLayoutAtoms.h" -#include "prprf.h" -#include "prmem.h" - -#include "nsIDOMCSSStyleDeclaration.h" -#include "nsIDOMViewCSS.h" -#include "nsIXBLService.h" -#include "nsIBindingManager.h" -#include "nsIXBLBinding.h" - -class nsIWebShell; - - -nsGenericXMLElement::nsGenericXMLElement() -{ - mNameSpace = nsnull; -} - -nsGenericXMLElement::~nsGenericXMLElement() -{ - NS_IF_RELEASE(mNameSpace); -} - -nsresult -nsGenericXMLElement::CopyInnerTo(nsIContent* aSrcContent, - nsGenericXMLElement* aDst, - PRBool aDeep) -{ - nsresult result = nsGenericContainerElement::CopyInnerTo(aSrcContent, aDst, aDeep); - if (NS_OK == result) { - aDst->mNameSpace = mNameSpace; - NS_IF_ADDREF(mNameSpace); - } - return NS_OK; -} - - nsresult GetNodeName(nsAWritableString& aNodeName); - nsresult GetLocalName(nsAWritableString& aLocalName); - -nsresult -nsGenericXMLElement::GetNodeName(nsAWritableString& aNodeName) -{ - return mNodeInfo->GetQualifiedName(aNodeName); -} - -nsresult -nsGenericXMLElement::GetLocalName(nsAWritableString& aLocalName) -{ - return mNodeInfo->GetLocalName(aLocalName); -} - -nsresult -nsGenericXMLElement::GetScriptObject(nsIScriptContext* aContext, - void** aScriptObject) -{ - nsresult res = NS_OK; - - // XXX Yuck! Reaching into the generic content object isn't good. - nsDOMSlots *slots = GetDOMSlots(); - if (nsnull == slots->mScriptObject) { - nsIDOMScriptObjectFactory *factory; - - res = nsGenericElement::GetScriptObjectFactory(&factory); - if (NS_OK != res) { - return res; - } - - nsAutoString tag; - mNodeInfo->GetQualifiedName(tag); - - res = factory->NewScriptXMLElement(tag, aContext, mContent, - mParent, (void**)&slots->mScriptObject); - NS_RELEASE(factory); - - if (nsnull != mDocument) { - aContext->AddNamedReference((void *)&slots->mScriptObject, - slots->mScriptObject, - "nsGenericXMLElement::mScriptObject"); - - // See if we have a frame. - nsCOMPtr shell = getter_AddRefs(mDocument->GetShellAt(0)); - if (shell) { - nsIFrame* frame; - shell->GetPrimaryFrameFor(mContent, &frame); - if (!frame) { - // We must ensure that the XBL Binding is installed before we hand - // back this object. - nsCOMPtr bindingManager; - mDocument->GetBindingManager(getter_AddRefs(bindingManager)); - nsCOMPtr binding; - bindingManager->GetBinding(mContent, getter_AddRefs(binding)); - if (!binding) { - nsCOMPtr global; - mDocument->GetScriptGlobalObject(getter_AddRefs(global)); - nsCOMPtr viewCSS(do_QueryInterface(global)); - if (viewCSS) { - nsCOMPtr cssDecl; - nsAutoString empty; - nsCOMPtr elt(do_QueryInterface(mContent)); - viewCSS->GetComputedStyle(elt, empty, getter_AddRefs(cssDecl)); - if (cssDecl) { - nsAutoString behavior; behavior.AssignWithConversion("-moz-binding"); - nsAutoString value; - cssDecl->GetPropertyValue(behavior, value); - if (!value.IsEmpty()) { - // We have a binding that must be installed. - nsresult rv; - PRBool dummy; - NS_WITH_SERVICE(nsIXBLService, xblService, "@mozilla.org/xbl;1", &rv); - xblService->LoadBindings(mContent, value, PR_FALSE, getter_AddRefs(binding), &dummy); - if (binding) { - binding->ExecuteAttachedHandler(); - } - } - } - } - } - } - } - } - } - - *aScriptObject = slots->mScriptObject; - return res; -} - -nsresult -nsGenericXMLElement::GetNameSpaceID(PRInt32& aNameSpaceID) const -{ - return mNodeInfo->GetNamespaceID(aNameSpaceID); -} - -nsresult -nsGenericXMLElement::MaybeTriggerAutoLink(nsIWebShell *aShell) -{ - // Implement in subclass - return NS_ERROR_NOT_IMPLEMENTED; -} - -nsresult -nsGenericXMLElement::SetContainingNameSpace(nsINameSpace* aNameSpace) -{ - NS_IF_RELEASE(mNameSpace); - - mNameSpace = aNameSpace; - - NS_IF_ADDREF(mNameSpace); - - return NS_OK; -} - -nsresult -nsGenericXMLElement::GetContainingNameSpace(nsINameSpace*& aNameSpace) const -{ - aNameSpace = mNameSpace; - NS_IF_ADDREF(aNameSpace); - - return NS_OK; -} diff --git a/mozilla/layout/xml/content/src/nsGenericXMLElement.h b/mozilla/layout/xml/content/src/nsGenericXMLElement.h deleted file mode 100644 index 1828d1adfdc..00000000000 --- a/mozilla/layout/xml/content/src/nsGenericXMLElement.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * - * The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * Peter Annema - */ -#ifndef nsGenericXMLElement_h___ -#define nsGenericXMLElement_h___ - -#include "nsGenericElement.h" -#include "nsIDOMHTMLElement.h" -#include "nsIContent.h" -#include "nsVoidArray.h" -#include "nsIJSScriptObject.h" -#include "nsINameSpaceManager.h" // for kNameSpaceID_HTML -#include "nsINameSpace.h" - -class nsIWebShell; - -class nsGenericXMLElement : public nsGenericContainerElement { -public: - nsGenericXMLElement(); - ~nsGenericXMLElement(); - - nsresult CopyInnerTo(nsIContent* aSrcContent, - nsGenericXMLElement* aDest, - PRBool aDeep); - - nsresult GetNodeName(nsAWritableString& aNodeName); - nsresult GetLocalName(nsAWritableString& aLocalName); - - // Implementation for nsIDOMElement - nsresult GetAttribute(const nsAReadableString& aName, nsAWritableString& aReturn) - { - return nsGenericContainerElement::GetAttribute(aName, aReturn); - } - nsresult SetAttribute(const nsAReadableString& aName, const nsAReadableString& aValue) - { - return nsGenericContainerElement::SetAttribute(aName, aValue); - } - - // nsIContent - nsresult SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, - const nsAReadableString& aValue, - PRBool aNotify) - { - return nsGenericContainerElement::SetAttribute(aNameSpaceID, aName, - aValue, aNotify); - } - nsresult SetAttribute(nsINodeInfo *aNodeInfo, - const nsAReadableString& aValue, - PRBool aNotify) - { - return nsGenericContainerElement::SetAttribute(aNodeInfo, aValue, aNotify); - } - nsresult GetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, - nsAWritableString& aResult) const - { - return nsGenericContainerElement::GetAttribute(aNameSpaceID, aName, - aResult); - } - nsresult GetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, - nsIAtom*& aPrefix, nsAWritableString& aResult) const - { - return nsGenericContainerElement::GetAttribute(aNameSpaceID, aName, - aPrefix, aResult); - } - - // nsIXMLContent - nsresult SetContainingNameSpace(nsINameSpace* aNameSpace); - nsresult GetContainingNameSpace(nsINameSpace*& aNameSpace) const; - - nsresult GetNameSpaceID(PRInt32& aNameSpaceID) const; - nsresult MaybeTriggerAutoLink(nsIWebShell *aShell); - - // nsIScriptObjectOwner - nsresult GetScriptObject(nsIScriptContext* aContext, - void** aScriptObject); - - nsINameSpace* mNameSpace; -}; - -#endif /* nsGenericXMLElement_h__ */