Bug 481102 - Reorganize dom/public, dom/public/base, and dom/src/base to dom/base, r+sr=jst
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 11 Mar 2009 10:10:19 -0400
changeset 26043 d4f0e362a0a53f1aa50d43ef09a7a274286be3a0
parent 26042 863c5c397e3b83288a1c2d1f5554781efa70e189
child 26044 39ce9c1e4b56758981b94ae2ffbab10a149fa27c
push idunknown
push userunknown
push dateunknown
bugs481102
milestone1.9.2a1pre
Bug 481102 - Reorganize dom/public, dom/public/base, and dom/src/base to dom/base, r+sr=jst
content/base/src/Makefile.in
content/events/src/Makefile.in
content/html/document/src/Makefile.in
content/xbl/src/Makefile.in
content/xml/document/src/Makefile.in
dom/Makefile.in
dom/base/Makefile.in
dom/base/crashtests/244933-1.html
dom/base/crashtests/275912-1.html
dom/base/crashtests/327571-1.html
dom/base/crashtests/327695-1.html
dom/base/crashtests/329481-1.xhtml
dom/base/crashtests/338674-1.xhtml
dom/base/crashtests/346381-1.html
dom/base/crashtests/359432-1.xhtml
dom/base/crashtests/369413-1.html
dom/base/crashtests/372554-1.html
dom/base/crashtests/404869-1.xul
dom/base/crashtests/439206-1.html
dom/base/crashtests/462947.html
dom/base/crashtests/473284.xul
dom/base/crashtests/90613-1.html
dom/base/crashtests/crashtests.list
dom/base/domerr.msg
dom/base/nsBarProps.cpp
dom/base/nsBarProps.h
dom/base/nsDOMCID.h
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfo.h
dom/base/nsDOMClassInfoID.h
dom/base/nsDOMError.h
dom/base/nsDOMException.cpp
dom/base/nsDOMException.h
dom/base/nsDOMJSUtils.h
dom/base/nsDOMScriptObjectFactory.cpp
dom/base/nsDOMScriptObjectFactory.h
dom/base/nsDOMScriptObjectHolder.h
dom/base/nsDOMString.h
dom/base/nsDOMWindowList.cpp
dom/base/nsDOMWindowList.h
dom/base/nsDOMWindowUtils.cpp
dom/base/nsDOMWindowUtils.h
dom/base/nsFocusController.cpp
dom/base/nsFocusController.h
dom/base/nsGlobalWindow.cpp
dom/base/nsGlobalWindow.h
dom/base/nsGlobalWindowCommands.cpp
dom/base/nsGlobalWindowCommands.h
dom/base/nsHistory.cpp
dom/base/nsHistory.h
dom/base/nsIBaseDOMException.h
dom/base/nsIDOMClassInfo.h
dom/base/nsIDOMScriptObjectFactory.h
dom/base/nsIEntropyCollector.idl
dom/base/nsIFocusController.h
dom/base/nsIJSEventListener.h
dom/base/nsIJSNativeInitializer.h
dom/base/nsIScriptChannel.idl
dom/base/nsIScriptContext.h
dom/base/nsIScriptExternalNameSet.h
dom/base/nsIScriptGlobalObject.h
dom/base/nsIScriptGlobalObjectOwner.h
dom/base/nsIScriptNameSpaceManager.h
dom/base/nsIScriptObjectOwner.h
dom/base/nsIScriptObjectPrincipal.h
dom/base/nsIScriptRuntime.h
dom/base/nsIScriptTimeoutHandler.h
dom/base/nsJSEnvironment.cpp
dom/base/nsJSEnvironment.h
dom/base/nsJSTimeoutHandler.cpp
dom/base/nsJSUtils.cpp
dom/base/nsJSUtils.h
dom/base/nsLocation.cpp
dom/base/nsMimeTypeArray.cpp
dom/base/nsMimeTypeArray.h
dom/base/nsPIDOMWindow.h
dom/base/nsPIWindowRoot.h
dom/base/nsPluginArray.cpp
dom/base/nsPluginArray.h
dom/base/nsScreen.cpp
dom/base/nsScreen.h
dom/base/nsScriptNameSpaceManager.cpp
dom/base/nsScriptNameSpaceManager.h
dom/base/nsWindowRoot.cpp
dom/base/nsWindowRoot.h
dom/base/nsWrapperCache.h
dom/dom-config.mk
dom/public/Makefile.in
dom/public/base/Makefile.in
dom/public/base/nsIFocusController.h
dom/public/base/nsPIDOMWindow.h
dom/public/base/nsPIWindowRoot.h
dom/public/nsDOMCID.h
dom/public/nsDOMClassInfoID.h
dom/public/nsDOMError.h
dom/public/nsDOMJSUtils.h
dom/public/nsDOMScriptObjectHolder.h
dom/public/nsDOMString.h
dom/public/nsIBaseDOMException.h
dom/public/nsIDOMClassInfo.h
dom/public/nsIDOMScriptObjectFactory.h
dom/public/nsIEntropyCollector.idl
dom/public/nsIJSEventListener.h
dom/public/nsIJSNativeInitializer.h
dom/public/nsIScriptChannel.idl
dom/public/nsIScriptContext.h
dom/public/nsIScriptExternalNameSet.h
dom/public/nsIScriptGlobalObject.h
dom/public/nsIScriptGlobalObjectOwner.h
dom/public/nsIScriptNameSpaceManager.h
dom/public/nsIScriptObjectOwner.h
dom/public/nsIScriptObjectPrincipal.h
dom/public/nsIScriptRuntime.h
dom/public/nsIScriptTimeoutHandler.h
dom/public/nsWrapperCache.h
dom/src/Makefile.in
dom/src/base/Makefile.in
dom/src/base/crashtests/244933-1.html
dom/src/base/crashtests/275912-1.html
dom/src/base/crashtests/327571-1.html
dom/src/base/crashtests/327695-1.html
dom/src/base/crashtests/329481-1.xhtml
dom/src/base/crashtests/338674-1.xhtml
dom/src/base/crashtests/346381-1.html
dom/src/base/crashtests/359432-1.xhtml
dom/src/base/crashtests/369413-1.html
dom/src/base/crashtests/372554-1.html
dom/src/base/crashtests/404869-1.xul
dom/src/base/crashtests/439206-1.html
dom/src/base/crashtests/462947.html
dom/src/base/crashtests/473284.xul
dom/src/base/crashtests/90613-1.html
dom/src/base/crashtests/crashtests.list
dom/src/base/domerr.msg
dom/src/base/nsBarProps.cpp
dom/src/base/nsBarProps.h
dom/src/base/nsDOMClassInfo.cpp
dom/src/base/nsDOMClassInfo.h
dom/src/base/nsDOMException.cpp
dom/src/base/nsDOMException.h
dom/src/base/nsDOMScriptObjectFactory.cpp
dom/src/base/nsDOMScriptObjectFactory.h
dom/src/base/nsDOMWindowList.cpp
dom/src/base/nsDOMWindowList.h
dom/src/base/nsDOMWindowUtils.cpp
dom/src/base/nsDOMWindowUtils.h
dom/src/base/nsFocusController.cpp
dom/src/base/nsFocusController.h
dom/src/base/nsGlobalWindow.cpp
dom/src/base/nsGlobalWindow.h
dom/src/base/nsGlobalWindowCommands.cpp
dom/src/base/nsGlobalWindowCommands.h
dom/src/base/nsHistory.cpp
dom/src/base/nsHistory.h
dom/src/base/nsJSEnvironment.cpp
dom/src/base/nsJSEnvironment.h
dom/src/base/nsJSTimeoutHandler.cpp
dom/src/base/nsJSUtils.cpp
dom/src/base/nsJSUtils.h
dom/src/base/nsLocation.cpp
dom/src/base/nsMimeTypeArray.cpp
dom/src/base/nsMimeTypeArray.h
dom/src/base/nsPluginArray.cpp
dom/src/base/nsPluginArray.h
dom/src/base/nsScreen.cpp
dom/src/base/nsScreen.h
dom/src/base/nsScriptNameSpaceManager.cpp
dom/src/base/nsScriptNameSpaceManager.h
dom/src/base/nsWindowRoot.cpp
dom/src/base/nsWindowRoot.h
dom/src/events/Makefile.in
dom/src/geolocation/Makefile.in
dom/src/jsurl/Makefile.in
dom/src/offline/Makefile.in
dom/src/storage/Makefile.in
dom/src/threads/Makefile.in
layout/base/Makefile.in
layout/build/Makefile.in
layout/generic/Makefile.in
testing/crashtest/crashtests.list
toolkit/toolkit-makefiles.sh
--- a/content/base/src/Makefile.in
+++ b/content/base/src/Makefile.in
@@ -188,14 +188,14 @@ INCLUDES	+= \
 		-I$(srcdir)/../../xml/content/src \
 		-I$(srcdir)/../../xul/base/src \
 		-I$(srcdir)/../../xul/content/src \
 		-I$(srcdir)/../../html/content/src \
 		-I$(srcdir)/../../base/src \
 		-I$(srcdir)/../../xbl/src \
 		-I$(srcdir)/../../../layout/generic \
 		-I$(srcdir)/../../../layout/style \
