diff --git a/mozilla/content/base/public/nsINodeInfo.h b/mozilla/content/base/public/nsINodeInfo.h index c4981951005..b0c61dc5a40 100644 --- a/mozilla/content/base/public/nsINodeInfo.h +++ b/mozilla/content/base/public/nsINodeInfo.h @@ -59,7 +59,7 @@ #include "nsISupports.h" #include "nsIAtom.h" #include "nsAString.h" -#include "domstubs.h" +#include "nsDOMString.h" #include "nsINameSpaceManager.h" #include "nsCOMPtr.h" #include "nsCOMArray.h" diff --git a/mozilla/content/base/src/nsAttrName.h b/mozilla/content/base/src/nsAttrName.h index cc314bc5c4d..d858bd9d5c6 100644 --- a/mozilla/content/base/src/nsAttrName.h +++ b/mozilla/content/base/src/nsAttrName.h @@ -41,6 +41,7 @@ #include "nsINodeInfo.h" #include "nsIAtom.h" +#include "nsDOMString.h" typedef unsigned long PtrBits; diff --git a/mozilla/content/base/src/nsContentUtils.cpp b/mozilla/content/base/src/nsContentUtils.cpp index 2ded2fc1d78..509a59d5d83 100644 --- a/mozilla/content/base/src/nsContentUtils.cpp +++ b/mozilla/content/base/src/nsContentUtils.cpp @@ -83,6 +83,7 @@ #include "imgILoader.h" #include "nsILoadGroup.h" #include "nsContentPolicyUtils.h" +#include "nsDOMString.h" static const char kJSStackContractID[] = "@mozilla.org/js/xpc/ContextStack;1"; static NS_DEFINE_IID(kParserServiceCID, NS_PARSERSERVICE_CID); diff --git a/mozilla/content/base/src/nsDOMAttribute.cpp b/mozilla/content/base/src/nsDOMAttribute.cpp index 3cc4b82f9dc..b5106b2a8e0 100644 --- a/mozilla/content/base/src/nsDOMAttribute.cpp +++ b/mozilla/content/base/src/nsDOMAttribute.cpp @@ -44,7 +44,7 @@ #include "nsDOMError.h" #include "nsContentUtils.h" #include "nsUnicharUtils.h" - +#include "nsDOMString.h" //---------------------------------------------------------------------- diff --git a/mozilla/content/base/src/nsDOMDocumentType.cpp b/mozilla/content/base/src/nsDOMDocumentType.cpp index e5330a5acab..05627c4fff5 100644 --- a/mozilla/content/base/src/nsDOMDocumentType.cpp +++ b/mozilla/content/base/src/nsDOMDocumentType.cpp @@ -42,6 +42,7 @@ #include "nsLayoutAtoms.h" #include "nsCOMPtr.h" #include "nsContentUtils.h" +#include "nsDOMString.h" #include "nsIDOM3Node.h" nsresult diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 38b0a86feca..3fd12f1769e 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -65,6 +65,7 @@ #include "nsIDOMEventGroup.h" #include "nsIDOMCDATASection.h" #include "nsIDOMProcessingInstruction.h" +#include "nsDOMString.h" #include "nsRange.h" #include "nsIDOMText.h" diff --git a/mozilla/content/base/src/nsDocumentFragment.cpp b/mozilla/content/base/src/nsDocumentFragment.cpp index 8d9b6579838..eda6ff53a1c 100644 --- a/mozilla/content/base/src/nsDocumentFragment.cpp +++ b/mozilla/content/base/src/nsDocumentFragment.cpp @@ -48,7 +48,7 @@ #include "nsDOMError.h" #include "nsIDOM3Node.h" #include "nsLayoutAtoms.h" - +#include "nsDOMString.h" class nsDocumentFragment : public nsGenericElement, public nsIDocumentFragment, diff --git a/mozilla/content/base/src/nsGenericDOMDataNode.cpp b/mozilla/content/base/src/nsGenericDOMDataNode.cpp index a18103811c9..7c0ca069714 100644 --- a/mozilla/content/base/src/nsGenericDOMDataNode.cpp +++ b/mozilla/content/base/src/nsGenericDOMDataNode.cpp @@ -53,6 +53,7 @@ #include "nsIDOMEvent.h" #include "nsIDOMText.h" #include "nsCOMPtr.h" +#include "nsDOMString.h" #include "pldhash.h" #include "prprf.h" diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp index ca76675e75b..9b70e0e3fd9 100644 --- a/mozilla/content/base/src/nsGenericElement.cpp +++ b/mozilla/content/base/src/nsGenericElement.cpp @@ -74,6 +74,7 @@ #include "nsINameSpaceManager.h" #include "nsContentList.h" #include "nsDOMError.h" +#include "nsDOMString.h" #include "nsIScriptSecurityManager.h" #include "nsIDOMMutationEvent.h" #include "nsMutationEvent.h" diff --git a/mozilla/content/base/src/nsNodeInfo.cpp b/mozilla/content/base/src/nsNodeInfo.cpp index 9f31625d953..6b0e7a187da 100644 --- a/mozilla/content/base/src/nsNodeInfo.cpp +++ b/mozilla/content/base/src/nsNodeInfo.cpp @@ -42,7 +42,7 @@ #include "nsCOMPtr.h" #include "nsString.h" #include "nsIAtom.h" -#include "domstubs.h" // for SetDOMStringToNull(); +#include "nsDOMString.h" #include "nsCRT.h" #include "nsContentUtils.h" #include "nsReadableUtils.h" diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 2dfada56d18..2b846dd3a0f 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -65,6 +65,7 @@ #include "nsIDOMDocumentType.h" #include "nsIDOMWindowInternal.h" #include "nsIDOMHTMLFormElement.h" +#include "nsDOMString.h" #include "nsIStreamListener.h" #include "nsIURI.h" #include "nsIIOService.h" diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp index ee0be0db0c4..6c5f3726f31 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp @@ -42,6 +42,7 @@ #include "nsComputedDOMStyle.h" #include "nsDOMError.h" +#include "nsDOMString.h" #include "nsIDOMCSS2Properties.h" #include "nsIDOMElement.h" #include "nsStyleContext.h" diff --git a/mozilla/content/xul/content/src/nsXULElement.cpp b/mozilla/content/xul/content/src/nsXULElement.cpp index fd3a8b577e1..de93cc0a07e 100644 --- a/mozilla/content/xul/content/src/nsXULElement.cpp +++ b/mozilla/content/xul/content/src/nsXULElement.cpp @@ -54,6 +54,7 @@ #include "nsCOMPtr.h" #include "nsDOMCID.h" #include "nsDOMError.h" +#include "nsDOMString.h" #include "nsIDOMEvent.h" #include "nsIPrivateDOMEvent.h" #include "nsHashtable.h" diff --git a/mozilla/dom/public/Makefile.in b/mozilla/dom/public/Makefile.in index 6bdda10879a..daa5bfb2b19 100644 --- a/mozilla/dom/public/Makefile.in +++ b/mozilla/dom/public/Makefile.in @@ -49,6 +49,7 @@ EXPORTS=nsIScriptContext.h \ nsIJSEventListener.h \ nsIDOMClassInfo.h \ nsIBaseDOMException.h \ + nsDOMString.h \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/mozilla/dom/public/idl/base/domstubs.idl b/mozilla/dom/public/idl/base/domstubs.idl index ccc589e872b..0287350c805 100644 --- a/mozilla/dom/public/idl/base/domstubs.idl +++ b/mozilla/dom/public/idl/base/domstubs.idl @@ -40,23 +40,6 @@ #include "nsISupports.idl" -%{ C++ -#include "nsAString.h" - -inline PRBool DOMStringIsNull(const nsAString& aString) -{ - return aString.IsVoid(); -} - -inline void SetDOMStringToNull(nsAString& aString) -{ - aString.Truncate(); - aString.SetIsVoid(PR_TRUE); -} - -%} - - typedef unsigned long long DOMTimeStamp; // Core diff --git a/mozilla/dom/public/nsDOMString.h b/mozilla/dom/public/nsDOMString.h new file mode 100644 index 00000000000..a3e91af2512 --- /dev/null +++ b/mozilla/dom/public/nsDOMString.h @@ -0,0 +1,55 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla 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/MPL/ + * + * 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.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Marco Pesenti Gritti + * + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsDOMString_h___ +#define nsDOMString_h___ + +#include "nsAString.h" + +inline PRBool DOMStringIsNull(const nsAString& aString) +{ + return aString.IsVoid(); +} + +inline void SetDOMStringToNull(nsAString& aString) +{ + aString.SetIsVoid(PR_TRUE); +} + +#endif /* nsDOMString_h___ */ diff --git a/mozilla/dom/src/base/nsGlobalWindow.cpp b/mozilla/dom/src/base/nsGlobalWindow.cpp index 44773e33696..0f260f1c276 100644 --- a/mozilla/dom/src/base/nsGlobalWindow.cpp +++ b/mozilla/dom/src/base/nsGlobalWindow.cpp @@ -90,6 +90,7 @@ #include "nsIDOMEvent.h" #include "nsIDOMPopupBlockedEvent.h" #include "nsIDOMPkcs11.h" +#include "nsDOMString.h" #include "nsIEmbeddingSiteWindow2.h" #include "nsIEventQueueService.h" #include "nsIEventStateManager.h" diff --git a/mozilla/extensions/transformiix/source/xpath/nsXPath1Scheme.cpp b/mozilla/extensions/transformiix/source/xpath/nsXPath1Scheme.cpp index c1a9f343b16..94d1b2241a4 100755 --- a/mozilla/extensions/transformiix/source/xpath/nsXPath1Scheme.cpp +++ b/mozilla/extensions/transformiix/source/xpath/nsXPath1Scheme.cpp @@ -52,6 +52,7 @@ #include "nsIDOMDocument.h" #include "nsIDOMXPathNSResolver.h" #include "nsIDOMRange.h" +#include "nsDOMString.h" #include "nsIModifyableXPointer.h" #include "nsAutoPtr.h" #include "nsString.h" diff --git a/mozilla/extensions/transformiix/source/xpath/nsXPathEvaluator.cpp b/mozilla/extensions/transformiix/source/xpath/nsXPathEvaluator.cpp index da11aa0eacd..4bf7eeb91dd 100644 --- a/mozilla/extensions/transformiix/source/xpath/nsXPathEvaluator.cpp +++ b/mozilla/extensions/transformiix/source/xpath/nsXPathEvaluator.cpp @@ -51,6 +51,7 @@ #include "txURIUtils.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" +#include "nsDOMString.h" extern nsINameSpaceManager* gTxNameSpaceManager; diff --git a/mozilla/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp b/mozilla/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp index 73b3e918c03..16c05337971 100644 --- a/mozilla/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp +++ b/mozilla/extensions/transformiix/source/xpath/nsXPathNSResolver.cpp @@ -39,6 +39,7 @@ #include "nsXPathNSResolver.h" #include "nsIDOMClassInfo.h" +#include "nsDOMString.h" NS_IMPL_ADDREF(nsXPathNSResolver) NS_IMPL_RELEASE(nsXPathNSResolver) diff --git a/mozilla/extensions/transformiix/source/xpath/nsXPathResult.cpp b/mozilla/extensions/transformiix/source/xpath/nsXPathResult.cpp index fa01642cbe0..075b0980cc8 100644 --- a/mozilla/extensions/transformiix/source/xpath/nsXPathResult.cpp +++ b/mozilla/extensions/transformiix/source/xpath/nsXPathResult.cpp @@ -46,6 +46,7 @@ #include "nsIDOMNode.h" #include "nsXPathException.h" #include "nsIDOMDocument.h" +#include "nsDOMString.h" nsXPathResult::nsXPathResult() : mNumberValue(0), mDocument(0), diff --git a/mozilla/layout/style/nsComputedDOMStyle.cpp b/mozilla/layout/style/nsComputedDOMStyle.cpp index ee0be0db0c4..6c5f3726f31 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.cpp +++ b/mozilla/layout/style/nsComputedDOMStyle.cpp @@ -42,6 +42,7 @@ #include "nsComputedDOMStyle.h" #include "nsDOMError.h" +#include "nsDOMString.h" #include "nsIDOMCSS2Properties.h" #include "nsIDOMElement.h" #include "nsStyleContext.h"