-		-I$(srcdir)/../../../dom/src/base \
+		-I$(srcdir)/../../../dom/base \
 		-I$(srcdir)/../../xml/document/src \
 		-I$(topsrcdir)/xpcom/io \
 		$(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
--- a/content/events/src/Makefile.in
+++ b/content/events/src/Makefile.in
@@ -103,15 +103,15 @@ FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES	= \
              -I$(srcdir)/../../base/src \
              -I$(srcdir)/../../html/base/src \
              -I$(srcdir)/../../xul/content/src \
              -I$(srcdir)/../../xml/content/src \
-             -I$(srcdir)/../../../dom/src/base \
+             -I$(srcdir)/../../../dom/base \
              -I$(srcdir)/../../../layout/generic \
              -I$(srcdir)/../../../layout/xul/base/src \
              -I$(srcdir)/../../../layout/xul/base/src/tree/src \
              $(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
--- a/content/html/document/src/Makefile.in
+++ b/content/html/document/src/Makefile.in
@@ -102,12 +102,12 @@ FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= \
 		-I$(srcdir)/../../../base/src \
 		-I$(srcdir)/../../../events/src \
 		-I$(srcdir)/../../content/src \
 		-I$(srcdir)/../../../../layout/style \
-		-I$(srcdir)/../../../../dom/src/base \
+		-I$(srcdir)/../../../../dom/base \
 		$(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
--- a/content/xbl/src/Makefile.in
+++ b/content/xbl/src/Makefile.in
@@ -105,12 +105,12 @@ LOCAL_INCLUDES	= \
 		-I$(srcdir)/../../base/src \
 		-I$(srcdir)/../../html/base/src \
 		-I$(srcdir)/../../html/document/src \
 		-I$(srcdir)/../../xml/document/src \
 		-I$(srcdir)/../../xul/content/src \
 		-I$(srcdir)/../../xul/document/src \
 		-I$(srcdir)/../../events/src \
 		-I$(srcdir)/../../../layout/style \
-		-I$(srcdir)/../../../dom/src/base \
+		-I$(srcdir)/../../../dom/base \
 		$(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
--- a/content/xml/document/src/Makefile.in
+++ b/content/xml/document/src/Makefile.in
@@ -85,12 +85,12 @@ include $(topsrcdir)/config/rules.mk
 LOCAL_INCLUDES	= \
 		-I$(srcdir) \
 		-I$(srcdir)/../../../xsl/document/src \
 		-I$(srcdir)/../../../html/document/src \
 		-I$(srcdir)/../../../../layout/style \
 		-I$(srcdir)/../../../base/src \
 		-I$(srcdir)/../../../xul/content/src \
 		-I$(srcdir)/../../../events/src \
-		-I$(srcdir)/../../../../dom/src/base \
+		-I$(srcdir)/../../../../dom/base \
 		$(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
--- a/dom/Makefile.in
+++ b/dom/Makefile.in
@@ -70,16 +70,17 @@ ifdef MOZ_SVG
 DIRS += interfaces/svg
 endif
 
 ifdef MOZ_SMIL
 DIRS += interfaces/smil
 endif
 
 DIRS += \
-  public \
+  public/coreEvents \
+  base \
   src \
   locales \
   tests \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
rename from dom/src/base/Makefile.in
rename to dom/base/Makefile.in
--- a/dom/src/base/Makefile.in
+++ b/dom/base/Makefile.in
@@ -30,74 +30,59 @@
 # 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 *****
 
-DEPTH		= ../../..
+DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= dom
 LIBRARY_NAME	= jsdombase_s
 LIBXUL_LIBRARY	= 1
+FORCE_STATIC_LIB = 1
 
-REQUIRES	= xpcom \
-		  string \
-		  webbrwsr \
-		  commandhandler \
-		  js \
-		  widget \
-		  gfx \
-		  thebes \
-		  layout \
-		  content \
-		  caps \
-		  docshell \
-		  xpconnect \
-		  pref \
-		  oji \
-		  necko \
-		  nkcache \
-		  mimetype \
-		  java \
-		  locale \
-		  prefetch \
-		  xuldoc \
-		  webshell \
-		  view \
-		  uconv \
-		  shistory \
-		  plugin \
-		  windowwatcher \
-		  chardet \
-		  find \
-		  appshell \
-		  intl \
-		  unicharutil \
-		  rdf \
-		  xultmpl \
-		  jar \
-		  storage \
-		  htmlparser \
-		  $(NULL)
+XPIDLSRCS = \
+  nsIEntropyCollector.idl \
+  nsIScriptChannel.idl \
+  $(NULL)
 
-ifdef NS_TRACE_MALLOC
-REQUIRES	+= tracemalloc
-endif
-
-ifdef MOZ_JSDEBUGGER
-REQUIRES	+= jsdebug
-endif
+EXPORTS = \
+  nsDOMCID.h \
+  nsDOMClassInfoID.h \
+  nsDOMError.h \
+  nsDOMJSUtils.h \
+  nsDOMScriptObjectHolder.h \
+  nsDOMString.h \
+  nsIBaseDOMException.h \
+  nsIDOMClassInfo.h \
+  nsIDOMScriptObjectFactory.h \
+  nsIFocusController.h \
+  nsIJSEventListener.h \
+  nsIJSNativeInitializer.h \
+  nsIScriptContext.h	\
+  nsIScriptExternalNameSet.h \
+  nsIScriptGlobalObject.h \
+  nsIScriptGlobalObjectOwner.h \
+  nsIScriptNameSpaceManager.h \
+  nsIScriptObjectOwner.h \
+  nsIScriptObjectPrincipal.h \
+  nsIScriptRuntime.h \
+  nsIScriptTimeoutHandler.h \
+  nsPIDOMWindow.h \
+  nsPIWindowRoot.h \
+  nsWrapperCache.h \
+  $(NULL)
 
 CPPSRCS =			\
 	nsBarProps.cpp          \
 	nsDOMException.cpp 	\
 	nsDOMWindowUtils.cpp 	\
 	nsJSEnvironment.cpp	\
 	nsJSTimeoutHandler.cpp	\
 	nsFocusController.cpp	\
@@ -111,36 +96,17 @@ CPPSRCS =			\
 	nsMimeTypeArray.cpp	\
 	nsPluginArray.cpp	\
 	nsWindowRoot.cpp	\
 	nsDOMClassInfo.cpp	\
 	nsScriptNameSpaceManager.cpp \
 	nsDOMScriptObjectFactory.cpp \
 	$(NULL)
 
-# we don't want the shared lib, but we want to force the creation of a
-# static lib.
-FORCE_STATIC_LIB = 1
-
-LOCAL_INCLUDES = \
-		-I$(srcdir)/../events \
-		-I$(srcdir)/../storage \
-		-I$(srcdir)/../offline \
-		-I$(srcdir)/../geolocation \
-		-I$(srcdir)/../threads \
-		-I$(topsrcdir)/content/xbl/src \
-		-I$(topsrcdir)/content/xul/document/src \
-		-I$(topsrcdir)/content/events/src \
-		-I$(topsrcdir)/content/base/src \
-		-I$(topsrcdir)/content/html/document/src \
-		-I$(topsrcdir)/layout/style \
-		-I$(topsrcdir)/layout/xul/base/src/tree/src \
-		$(NULL)
-
-DEFINES += -D_IMPL_NS_LAYOUT
+include $(topsrcdir)/dom/dom-config.mk
 
 ifdef MOZ_JSDEBUGGER
 DEFINES += -DMOZ_JSDEBUGGER
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_X11
rename from dom/src/base/crashtests/244933-1.html
rename to dom/base/crashtests/244933-1.html
rename from dom/src/base/crashtests/275912-1.html
rename to dom/base/crashtests/275912-1.html
rename from dom/src/base/crashtests/327571-1.html
rename to dom/base/crashtests/327571-1.html
rename from dom/src/base/crashtests/327695-1.html
rename to dom/base/crashtests/327695-1.html
rename from dom/src/base/crashtests/329481-1.xhtml
rename to dom/base/crashtests/329481-1.xhtml
rename from dom/src/base/crashtests/338674-1.xhtml
rename to dom/base/crashtests/338674-1.xhtml
rename from dom/src/base/crashtests/346381-1.html
rename to dom/base/crashtests/346381-1.html
rename from dom/src/base/crashtests/359432-1.xhtml
rename to dom/base/crashtests/359432-1.xhtml
rename from dom/src/base/crashtests/369413-1.html
rename to dom/base/crashtests/369413-1.html
rename from dom/src/base/crashtests/372554-1.html
rename to dom/base/crashtests/372554-1.html
rename from dom/src/base/crashtests/404869-1.xul
rename to dom/base/crashtests/404869-1.xul
rename from dom/src/base/crashtests/439206-1.html
rename to dom/base/crashtests/439206-1.html
rename from dom/src/base/crashtests/462947.html
rename to dom/base/crashtests/462947.html
rename from dom/src/base/crashtests/473284.xul
rename to dom/base/crashtests/473284.xul
rename from dom/src/base/crashtests/90613-1.html
rename to dom/base/crashtests/90613-1.html
rename from dom/src/base/crashtests/crashtests.list
rename to dom/base/crashtests/crashtests.list
rename from dom/src/base/domerr.msg
rename to dom/base/domerr.msg
rename from dom/src/base/nsBarProps.cpp
rename to dom/base/nsBarProps.cpp
rename from dom/src/base/nsBarProps.h
rename to dom/base/nsBarProps.h
rename from dom/public/nsDOMCID.h
rename to dom/base/nsDOMCID.h
rename from dom/src/base/nsDOMClassInfo.cpp
rename to dom/base/nsDOMClassInfo.cpp
rename from dom/src/base/nsDOMClassInfo.h
rename to dom/base/nsDOMClassInfo.h
rename from dom/public/nsDOMClassInfoID.h
rename to dom/base/nsDOMClassInfoID.h
rename from dom/public/nsDOMError.h
rename to dom/base/nsDOMError.h
rename from dom/src/base/nsDOMException.cpp
rename to dom/base/nsDOMException.cpp
rename from dom/src/base/nsDOMException.h
rename to dom/base/nsDOMException.h
rename from dom/public/nsDOMJSUtils.h
rename to dom/base/nsDOMJSUtils.h
rename from dom/src/base/nsDOMScriptObjectFactory.cpp
rename to dom/base/nsDOMScriptObjectFactory.cpp
rename from dom/src/base/nsDOMScriptObjectFactory.h
rename to dom/base/nsDOMScriptObjectFactory.h
rename from dom/public/nsDOMScriptObjectHolder.h
rename to dom/base/nsDOMScriptObjectHolder.h
rename from dom/public/nsDOMString.h
rename to dom/base/nsDOMString.h
rename from dom/src/base/nsDOMWindowList.cpp
rename to dom/base/nsDOMWindowList.cpp
rename from dom/src/base/nsDOMWindowList.h
rename to dom/base/nsDOMWindowList.h
rename from dom/src/base/nsDOMWindowUtils.cpp
rename to dom/base/nsDOMWindowUtils.cpp
rename from dom/src/base/nsDOMWindowUtils.h
rename to dom/base/nsDOMWindowUtils.h
rename from dom/src/base/nsFocusController.cpp
rename to dom/base/nsFocusController.cpp
rename from dom/src/base/nsFocusController.h
rename to dom/base/nsFocusController.h
rename from dom/src/base/nsGlobalWindow.cpp
rename to dom/base/nsGlobalWindow.cpp
rename from dom/src/base/nsGlobalWindow.h
rename to dom/base/nsGlobalWindow.h
rename from dom/src/base/nsGlobalWindowCommands.cpp
rename to dom/base/nsGlobalWindowCommands.cpp
rename from dom/src/base/nsGlobalWindowCommands.h
rename to dom/base/nsGlobalWindowCommands.h
rename from dom/src/base/nsHistory.cpp
rename to dom/base/nsHistory.cpp
rename from dom/src/base/nsHistory.h
rename to dom/base/nsHistory.h
rename from dom/public/nsIBaseDOMException.h
rename to dom/base/nsIBaseDOMException.h
rename from dom/public/nsIDOMClassInfo.h
rename to dom/base/nsIDOMClassInfo.h
rename from dom/public/nsIDOMScriptObjectFactory.h
rename to dom/base/nsIDOMScriptObjectFactory.h
rename from dom/public/nsIEntropyCollector.idl
rename to dom/base/nsIEntropyCollector.idl
rename from dom/public/base/nsIFocusController.h
rename to dom/base/nsIFocusController.h
rename from dom/public/nsIJSEventListener.h
rename to dom/base/nsIJSEventListener.h
rename from dom/public/nsIJSNativeInitializer.h
rename to dom/base/nsIJSNativeInitializer.h
rename from dom/public/nsIScriptChannel.idl
rename to dom/base/nsIScriptChannel.idl
rename from dom/public/nsIScriptContext.h
rename to dom/base/nsIScriptContext.h
rename from dom/public/nsIScriptExternalNameSet.h
rename to dom/base/nsIScriptExternalNameSet.h
rename from dom/public/nsIScriptGlobalObject.h
rename to dom/base/nsIScriptGlobalObject.h
rename from dom/public/nsIScriptGlobalObjectOwner.h
rename to dom/base/nsIScriptGlobalObjectOwner.h
rename from dom/public/nsIScriptNameSpaceManager.h
rename to dom/base/nsIScriptNameSpaceManager.h
rename from dom/public/nsIScriptObjectOwner.h
rename to dom/base/nsIScriptObjectOwner.h
rename from dom/public/nsIScriptObjectPrincipal.h
rename to dom/base/nsIScriptObjectPrincipal.h
rename from dom/public/nsIScriptRuntime.h
rename to dom/base/nsIScriptRuntime.h
rename from dom/public/nsIScriptTimeoutHandler.h
rename to dom/base/nsIScriptTimeoutHandler.h
rename from dom/src/base/nsJSEnvironment.cpp
rename to dom/base/nsJSEnvironment.cpp
rename from dom/src/base/nsJSEnvironment.h
rename to dom/base/nsJSEnvironment.h
rename from dom/src/base/nsJSTimeoutHandler.cpp
rename to dom/base/nsJSTimeoutHandler.cpp
rename from dom/src/base/nsJSUtils.cpp
rename to dom/base/nsJSUtils.cpp
rename from dom/src/base/nsJSUtils.h
rename to dom/base/nsJSUtils.h
rename from dom/src/base/nsLocation.cpp
rename to dom/base/nsLocation.cpp
rename from dom/src/base/nsMimeTypeArray.cpp
rename to dom/base/nsMimeTypeArray.cpp
rename from dom/src/base/nsMimeTypeArray.h
rename to dom/base/nsMimeTypeArray.h
rename from dom/public/base/nsPIDOMWindow.h
rename to dom/base/nsPIDOMWindow.h
rename from dom/public/base/nsPIWindowRoot.h
rename to dom/base/nsPIWindowRoot.h
rename from dom/src/base/nsPluginArray.cpp
rename to dom/base/nsPluginArray.cpp
rename from dom/src/base/nsPluginArray.h
rename to dom/base/nsPluginArray.h
rename from dom/src/base/nsScreen.cpp
rename to dom/base/nsScreen.cpp
rename from dom/src/base/nsScreen.h
rename to dom/base/nsScreen.h
rename from dom/src/base/nsScriptNameSpaceManager.cpp
rename to dom/base/nsScriptNameSpaceManager.cpp
rename from dom/src/base/nsScriptNameSpaceManager.h
rename to dom/base/nsScriptNameSpaceManager.h
rename from dom/src/base/nsWindowRoot.cpp
rename to dom/base/nsWindowRoot.cpp
rename from dom/src/base/nsWindowRoot.h
rename to dom/base/nsWindowRoot.h
rename from dom/public/nsWrapperCache.h
rename to dom/base/nsWrapperCache.h
new file mode 100644
--- /dev/null
+++ b/dom/dom-config.mk
@@ -0,0 +1,69 @@
+MODULE = dom
+
+REQUIRES += \
+  string \
+  xpcom \
+  webbrwsr \
+  commandhandler \
+  js \
+  widget \
+  gfx \
+  thebes \
+  layout \
+  content \
+  caps \
+  docshell \
+  xpconnect \
+  pref \
+  oji \
+  necko \
+  nkcache \
+  mimetype \
+  java \
+  locale \
+  prefetch \
+  xuldoc \
+  webshell \
+  view \
+  uconv \
+  shistory \
+  plugin \
+  windowwatcher \
+  chardet \
+  find \
+  appshell \
+  intl \
+  unicharutil \
+  rdf \
+  xultmpl \
+  jar \
+  storage \
+  htmlparser \
+  $(NULL)
+
+ifdef NS_TRACE_MALLOC
+REQUIRES += tracemalloc
+endif
+
+ifdef MOZ_JSDEBUGGER
+REQUIRES += jsdebug
+endif
+
+DOM_SRCDIRS = \
+  dom/base \
+  dom/src/events \
+  dom/src/storage \
+  dom/src/offline \
+  dom/src/geolocation \
+  dom/src/threads \
+  content/xbl/src \
+  content/xul/document/src \
+  content/events/src \
+  content/base/src \
+  content/html/document/src \
+  layout/style \
+  layout/xul/base/src/tree/src \
+  $(NULL)
+
+LOCAL_INCLUDES += $(DOM_SRCDIRS:%=-I$(topsrcdir)/%)
+DEFINES += -D_IMPL_NS_LAYOUT
deleted file mode 100644
--- a/dom/public/Makefile.in
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# ***** 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) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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 *****
-
-DEPTH		= ../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= dom
-GRE_MODULE	= 1
-
-DIRS		= coreEvents base
-
-XPIDLSRCS	= nsIEntropyCollector.idl \
-		  nsIScriptChannel.idl \
-		  $(NULL)
-
-EXPORTS=nsIScriptContext.h		\
-	nsIJSNativeInitializer.h	\
-	nsIScriptRuntime.h		\
-	nsIScriptObjectOwner.h		\
-	nsIScriptObjectPrincipal.h	\
-	nsIScriptGlobalObject.h		\
-	nsIScriptGlobalObjectOwner.h	\
-	nsIScriptTimeoutHandler.h	\
-	nsIDOMScriptObjectFactory.h	\
-	nsDOMCID.h			\
-	nsIScriptExternalNameSet.h	\
-	nsIScriptNameSpaceManager.h	\
-	nsDOMError.h			\
-	nsIJSEventListener.h		\
-	nsIDOMClassInfo.h		\
-	nsDOMClassInfoID.h		\
-	nsIBaseDOMException.h		\
-	nsDOMString.h			\
-	nsDOMJSUtils.h			\
-	nsDOMScriptObjectHolder.h	\
-	nsWrapperCache.h	\
-	$(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/dom/public/base/Makefile.in
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# ***** 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) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of 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 *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= dom
-
-EXPORTS=nsPIDOMWindow.h nsPIWindowRoot.h nsIFocusController.h
-
-include $(topsrcdir)/config/rules.mk
-
-DEFINES += -D_IMPL_NS_LAYOUT
--- a/dom/src/Makefile.in
+++ b/dom/src/Makefile.in
@@ -37,17 +37,17 @@
 
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS		= base jsurl events storage offline json geolocation threads
+DIRS		= jsurl events storage offline json geolocation threads
 
 include $(topsrcdir)/config/rules.mk
 
 _FILES = \
 	$(srcdir)/res/hiddenWindow.html \
 	$(NULL)
 
 libs::
--- a/dom/src/events/Makefile.in
+++ b/dom/src/events/Makefile.in
@@ -62,10 +62,10 @@ CPPSRCS =				\
 	nsJSEventListener.cpp		\
 	$(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
-INCLUDES	+= -I$(srcdir)/../base
+INCLUDES	+= -I$(topsrcdir)/dom/base
 
--- a/dom/src/geolocation/Makefile.in
+++ b/dom/src/geolocation/Makefile.in
@@ -68,17 +68,17 @@ CPPSRCS		= \
 		nsGeolocation.cpp \
 		$(NULL)
 
 EXTRA_DSO_LDOPTS = \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
 
 LOCAL_INCLUDES = \
-		-I$(srcdir)/../base \
+		-I$(topsrcdir)/dom/base \
 		$(NULL)
 
 ifdef NS_MAEMO_LOCATION
 CPPSRCS		+= MaemoLocationProvider.cpp
 LOCAL_INCLUDES	+= $(MOZ_LOCATION_CFLAGS)
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/src/jsurl/Makefile.in
+++ b/dom/src/jsurl/Makefile.in
@@ -70,17 +70,17 @@ XPIDLSRCS	= \
 
 
 CPPSRCS		= nsJSProtocolHandler.cpp
 
 EXPORTS		= $(srcdir)/nsJSProtocolHandler.h
 
 LOCAL_INCLUDES += \
 		-I$(srcdir) \
-		-I$(srcdir)/../base \
+		-I$(topsrcdir)/dom/base \
 
 EXTRA_DSO_LDOPTS = \
 		$(MOZ_COMPONENT_LIBS) \
 		$(MOZ_JS_LIBS) \
 		$(NULL)
 
 ifdef BUILD_DEBUG_GC
 DEFINES		+= -DDEBUG_GC
--- a/dom/src/offline/Makefile.in
+++ b/dom/src/offline/Makefile.in
@@ -67,15 +67,15 @@ REQUIRES       = xpcom         \
 CPPSRCS =                              \
 	nsDOMOfflineResourceList.cpp   \
 	$(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 LOCAL_INCLUDES = \
-		-I$(srcdir)/../base \
+		-I$(topsrcdir)/dom/base \
 		-I$(topsrcdir)/content/base/src \
 		-I$(topsrcdir)/content/events/src
 
 DEFINES += -D_IMPL_NS_LAYOUT
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/src/storage/Makefile.in
+++ b/dom/src/storage/Makefile.in
@@ -74,14 +74,14 @@ CPPSRCS =                  \
 ifdef MOZ_STORAGE
 CPPSRCS += nsDOMStorageDB.cpp
 endif
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 LOCAL_INCLUDES = \
-                -I$(srcdir)/../base \
+                -I$(topsrcdir)/dom/base \
 		-I$(topsrcdir)/content/events/src
 
 DEFINES += -D_IMPL_NS_LAYOUT
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/src/threads/Makefile.in
+++ b/dom/src/threads/Makefile.in
@@ -77,17 +77,17 @@ CPPSRCS = \
   nsDOMWorkerScriptLoader.cpp \
   nsDOMWorkerSecurityManager.cpp \
   nsDOMWorkerTimeout.cpp \
   nsDOMWorkerXHR.cpp \
   nsDOMWorkerXHRProxy.cpp \
   $(NULL)
 
 LOCAL_INCLUDES = \
-  -I$(topsrcdir)/dom/src/base \
+  -I$(topsrcdir)/dom/base \
   -I$(topsrcdir)/dom/src/json \
   -I$(topsrcdir)/content/base/src \
   -I$(topsrcdir)/content/events/src \
   $(NULL)
 
 ifdef ENABLE_TESTS
 DIRS += test
 endif
--- a/layout/base/Makefile.in
+++ b/layout/base/Makefile.in
@@ -173,17 +173,17 @@ LOCAL_INCLUDES += \
 		-I$(srcdir)/../tables \
 		-I$(srcdir)/../printing \
 		-I$(srcdir)/../xul/base/src \
 		-I$(srcdir)/../xul/base/src/tree/src \
 		-I$(srcdir)/../../content/base/src \
 		-I$(srcdir)/../../content/events/src \
 		-I$(srcdir)/../../content/xbl/src \
 		-I$(srcdir)/../../view/src \
-		-I$(srcdir)/../../dom/src/base \
+		-I$(srcdir)/../../dom/base \
 		-I$(srcdir)/../../content/svg/content/src \
 		$(NULL)
 
 ifdef MOZ_MATHML
 LOCAL_INCLUDES += \
         -I$(srcdir)/../mathml/content/src \
         -I$(srcdir)/../mathml/base/src
 endif
--- a/layout/build/Makefile.in
+++ b/layout/build/Makefile.in
@@ -124,17 +124,17 @@ SHARED_LIBRARY_LIBS = \
 	$(DEPTH)/content/xml/document/src/$(LIB_PREFIX)gkconxmldoc_s.$(LIB_SUFFIX) \
 	$(DEPTH)/content/xslt/src/base/$(LIB_PREFIX)txbase_s.$(LIB_SUFFIX) \
 	$(DEPTH)/content/xslt/src/xml/$(LIB_PREFIX)txxml_s.$(LIB_SUFFIX) \
 	$(DEPTH)/content/xslt/src/xpath/$(LIB_PREFIX)txxpath_s.$(LIB_SUFFIX) \
 	$(DEPTH)/content/xslt/src/xslt/$(LIB_PREFIX)txxslt_s.$(LIB_SUFFIX) \
 	$(DEPTH)/content/xbl/src/$(LIB_PREFIX)gkconxbl_s.$(LIB_SUFFIX) \
 	$(DEPTH)/content/xul/document/src/$(LIB_PREFIX)gkconxuldoc_s.$(LIB_SUFFIX) \
 	$(DEPTH)/view/src/$(LIB_PREFIX)gkview_s.$(LIB_SUFFIX) \
-	$(DEPTH)/dom/src/base/$(LIB_PREFIX)jsdombase_s.$(LIB_SUFFIX) \
+	$(DEPTH)/dom/base/$(LIB_PREFIX)jsdombase_s.$(LIB_SUFFIX) \
 	$(DEPTH)/dom/src/events/$(LIB_PREFIX)jsdomevents_s.$(LIB_SUFFIX) \
 	$(DEPTH)/dom/src/json/$(LIB_PREFIX)json_s.$(LIB_SUFFIX) \
 	$(DEPTH)/dom/src/jsurl/$(LIB_PREFIX)jsurl_s.$(LIB_SUFFIX) \
 	$(DEPTH)/dom/src/storage/$(LIB_PREFIX)jsdomstorage_s.$(LIB_SUFFIX) \
 	$(DEPTH)/dom/src/offline/$(LIB_PREFIX)jsdomoffline_s.$(LIB_SUFFIX) \
  	$(DEPTH)/dom/src/geolocation/$(LIB_PREFIX)jsdomgeolocation_s.$(LIB_SUFFIX) \
 	$(DEPTH)/dom/src/threads/$(LIB_PREFIX)domthreads_s.$(LIB_SUFFIX) \
 	$(DEPTH)/editor/libeditor/text/$(LIB_PREFIX)texteditor_s.$(LIB_SUFFIX) \
@@ -293,17 +293,17 @@ LOCAL_INCLUDES	+= -I$(srcdir)/../base \
 		   -I$(topsrcdir)/content/xslt/src/xpath \
 		   -I$(topsrcdir)/content/xslt/src/xslt \
 		   -I$(topsrcdir)/content/xul/content/src \
 		   -I$(topsrcdir)/content/xul/document/src \
 		   -I$(topsrcdir)/content/xul/templates/src \
 		   -I$(topsrcdir)/content/events/src \
 		   -I$(topsrcdir)/content/xbl/src \
 		   -I$(topsrcdir)/view/src \
-		   -I$(topsrcdir)/dom/src/base \
+		   -I$(topsrcdir)/dom/base \
 		   -I$(topsrcdir)/dom/src/json \
 		   -I$(topsrcdir)/dom/src/jsurl \
 		   -I$(topsrcdir)/dom/src/storage \
 		   -I$(topsrcdir)/dom/src/offline \
 		   -I$(topsrcdir)/dom/src/geolocation \
 		   -I$(topsrcdir)/dom/src/threads \
 		   -I. \
 		   -I$(topsrcdir)/editor/libeditor/base \
--- a/layout/generic/Makefile.in
+++ b/layout/generic/Makefile.in
@@ -182,17 +182,17 @@ LOCAL_INCLUDES += \
 		-I$(srcdir) \
 		-I$(srcdir)/../base \
 		-I$(srcdir)/../forms \
 		-I$(srcdir)/../tables \
 		-I$(srcdir)/../xul/base/src \
 		-I$(srcdir)/../../content/xul/content/src \
 		-I$(srcdir)/../../content/base/src \
 		-I$(srcdir)/../../content/html/content/src \
-		-I$(srcdir)/../../dom/src/base \
+		-I$(srcdir)/../../dom/base \
 		$(MOZ_CAIRO_CFLAGS) \
 		$(NULL)
 
 ifdef MOZ_ENABLE_GTK2
 CXXFLAGS += $(MOZ_GTK2_CFLAGS)
 endif
 
 ifdef MOZ_ENABLE_QT
--- a/testing/crashtest/crashtests.list
+++ b/testing/crashtest/crashtests.list
@@ -16,17 +16,17 @@ include ../../content/xslt/crashtests/cr
 include ../../content/xul/content/crashtests/crashtests.list
 include ../../content/xul/document/crashtests/crashtests.list
 include ../../content/xul/templates/src/crashtests/crashtests.list
 include ../../content/mathml/content/crashtests/crashtests.list
 include ../../content/media/video/test/crashtests/crashtests.list
 
 include ../../docshell/base/crashtests/crashtests.list
 
-include ../../dom/src/base/crashtests/crashtests.list
+include ../../dom/base/crashtests/crashtests.list
 include ../../dom/src/offline/crashtests/crashtests.list
 include ../../dom/src/jsurl/crashtests/crashtests.list
 
 include ../../editor/libeditor/html/crashtests/crashtests.list
 include ../../editor/libeditor/base/crashtests/crashtests.list
 include ../../editor/composer/src/crashtests/crashtests.list
 include ../../editor/txmgr/tests/crashtests/crashtests.list
 
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -44,33 +44,31 @@ MAKEFILES_db="
   db/mdb/public/Makefile
   db/mork/Makefile
   db/mork/build/Makefile
   db/mork/src/Makefile
 "
 
 MAKEFILES_dom="
   dom/Makefile
-  dom/public/Makefile
-  dom/public/base/Makefile
   dom/public/coreEvents/Makefile
   dom/interfaces/base/Makefile
   dom/interfaces/canvas/Makefile
   dom/interfaces/core/Makefile
   dom/interfaces/css/Makefile
   dom/interfaces/events/Makefile
   dom/interfaces/html/Makefile
   dom/interfaces/range/Makefile
   dom/interfaces/stylesheets/Makefile
   dom/interfaces/views/Makefile
   dom/interfaces/xbl/Makefile
   dom/interfaces/xpath/Makefile
   dom/interfaces/xul/Makefile
+  dom/base/Makefile
   dom/src/Makefile
-  dom/src/base/Makefile
   dom/src/events/Makefile
   dom/src/jsurl/Makefile
   dom/locales/Makefile
 "
 
 MAKEFILES_editor="
   editor/Makefile
   editor/public/Makefile