diff --git a/mozilla/allmakefiles.sh b/mozilla/allmakefiles.sh
index 62a5a00889b..576dc06697a 100755
--- a/mozilla/allmakefiles.sh
+++ b/mozilla/allmakefiles.sh
@@ -299,9 +299,6 @@ content/xbl/Makefile
content/xbl/public/Makefile
content/xbl/src/Makefile
content/xbl/builtin/Makefile
-content/xbl/builtin/gtk2/Makefile
-content/xbl/builtin/unix/Makefile
-content/xbl/builtin/win/Makefile
content/xsl/Makefile
content/xsl/public/Makefile
content/shared/Makefile
diff --git a/mozilla/browser/installer/unix/packages-static b/mozilla/browser/installer/unix/packages-static
index 3f388dae5fa..086635bbc55 100644
--- a/mozilla/browser/installer/unix/packages-static
+++ b/mozilla/browser/installer/unix/packages-static
@@ -261,7 +261,6 @@ bin/res/charsetData.properties
bin/res/langGroups.properties
bin/res/language.properties
bin/res/entityTables/*
-bin/res/builtin/htmlBindings.xml
bin/res/builtin/platformHTMLBindings.xml
; [Personal Security Manager]
diff --git a/mozilla/browser/installer/windows/packages-static b/mozilla/browser/installer/windows/packages-static
index d177af98c08..e79aa56f93a 100644
--- a/mozilla/browser/installer/windows/packages-static
+++ b/mozilla/browser/installer/windows/packages-static
@@ -247,7 +247,6 @@ bin\res\charsetData.properties
bin\res\langGroups.properties
bin\res\language.properties
bin\res\entityTables\*
-bin\res\builtin\htmlBindings.xml
bin\res\builtin\platformHTMLBindings.xml
; [Personal Security Manager]
diff --git a/mozilla/content/xbl/builtin/Makefile.in b/mozilla/content/xbl/builtin/Makefile.in
index 34af14eb842..ca3f7e5b33f 100644
--- a/mozilla/content/xbl/builtin/Makefile.in
+++ b/mozilla/content/xbl/builtin/Makefile.in
@@ -43,26 +43,29 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
-DIRS = win
+PLATFORM_DIR = win
else
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
-DIRS = mac
+PLATFORM_DIR = mac
else
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-DIRS = gtk2
+PLATFORM_DIR = gtk2
else
-DIRS = unix
+PLATFORM_DIR = unix
endif
endif
endif
include $(topsrcdir)/config/rules.mk
-_BUILTINS = htmlBindings.xml
+PLATFORM_BINDINGS = $(srcdir)/$(PLATFORM_DIR)/platformHTMLBindings.xml
+PREPROCESS_BINDINGS = $(PERL) $(MOZILLA_DIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(PLATFORM_BINDINGS)
-libs:: $(_BUILTINS)
- $(INSTALL) $^ $(DIST)/bin/res/builtin
+$(DIST)/bin/res/builtin/platformHTMLBindings.xml $(DESTDIR)$(mozappdir)/res/builtin/platformHTMLBindings.xml: $(PLATFORM_BINDINGS) $(wildcard $(srcdir)/*.inc)
+ @mkdir -p $(dir $@)
+ @rm -f $@
+ @$(PREPROCESS_BINDINGS) > $@
-install:: $(_BUILTINS)
- $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/res/builtin
+libs:: $(DIST)/bin/res/builtin/platformHTMLBindings.xml
+install:: $(DESTDIR)$(mozappdir)/res/builtin/platformHTMLBindings.xml
diff --git a/mozilla/content/xbl/builtin/browser-base.inc b/mozilla/content/xbl/builtin/browser-base.inc
new file mode 100644
index 00000000000..e91f46c2a0b
--- /dev/null
+++ b/mozilla/content/xbl/builtin/browser-base.inc
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/content/xbl/builtin/editor-base.inc b/mozilla/content/xbl/builtin/editor-base.inc
new file mode 100644
index 00000000000..ef4588e7536
--- /dev/null
+++ b/mozilla/content/xbl/builtin/editor-base.inc
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/content/xbl/builtin/gtk2/Makefile.in b/mozilla/content/xbl/builtin/gtk2/Makefile.in
deleted file mode 100644
index f3d36be824a..00000000000
--- a/mozilla/content/xbl/builtin/gtk2/Makefile.in
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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 Netscape are
-# Copyright (C) 1999 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-#
-
-DEPTH = ../../../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-include $(topsrcdir)/config/rules.mk
-
-libs:: $(TARGETS)
- $(INSTALL) $(srcdir)/platformHTMLBindings.xml $(DIST)/bin/res/builtin
-
-install:: platformHTMLBindings.xml
- $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/res/builtin
diff --git a/mozilla/content/xbl/builtin/gtk2/platformHTMLBindings.xml b/mozilla/content/xbl/builtin/gtk2/platformHTMLBindings.xml
index 6e51523e767..06c4cc55aaf 100644
--- a/mozilla/content/xbl/builtin/gtk2/platformHTMLBindings.xml
+++ b/mozilla/content/xbl/builtin/gtk2/platformHTMLBindings.xml
@@ -33,6 +33,7 @@
+#include ../browser-base.inc
@@ -63,44 +64,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mozilla/content/xbl/builtin/htmlBindings.xml b/mozilla/content/xbl/builtin/htmlBindings.xml
deleted file mode 100644
index 44ff3b5493f..00000000000
--- a/mozilla/content/xbl/builtin/htmlBindings.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/mozilla/content/xbl/builtin/input-fields-base.inc b/mozilla/content/xbl/builtin/input-fields-base.inc
new file mode 100644
index 00000000000..14e6da7288f
--- /dev/null
+++ b/mozilla/content/xbl/builtin/input-fields-base.inc
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/content/xbl/builtin/mac/Makefile.in b/mozilla/content/xbl/builtin/mac/Makefile.in
deleted file mode 100644
index 6dd79fa95c0..00000000000
--- a/mozilla/content/xbl/builtin/mac/Makefile.in
+++ /dev/null
@@ -1,52 +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) 1999
-# 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
-
-include $(topsrcdir)/config/rules.mk
-
-libs:: $(TARGETS)
- $(INSTALL) $(srcdir)/platformHTMLBindings.xml $(DIST)/bin/res/builtin
-
-install:: platformHTMLBindings.xml
- $(SYSINSTALL) $(IFLAGS1) $< $(DESTDIR)$(mozappdir)/res/builtin
-
diff --git a/mozilla/content/xbl/builtin/mac/platformHTMLBindings.xml b/mozilla/content/xbl/builtin/mac/platformHTMLBindings.xml
index dc319a1404e..35b19e5d63f 100644
--- a/mozilla/content/xbl/builtin/mac/platformHTMLBindings.xml
+++ b/mozilla/content/xbl/builtin/mac/platformHTMLBindings.xml
@@ -4,9 +4,9 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
+
-
+#include ../input-fields-base.inc
@@ -27,8 +27,9 @@
-
+
+#include ../textareas-base.inc
@@ -61,6 +62,7 @@
+#include ../browser-base.inc
@@ -77,6 +79,7 @@
+#include ../editor-base.inc
diff --git a/mozilla/content/xbl/builtin/textareas-base.inc b/mozilla/content/xbl/builtin/textareas-base.inc
new file mode 100644
index 00000000000..948bcd647d0
--- /dev/null
+++ b/mozilla/content/xbl/builtin/textareas-base.inc
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mozilla/content/xbl/builtin/unix/Makefile.in b/mozilla/content/xbl/builtin/unix/Makefile.in
deleted file mode 100644
index e89ed5b0a8e..00000000000
--- a/mozilla/content/xbl/builtin/unix/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) 1999
-# 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
-
-include $(topsrcdir)/config/rules.mk
-
-libs:: $(TARGETS)
- $(INSTALL) $(srcdir)/platformHTMLBindings.xml $(DIST)/bin/res/builtin
-
-install:: platformHTMLBindings.xml
- $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/res/builtin
diff --git a/mozilla/content/xbl/builtin/unix/platformHTMLBindings.xml b/mozilla/content/xbl/builtin/unix/platformHTMLBindings.xml
index 788cdf3bb70..69708a45675 100644
--- a/mozilla/content/xbl/builtin/unix/platformHTMLBindings.xml
+++ b/mozilla/content/xbl/builtin/unix/platformHTMLBindings.xml
@@ -4,8 +4,9 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
+
+#include ../input-fields-base.inc
@@ -75,9 +76,9 @@
-
+
-
+#include ../textareas-base.inc
@@ -165,6 +166,7 @@
+#include ../browser-base.inc
@@ -195,6 +197,7 @@
+#include ../editor-base.inc
diff --git a/mozilla/content/xbl/builtin/win/Makefile.in b/mozilla/content/xbl/builtin/win/Makefile.in
deleted file mode 100644
index 6afd95127d1..00000000000
--- a/mozilla/content/xbl/builtin/win/Makefile.in
+++ /dev/null
@@ -1,56 +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) 1999
-# 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
-
-BUILTIN_RESOURCES = \
- platformHTMLBindings.xml \
- $(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
-libs:: $(BUILTIN_RESOURCES)
- $(INSTALL) $^ $(DIST)/bin/res/builtin
-
-install:: $(BUILTIN_RESOURCES)
- $(INSTALL) $^ $(DESTDIR)$(mozappdir)/res/builtin
-
diff --git a/mozilla/content/xbl/builtin/win/platformHTMLBindings.xml b/mozilla/content/xbl/builtin/win/platformHTMLBindings.xml
index 9e9e74056eb..bad4ef606a4 100644
--- a/mozilla/content/xbl/builtin/win/platformHTMLBindings.xml
+++ b/mozilla/content/xbl/builtin/win/platformHTMLBindings.xml
@@ -4,8 +4,9 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
+
+#include ../input-fields-base.inc
@@ -48,8 +49,9 @@
-
+
+#include ../textareas-base.inc
+#include ../browser-base.inc
@@ -112,6 +115,7 @@
+#include ../editor-base.inc
diff --git a/mozilla/content/xbl/src/nsXBLWindowDragHandler.cpp b/mozilla/content/xbl/src/nsXBLWindowDragHandler.cpp
index 736f2e3d978..b19fdf62781 100644
--- a/mozilla/content/xbl/src/nsXBLWindowDragHandler.cpp
+++ b/mozilla/content/xbl/src/nsXBLWindowDragHandler.cpp
@@ -78,15 +78,8 @@ nsXBLWindowDragHandler::WalkHandlers(nsIDOMEvent* aDragEvent, nsIAtom* aEventTyp
if (!dragEvent)
return NS_OK;
- EnsureHandlers();
+ EnsureHandlers(nsnull);
- if (!mElement) {
- WalkHandlersInternal(aDragEvent, aEventType, mPlatformHandler);
- evt->GetPreventDefault(&prevent);
- if (prevent)
- return NS_OK; // Handled by the platform. Our work here is done.
- }
-
WalkHandlersInternal(aDragEvent, aEventType, mHandler);
return NS_OK;
diff --git a/mozilla/content/xbl/src/nsXBLWindowHandler.cpp b/mozilla/content/xbl/src/nsXBLWindowHandler.cpp
index df8b9908e9b..80aac530e1d 100644
--- a/mozilla/content/xbl/src/nsXBLWindowHandler.cpp
+++ b/mozilla/content/xbl/src/nsXBLWindowHandler.cpp
@@ -72,11 +72,9 @@ class nsXBLSpecialDocInfo
{
public:
nsCOMPtr mHTMLBindings;
- nsCOMPtr mPlatformHTMLBindings;
nsCOMPtr mUserHTMLBindings;
static const char sHTMLBindingStr[];
- static const char sPlatformHTMLBindingStr[];
static const char sUserHTMLBindingStr[];
PRBool mInitialized;
@@ -85,7 +83,6 @@ public:
void LoadDocInfo();
void GetAllHandlers(const char* aType,
nsXBLPrototypeHandler** handler,
- nsXBLPrototypeHandler** platformHandler,
nsXBLPrototypeHandler** userHandler);
void GetHandlers(nsIXBLDocumentInfo* aInfo,
const nsACString& aRef,
@@ -94,8 +91,7 @@ public:
nsXBLSpecialDocInfo() : mInitialized(PR_FALSE) {};
};
-const char nsXBLSpecialDocInfo::sHTMLBindingStr[] = "resource://gre/res/builtin/htmlBindings.xml";
-const char nsXBLSpecialDocInfo::sPlatformHTMLBindingStr[] = "resource://gre/res/builtin/platformHTMLBindings.xml";
+const char nsXBLSpecialDocInfo::sHTMLBindingStr[] = "resource://gre/res/builtin/platformHTMLBindings.xml";
// Allow for a userHTMLBindings.xml.
// XXXbsmedberg Should be in the profile chrome directory, when we have a resource mapping for that
const char nsXBLSpecialDocInfo::sUserHTMLBindingStr[] = "resource://gre/res/builtin/userHTMLBindings.xml";
@@ -112,27 +108,16 @@ void nsXBLSpecialDocInfo::LoadDocInfo()
if (NS_FAILED(rv) || !xblService)
return;
- // Obtain the XP and platform doc infos
+ // Obtain the platform doc info
nsCOMPtr bindingURI;
NS_NewURI(getter_AddRefs(bindingURI), sHTMLBindingStr);
if (!bindingURI) {
return;
}
- xblService->LoadBindingDocumentInfo(nsnull, nsnull,
- bindingURI,
- PR_TRUE,
- getter_AddRefs(mHTMLBindings));
-
- rv = bindingURI->SetSpec(NS_LITERAL_CSTRING(sPlatformHTMLBindingStr));
- if (NS_FAILED(rv)) {
- NS_ERROR("Shouldn't fail to set spec here");
- return;
- }
-
xblService->LoadBindingDocumentInfo(nsnull, nsnull,
bindingURI,
PR_TRUE,
- getter_AddRefs(mPlatformHTMLBindings));
+ getter_AddRefs(mHTMLBindings));
rv = bindingURI->SetSpec(NS_LITERAL_CSTRING(sUserHTMLBindingStr));
if (NS_FAILED(rv)) {
@@ -168,7 +153,6 @@ nsXBLSpecialDocInfo::GetHandlers(nsIXBLDocumentInfo* aInfo,
void
nsXBLSpecialDocInfo::GetAllHandlers(const char* aType,
nsXBLPrototypeHandler** aHandler,
- nsXBLPrototypeHandler** aPlatformHandler,
nsXBLPrototypeHandler** aUserHandler)
{
if (mUserHTMLBindings) {
@@ -176,14 +160,8 @@ nsXBLSpecialDocInfo::GetAllHandlers(const char* aType,
type.Append("User");
GetHandlers(mUserHTMLBindings, type, aUserHandler);
}
- if (mPlatformHTMLBindings) {
- nsCAutoString type(aType);
- GetHandlers(mPlatformHTMLBindings, type, aPlatformHandler);
- }
if (mHTMLBindings) {
- nsCAutoString type(aType);
- type.Append("Base");
- GetHandlers(mHTMLBindings, type, aHandler);
+ GetHandlers(mHTMLBindings, nsDependentCString(aType), aHandler);
}
}
@@ -202,7 +180,6 @@ nsXBLWindowHandler::nsXBLWindowHandler(nsIDOMElement* aElement,
: mElement(aElement),
mReceiver(aReceiver),
mHandler(nsnull),
- mPlatformHandler(nsnull),
mUserHandler(nsnull)
{
++sRefCnt;
@@ -339,10 +316,10 @@ nsXBLWindowHandler::WalkHandlersInternal(nsIDOMEvent* aEvent,
//
// EnsureHandlers
//
-// Lazily load the XP and platform-specific bindings
+// Lazily load the platform and user bindings
//
nsresult
-nsXBLWindowHandler::EnsureHandlers()
+nsXBLWindowHandler::EnsureHandlers(PRBool *aIsEditor)
{
if (!sXBLSpecialDocInfo)
sXBLSpecialDocInfo = new nsXBLSpecialDocInfo();
@@ -351,15 +328,17 @@ nsXBLWindowHandler::EnsureHandlers()
sXBLSpecialDocInfo->LoadDocInfo();
// Now determine which handlers we should be using.
- if (IsEditor()) {
- sXBLSpecialDocInfo->GetAllHandlers("editor", &mHandler, &mPlatformHandler,
- &mUserHandler);
+ PRBool isEditor = IsEditor();
+ if (isEditor) {
+ sXBLSpecialDocInfo->GetAllHandlers("editor", &mHandler, &mUserHandler);
}
else {
- sXBLSpecialDocInfo->GetAllHandlers("browser", &mHandler, &mPlatformHandler,
- &mUserHandler);
+ sXBLSpecialDocInfo->GetAllHandlers("browser", &mHandler, &mUserHandler);
}
+ if (aIsEditor)
+ *aIsEditor = isEditor;
+
return NS_OK;
} // EnsureHandlers
diff --git a/mozilla/content/xbl/src/nsXBLWindowHandler.h b/mozilla/content/xbl/src/nsXBLWindowHandler.h
index 85a4ec00b46..1e07e2675a6 100644
--- a/mozilla/content/xbl/src/nsXBLWindowHandler.h
+++ b/mozilla/content/xbl/src/nsXBLWindowHandler.h
@@ -74,7 +74,7 @@ protected:
PRBool IsEditor() ;
// lazily load the handlers
- virtual nsresult EnsureHandlers();
+ virtual nsresult EnsureHandlers(PRBool *aIsEditor);
// walk the handlers, looking for one to handle the event
virtual nsresult WalkHandlersInternal(nsIDOMEvent* aKeyEvent,
@@ -91,8 +91,7 @@ protected:
// these are not owning references; the prototype handlers are owned
// by the prototype bindings which are owned by the docinfo.
- nsXBLPrototypeHandler* mHandler; // XP bindings
- nsXBLPrototypeHandler* mPlatformHandler; // platform-specific bindings
+ nsXBLPrototypeHandler* mHandler; // platform bindings
nsXBLPrototypeHandler* mUserHandler; // user-specific bindings
static nsXBLSpecialDocInfo* sXBLSpecialDocInfo; // holds document info about bindings
diff --git a/mozilla/content/xbl/src/nsXBLWindowKeyHandler.cpp b/mozilla/content/xbl/src/nsXBLWindowKeyHandler.cpp
index a324f5509c3..f8bd995f35c 100644
--- a/mozilla/content/xbl/src/nsXBLWindowKeyHandler.cpp
+++ b/mozilla/content/xbl/src/nsXBLWindowKeyHandler.cpp
@@ -54,7 +54,14 @@
#include "nsIScriptGlobalObject.h"
#include "nsIDOMElement.h"
#include "nsXBLAtoms.h"
+#include "nsINativeKeyBindings.h"
+#include "nsIController.h"
+#include "nsIControllers.h"
+#include "nsIDOMWindowInternal.h"
+#include "nsIFocusController.h"
+#include "nsPIWindowRoot.h"
+static nsINativeKeyBindings *sNativeEditorBindings = nsnull;
nsXBLWindowKeyHandler::nsXBLWindowKeyHandler(nsIDOMElement* aElement, nsIDOMEventReceiver* aReceiver)
: nsXBLWindowHandler(aElement, aReceiver)
@@ -99,21 +106,54 @@ BuildHandlerChain(nsIContent* aContent, nsXBLPrototypeHandler** aResult)
// to a particular element rather than the document
//
nsresult
-nsXBLWindowKeyHandler::EnsureHandlers()
+nsXBLWindowKeyHandler::EnsureHandlers(PRBool *aIsEditor)
{
if (mElement) {
// We are actually a XUL .
- if (mHandler)
+ if (mHandler) {
+ if (aIsEditor)
+ *aIsEditor = PR_FALSE;
+
return NS_OK;
+ }
+
nsCOMPtr content(do_QueryInterface(mElement));
BuildHandlerChain(content, &mHandler);
}
else // We are an XBL file of handlers.
- nsXBLWindowHandler::EnsureHandlers();
+ nsXBLWindowHandler::EnsureHandlers(aIsEditor);
return NS_OK;
}
+static nsINativeKeyBindings*
+GetEditorKeyBindings()
+{
+ static PRBool noBindings = PR_FALSE;
+ if (!sNativeEditorBindings && !noBindings) {
+ CallGetService(NS_NATIVEKEYBINDINGS_CONTRACTID_PREFIX "editor",
+ &sNativeEditorBindings);
+
+ if (!sNativeEditorBindings) {
+ noBindings = PR_TRUE;
+ }
+ }
+
+ return sNativeEditorBindings;
+}
+
+static void
+DoCommandCallback(const char *aCommand, void *aData)
+{
+ nsIControllers *controllers = NS_STATIC_CAST(nsIControllers*, aData);
+ if (controllers) {
+ nsCOMPtr controller;
+ controllers->GetControllerForCommand(aCommand, getter_AddRefs(controller));
+ if (controller) {
+ controller->DoCommand(aCommand);
+ }
+ }
+}
NS_IMETHODIMP
nsXBLWindowKeyHandler::WalkHandlers(nsIDOMEvent* aKeyEvent, nsIAtom* aEventType)
@@ -140,25 +180,57 @@ nsXBLWindowKeyHandler::WalkHandlers(nsIDOMEvent* aKeyEvent, nsIAtom* aEventType)
if (!keyEvent)
return NS_OK;
- EnsureHandlers();
+ PRBool isEditor;
+ EnsureHandlers(&isEditor);
if (!mElement) {
if (mUserHandler) {
WalkHandlersInternal(aKeyEvent, aEventType, mUserHandler);
evt->GetPreventDefault(&prevent);
if (prevent)
- return NS_OK; // Handled by the platform. Our work here is done.
- }
-
- if (mPlatformHandler) {
- WalkHandlersInternal(aKeyEvent, aEventType, mPlatformHandler);
- evt->GetPreventDefault(&prevent);
- if (prevent)
- return NS_OK; // Handled by the platform. Our work here is done.
+ return NS_OK; // Handled by the user bindings. Our work here is done.
}
}
WalkHandlersInternal(aKeyEvent, aEventType, mHandler);
+
+ nsINativeKeyBindings *nativeBindings;
+ if (isEditor && (nativeBindings = GetEditorKeyBindings())) {
+ nsNativeKeyEvent nativeEvent;
+ keyEvent->GetCharCode(&nativeEvent.charCode);
+ keyEvent->GetKeyCode(&nativeEvent.keyCode);
+ keyEvent->GetAltKey(&nativeEvent.altKey);
+ keyEvent->GetCtrlKey(&nativeEvent.ctrlKey);
+ keyEvent->GetShiftKey(&nativeEvent.shiftKey);
+ keyEvent->GetMetaKey(&nativeEvent.metaKey);
+
+ // get the DOM window we're attached to
+ nsCOMPtr controllers;
+ nsCOMPtr root = do_QueryInterface(mReceiver);
+ if (root) {
+ nsCOMPtr fc;
+ root->GetFocusController(getter_AddRefs(fc));
+ if (fc) {
+ fc->GetControllers(getter_AddRefs(controllers));
+ }
+ }
+
+ PRBool handled;
+ if (aEventType == nsXBLAtoms::keyup) {
+ handled = sNativeEditorBindings->KeyUp(nativeEvent,
+ DoCommandCallback, controllers);
+ } else if (aEventType == nsXBLAtoms::keypress) {
+ handled = sNativeEditorBindings->KeyPress(nativeEvent,
+ DoCommandCallback, controllers);
+ } else {
+ handled = sNativeEditorBindings->KeyDown(nativeEvent,
+ DoCommandCallback, controllers);
+ }
+
+ if (handled)
+ aKeyEvent->PreventDefault();
+
+ }
return NS_OK;
}
@@ -195,7 +267,12 @@ nsXBLWindowKeyHandler::EventMatched(nsXBLPrototypeHandler* inHandler,
return PR_FALSE;
}
-
+/* static */ void
+nsXBLWindowKeyHandler::ShutDown()
+{
+ NS_IF_RELEASE(sNativeEditorBindings);
+}
+
///////////////////////////////////////////////////////////////////////////////////
nsresult
diff --git a/mozilla/content/xbl/src/nsXBLWindowKeyHandler.h b/mozilla/content/xbl/src/nsXBLWindowKeyHandler.h
index 0e2cb8a3866..d9a2e88de84 100644
--- a/mozilla/content/xbl/src/nsXBLWindowKeyHandler.h
+++ b/mozilla/content/xbl/src/nsXBLWindowKeyHandler.h
@@ -65,27 +65,20 @@ public:
NS_DECL_ISUPPORTS
+ // release globals
+ static NS_HIDDEN_(void) ShutDown();
+
protected:
NS_IMETHOD WalkHandlers(nsIDOMEvent* aKeyEvent, nsIAtom* aEventType);
// lazily load the handlers. Overridden to handle being attached
// to a particular element rather than the document
- virtual nsresult EnsureHandlers();
+ virtual nsresult EnsureHandlers(PRBool *aIsEditor);
// check if the given handler cares about the given key event
PRBool EventMatched(nsXBLPrototypeHandler* inHandler, nsIAtom* inEventType,
nsIDOMEvent* inEvent);
-
- // We need our own refcount (even though our base class has one) because
- // we have our own statics that need to be initialized and the creation of
- // other subclasses would cause us to miss things if we shared the counter.
-
- static PRUint32 gRefCnt;
- static nsIAtom* kKeyUpAtom;
- static nsIAtom* kKeyDownAtom;
- static nsIAtom* kKeyPressAtom;
-
};
nsresult
diff --git a/mozilla/embedding/config/basebrowser-installer-win.pkg b/mozilla/embedding/config/basebrowser-installer-win.pkg
index 40b5c89d9e2..58ba85de8f6 100644
--- a/mozilla/embedding/config/basebrowser-installer-win.pkg
+++ b/mozilla/embedding/config/basebrowser-installer-win.pkg
@@ -243,7 +243,6 @@ res\arrow.gif
res\arrowd.gif
res\loading-image.gif
res\broken-image.gif
-res\builtin\htmlBindings.xml
res\builtin\platformHTMLBindings.xml
res\entityTables\html40Special.properties
res\entityTables\htmlEntityVersions.properties
diff --git a/mozilla/embedding/config/basebrowser-mac-cfm b/mozilla/embedding/config/basebrowser-mac-cfm
deleted file mode 100644
index ceda1a20761..00000000000
--- a/mozilla/embedding/config/basebrowser-mac-cfm
+++ /dev/null
@@ -1,284 +0,0 @@
-; Base Embedding Package File for MacOS CFM (built with CodeWarrior)
-;
-;
-;
-
-[Embed]
-
-
-
-;
-; NSPR:
-;
-Essential Files:NSPR20.shlb
-Essential Files:NSRuntime.shlb
-Essential Files:NSStdLib.shlb
-
-;
-; Javascript:
-;
-Essential Files:JavaScript.shlb
-Essential Files:LiveConnect.shlb
-Components:JSLoader.shlb
-
-;
-; DOM:
-;
-Components:dom.shlb
-
-;
-; XPCOM:
-;
-Essential Files:xpcom.shlb
-Essential Files:libreg.shlb
-
-;
-; Imaging:
-;
-Essential Files:zlib.shlb
-
-;
-; Components: (need to trim fat)
-;
-
-; accessibility (out of process API support)
-; see http:::www.mozilla.org:projects:ui:accessibility:vendors-win.html
-; Components:accessibility.dll
-; Components:accessibility.xpt
-
-; appshell
-Components:AppShell.shlb
-Components:appshell.xpt
-
-; caps
-Components:Caps.shlb
-Components:caps.xpt
-
-; chrome
-Components:ChomeRegistry.shlb
-Components:chrome.xpt
-
-; cookies
-Components:Cookie.shlb
-Components:cookie.xpt
-
-; docshell
-Components:docshell.shlb
-Components:docshell.xpt
-
-; dom
-Components:dom.shlb
-Components:dom.xpt
-Components:dom_base.xpt
-Components:dom_core.xpt
-Components:dom_css.xpt
-Components:dom_events.xpt
-Components:dom_html.xpt
-Components:dom_range.xpt
-Components:dom_stylesheets.xpt
-Components:dom_traversal.xpt
-Components:dom_views.xpt
-Components:dom_xbl.xpt
-Components:dom_xul.xpt
-
-; editor
-Components:Composer.shlb
-; Components:EditorCore.shlb ; why not?
-Components:editor.xpt
-Components:htmleditor.shlb
-
-; embedding
-Components:webBrowser.shlb
-Components:embeddingbrowser.xpt
-Components:EmbedComponents.shlb
-Components:EmbedComponents.xpt
-Components:EmbedBase.xpt
-Components:webshell.xpt
-
-; find functionality
-; Optional - only if your code uses nsIWebBrowserFind
-Components:txtsvc.xpt
-
-; gfx
-Essential Files:gfx.shlb
-Components:gfxComponent.shlb
-
-; javascript
-Components:jsurl.xpt
-
-; layout
-res:dtd:xhtml11.dtd
-Components:layout.shlb
-Components:htmlparser.shlb
-Components:htmlparser.xpt
-Components:content.xpt
-Components:layout.xpt
-
-; netwerk
-
-Components:Necko.shlb
-Components:necko.xpt
-Components:cache.xpt
-
-; imagelib
-Components:libimg2.shlb
-Components:libimg2.xpt
-Components:mngdecoder.shlb
-
-; jar
-Components:libjar.shlb
-Components:libjar.xpt
-
-; prefs
-Components:libpref.shlb
-Components:libpref.xpt
-
-; plugins
-; Optional - only if you need plugin support
-Components:plugin.shlb
-Components:pluginClassic.shlb
-Components:plugin.xpt
-Components:oji.shlb
-Components:oji.xpt
-
-; profile
-Components:profile.shlb
-Components:profileservices.xpt
-Components:mozreg.shlb
-Components:mozreg.xpt
-
-; wallet
-; Optional - only if you need password persistence
-Components:Wallet.shlb
-Components:wallet.xpt
-
-; psm2
-; Optional - only if you need PSM2 support
-Components:pipboot.shlb
-Components:pipboot.xpt
-Components:PIPNSS.shlb
-Components:pipnss.xpt
-defaults:pref:security-prefs.js
-Essential Files:NSS3.shlb
-Essential Files:SMIME3.shlb
-Essential Files:Softoken3.shlb
-Essential Files:SSL3.shlb
-Essential Files:NSSckbi.shlb
-
-; appcomps
-; Optional - only if you want global history (requires mork) or
-; directory viewer (off by default for ftp view)
-Components:appcomps.shlb
-Components:mozcomps.xpt
-Components:mork.shlb
-
-; download progress
-; Optional - you can implement your own download progress dialog
-; then this is no longer required
-Components:nsProgressDialog.js
-Components:nsHelperAppDlg.js
-Components:nsDownloadProgressListener.js
-Components:downloadmanager.xpt
-
-; rdf
-Components:RDFLibrary.shlb
-Components:rdf.xpt
-
-; session history
-Components:shistory.xpt
-
-; optional typeaheadfind
-; (docs at http://www.mozilla.org/projects/ui/accessibility/typeaheadfind.html)
-;Components:typeaheadfind.shlb
-;Components:typeaheadfind.xpt
-
-; required l10n libraries
-
-Components:i18n.shlb
-Components:unicharutil.xpt
-Components:uconv.shlb
-Components:uconv.xpt
-Components:nslocale.xpt
-Components:chardet.xpt
-Components:Universalchardet.shlb
-
-
-res:language.properties
-res:langGroups.properties
-res:charsetData.properties
-res:charsetalias.properties
-res:maccharset.properties
-
-; required i18n libs
-Components:nsIStringBundle.xpt
-
-; required prefs files
-defaults:pref:all.js
-defaults:pref:macprefs.js
-
-; required if using nsHelperAppDlg.js component
-defaults:Profile:mimeTypes.rdf
-defaults:Profile:US:mimeTypes.rdf
-
-; uriloader
-Components:uriLoader.xpt
-
-; widget
-Essential Files:WidgetSupport.shlb
-Components:widget.shlb
-Components:widget.xpt
-
-; xmlextras, optional for XMLHttpRequest support
-Components:xmlextras.shlb
-Components:xmlextras.xpt
-
-; xpconnect
-Components:XPConnect.shlb
-Components:xpconnect.xpt
-
-; xpcom
-Components:xpcom.xpt
-
-;
-; The build scripts move embed.jar manually because of how and where
-; it is generated.
-;
-; Chrome:embed.jar
-
-
-;
-; res:
-;
-res:html.css
-res:quirk.css
-res:viewsource.css
-res:ua.css
-res:forms.css
-res:arrow.gif
-res:loading-image.gif
-res:broken-image.gif
-res:builtin:htmlBindings.xml
-res:builtin:platformHTMLBindings.xml
-res:entityTables:html40Special.properties
-res:entityTables:htmlEntityVersion.properties
-res:entityTables:html40Latin1.properties
-res:entityTables:html40Symbols.properties
-res:entityTables:transliterate.properties
-res:fonts:fontEncoding.properties
-
-;
-; Optional for MathML
-;
-;res:mathml.css
-;res:dtd:mathml.dtd
-;res:entityTables:mathml20.properties
-;res:fonts:mathfont.properties
-;res:fonts:mathfontCMEX10.properties
-;res:fonts:mathfontCMSY10.properties
-;res:fonts:mathfontMath1.properties
-;res:fonts:mathfontMath2.properties
-;res:fonts:mathfontMath4.properties
-;res:fonts:mathfontMTExtra.properties
-;res:fonts:mathfontPUA.properties
-;res:fonts:mathfontSymbol.properties
-;components:ucvmath.shlb
diff --git a/mozilla/embedding/config/basebrowser-mac-cfmDebug b/mozilla/embedding/config/basebrowser-mac-cfmDebug
deleted file mode 100644
index 66f8eaeadcb..00000000000
--- a/mozilla/embedding/config/basebrowser-mac-cfmDebug
+++ /dev/null
@@ -1,287 +0,0 @@
-; Base Embedding Package File for MacOS CFM (built with CodeWarrior)
-;
-;
-;
-
-[Embed]
-
-
-
-;
-; NSPR:
-;
-Essential Files:NSPR20Debug.shlb
-Essential Files:NSRuntimeDebug.shlb
-Essential Files:NSStdLibDebug.shlb
-
-;
-; Javascript:
-;
-Essential Files:JavaScriptDebug.shlb
-Essential Files:LiveConnectDebug.shlb
-Components:JSLoaderDebug.shlb
-
-;
-; DOM:
-;
-Components:domDebug.shlb
-
-;
-; XPCOM:
-;
-Essential Files:xpcomDebug.shlb
-Essential Files:libregDebug.shlb
-
-;
-; Imaging:
-;
-Essential Files:zlibDebug.shlb
-
-;
-; Components: (need to trim fat)
-;
-
-; accessibility (out of process API support)
-; see http:::www.mozilla.org:projects:ui:accessibility:vendors-win.html
-; Components:accessibilityDebug.dll
-; Components:accessibility.xpt
-
-; appshell
-Components:AppShellDebug.shlb
-Components:appshell.xpt
-
-; caps
-Components:CapsDebug.shlb
-Components:caps.xpt
-
-; chrome
-Components:ChomeRegistryDebug.shlb
-Components:chrome.xpt
-
-; cookies
-Components:CookieDebug.shlb
-Components:cookie.xpt
-
-; docshell
-Components:docshellDebug.shlb
-Components:docshell.xpt
-
-; dom
-Components:domDebug.shlb
-Components:dom.xpt
-Components:dom_base.xpt
-Components:dom_core.xpt
-Components:dom_css.xpt
-Components:dom_events.xpt
-Components:dom_html.xpt
-Components:dom_range.xpt
-Components:dom_stylesheets.xpt
-Components:dom_traversal.xpt
-Components:dom_views.xpt
-Components:dom_xbl.xpt
-Components:dom_xul.xpt
-
-; editor
-Components:ComposerDebug.shlb
-; Components:EditorCoreDebug.shlb ; why not?
-Components:editor.xpt
-Components:htmleditorDebug.shlb
-
-; embedding
-Components:webBrowserDebug.shlb
-Components:embeddingbrowser.xpt
-Components:EmbedComponentsDebug.shlb
-Components:EmbedComponents.xpt
-Components:EmbedBase.xpt
-Components:webshell.xpt
-
-; find functionality
-; Optional - only if your code uses nsIWebBrowserFind
-Components:txtsvc.xpt
-
-; gfx
-Essential Files:gfxDebug.shlb
-Components:gfxComponentDebug.shlb
-
-; javascript
-Components:jsurl.xpt
-
-; layout
-res:dtd:xhtml11.dtd
-Components:layoutDebug.shlb
-Components:htmlparserDebug.shlb
-Components:htmlparser.xpt
-Components:content.xpt
-Components:layout.xpt
-
-; netwerk
-
-Components:NeckoDebug.shlb
-Components:necko.xpt
-Components:Necko2Debug.shlb
-Components:cache.xpt
-
-; imagelib
-Components:libimg2Debug.shlb
-Components:libimg2.xpt
-Components:mngdecoderDebug.shlb
-
-; jar
-Components:libjarDebug.shlb
-Components:libjar.xpt
-
-; prefs
-Components:libprefDebug.shlb
-Components:libpref.xpt
-
-; plugins
-; Optional - only if you need plugin support
-Components:pluginDebug.shlb
-Components:pluginClassicDebug.shlb
-Components:plugin.xpt
-Components:ojiDebug.shlb
-Components:oji.xpt
-
-; profile
-Components:profileDebug.shlb
-Components:profileservices.xpt
-Components:mozregDebug.shlb
-Components:mozreg.xpt
-
-; wallet
-; Optional - only if you need password persistence
-Components:WalletDebug.shlb
-Components:wallet.xpt
-
-; psm2
-; Optional - only if you need PSM2 support
-Components:pipbootDebug.shlb
-Components:pipboot.xpt
-Components:PIPNSSDebug.shlb
-Components:pipnss.xpt
-defaults:pref:security-prefs.js
-Essential Files:NSS3Debug.shlb
-Essential Files:SMIME3Debug.shlb
-Essential Files:Softoken3Debug.shlb
-Essential Files:SSL3Debug.shlb
-Essential Files:NSSckbiDebug.shlb
-
-; appcomps
-; Optional - only if you want global history (requires mork) or
-; directory viewer (off by default for ftp view)
-Components:appcompsDebug.shlb
-Components:mozcomps.xpt
-Components:morkDebug.shlb
-
-; download progress
-; Optional - you can implement your own download progress dialog
-; then this is no longer required
-Components:nsProgressDialog.js
-Components:nsHelperAppDlg.js
-Components:nsDownloadProgressListener.js
-Components:downloadmanager.xpt
-
-; rdf
-Components:RDFLibraryDebug.shlb
-Components:rdf.xpt
-
-; session history
-Components:shistory.xpt
-
-; optional typeaheadfind
-; (docs at http://www.mozilla.org/projects/ui/accessibility/typeaheadfind.html)
-;Components:typeaheadfind.shlb
-;Components:typeaheadfind.xpt
-
-; required i18n libraries
-
-Components:i18nDebug.shlb
-Components:unicharutil.xpt
-Components:uconvDebug.shlb
-Components:uconv.xpt
-Components:nslocale.xpt
-Components:chardet.xpt
-Components:UniversalchardetDebug.shlb
-
-
-res:language.properties
-res:langGroups.properties
-res:charsetData.properties
-res:charsetalias.properties
-res:maccharset.properties
-
-; required i18n libs
-Components:nsIStringBundle.xpt
-
-; required prefs files
-defaults:pref:all.js
-defaults:pref:macprefs.js
-
-; required if using nsHelperAppDlg.js component
-defaults:Profile:mimeTypes.rdf
-defaults:Profile:US:mimeTypes.rdf
-
-; uriloader
-Components:uriLoader.xpt
-
-; widget
-Essential Files:WidgetSupportDebug.shlb
-Components:widgetDebug.shlb
-Components:widget.xpt
-
-; xmlextras, optional for XMLHttpRequest support
-Components:xmlextrasDebug.shlb
-Components:xmlextras.xpt
-
-; xpconnect
-Components:XPConnectDebug.shlb
-Components:xpconnect.xpt
-
-; xpcom
-Components:xpcom.xpt
-
-;
-; The build scripts move embed.jar manually because of how and where
-; it is generated.
-;
-; Chrome:embed.jar
-
-
-;
-; res:
-;
-res:html.css
-res:quirk.css
-res:viewsource.css
-res:ua.css
-res:forms.css
-res:arrow.gif
-res:loading-image.gif
-res:broken-image.gif
-res:builtin:htmlBindings.xml
-res:builtin:platformHTMLBindings.xml
-res:entityTables:html40Special.properties
-res:entityTables:htmlEntityVersion.properties
-res:entityTables:html40Latin1.properties
-res:entityTables:html40Symbols.properties
-res:entityTables:transliterate.properties
-res:fonts:fontEncoding.properties
-
-
-;
-; Optional for MathML
-;
-;res:mathml.css
-;res:dtd:mathml.dtd
-;res:entityTables:mathml20.properties
-;res:fonts:mathfont.properties
-;res:fonts:mathfontCMEX10.properties
-;res:fonts:mathfontCMSY10.properties
-;res:fonts:mathfontMath1.properties
-;res:fonts:mathfontMath2.properties
-;res:fonts:mathfontMath4.properties
-;res:fonts:mathfontMTExtra.properties
-;res:fonts:mathfontPUA.properties
-;res:fonts:mathfontSymbol.properties
-;Components:ucvmathDebug.shlb
-
diff --git a/mozilla/embedding/config/basebrowser-win b/mozilla/embedding/config/basebrowser-win
index 61bf75e8ee4..f735c4cbc5f 100644
--- a/mozilla/embedding/config/basebrowser-win
+++ b/mozilla/embedding/config/basebrowser-win
@@ -258,7 +258,6 @@ res\arrow.gif
res\arrowd.gif
res\loading-image.gif
res\broken-image.gif
-res\builtin\htmlBindings.xml
res\builtin\platformHTMLBindings.xml
res\entityTables\html40Special.properties
res\entityTables\htmlEntityVersions.properties
diff --git a/mozilla/layout/build/Makefile.in b/mozilla/layout/build/Makefile.in
index fe3eea8971d..fe2d434c8a1 100644
--- a/mozilla/layout/build/Makefile.in
+++ b/mozilla/layout/build/Makefile.in
@@ -229,6 +229,7 @@ INCLUDES += -I$(srcdir)/../base/src \
-I$(srcdir)/../../content/xul/content/src \
-I$(srcdir)/../../content/xul/templates/src \
-I$(srcdir)/../../content/events/src \
+ -I$(srcdir)/../../content/xbl/src \
-I$(topsrcdir)/view/src \
-I$(topsrcdir)/dom/src/base \
-I$(topsrcdir)/dom/src/jsurl \
diff --git a/mozilla/layout/build/nsLayoutModule.cpp b/mozilla/layout/build/nsLayoutModule.cpp
index 3e1de085ab8..94789d37506 100644
--- a/mozilla/layout/build/nsLayoutModule.cpp
+++ b/mozilla/layout/build/nsLayoutModule.cpp
@@ -137,6 +137,7 @@
#include "nsViewManager.h"
#include "nsContentCreatorFunctions.h"
#include "nsFrame.h"
+#include "nsXBLWindowKeyHandler.h"
// DOM includes
#include "nsDOMException.h"
@@ -419,6 +420,7 @@ Shutdown()
GlobalWindowImpl::ShutDown();
nsDOMClassInfo::ShutDown();
nsTextControlFrame::ShutDown();
+ nsXBLWindowKeyHandler::ShutDown();
}
#ifdef NS_DEBUG
diff --git a/mozilla/widget/src/gtk2/nsNativeKeyBindings.h b/mozilla/widget/src/gtk2/nsNativeKeyBindings.h
index 3baece47055..b9ff54aa60e 100644
--- a/mozilla/widget/src/gtk2/nsNativeKeyBindings.h
+++ b/mozilla/widget/src/gtk2/nsNativeKeyBindings.h
@@ -64,6 +64,12 @@ NS_NATIVEKEYBINDINGS_CONTRACTID_PREFIX "input"
#define NS_NATIVEKEYBINDINGSTEXTAREA_CONTRACTID \
NS_NATIVEKEYBINDINGS_CONTRACTID_PREFIX "textarea"
+#define NS_NATIVEKEYBINDINGSEDITOR_CID \
+{0xf916ebfb, 0x78ef, 0x464b, {0x94, 0xd0, 0xa6, 0xf2, 0xca, 0x32, 0x00, 0xae}}
+
+#define NS_NATIVEKEYBINDINGSEDITOR_CONTRACTID \
+NS_NATIVEKEYBINDINGS_CONTRACTID_PREFIX "editor"
+
class nsNativeKeyBindings : public nsINativeKeyBindings
{
public:
diff --git a/mozilla/widget/src/gtk2/nsWidgetFactory.cpp b/mozilla/widget/src/gtk2/nsWidgetFactory.cpp
index 41eeed704b3..724ad9fe075 100644
--- a/mozilla/widget/src/gtk2/nsWidgetFactory.cpp
+++ b/mozilla/widget/src/gtk2/nsWidgetFactory.cpp
@@ -255,6 +255,10 @@ static const nsModuleComponentInfo components[] =
{ "TextArea Native Keybindings",
NS_NATIVEKEYBINDINGSTEXTAREA_CID,
NS_NATIVEKEYBINDINGSTEXTAREA_CONTRACTID,
+ nsNativeKeyBindingsTextAreaConstructor },
+ { "Editor Native Keybindings",
+ NS_NATIVEKEYBINDINGSEDITOR_CID,
+ NS_NATIVEKEYBINDINGSEDITOR_CONTRACTID,
nsNativeKeyBindingsTextAreaConstructor }
};
diff --git a/mozilla/xpinstall/packager/packages-mac b/mozilla/xpinstall/packager/packages-mac
deleted file mode 100644
index 40d4d8f1da9..00000000000
--- a/mozilla/xpinstall/packager/packages-mac
+++ /dev/null
@@ -1,392 +0,0 @@
-; Package file for MacPPC
-;
-; File format:
-;
-; [] designates a toplevel component. Example: [core]
-; - in front of a file specifies it to be removed from the destination
-; * wildcard support to recursively copy the entire directory
-; ; file comment
-;
-
-viewer:.autoreg
-
-[langenus]
-;
-; en-US
-viewer:chrome:en-US.jar
-viewer:chrome:en-mac.jar
-viewer:chrome:en-unix.jar
-viewer:chrome:en-win.jar
-
-[regus]
-;
-; US
-viewer:chrome:US.jar
-viewer:defaults:profile:US:*
-viewer:defaults:messenger:US:*
-viewer:Search Plugins:*
-
-[deflenus]
-;
-; default files for US
-viewer:defaults:profile:bookmarks.html
-viewer:defaults:profile:panels.rdf
-viewer:defaults:profile:localstore.rdf
-viewer:defaults:profile:search.rdf
-viewer:defaults:profile:mimeTypes.rdf
-viewer:defaults:messenger:mailViews.dat
-viewer:defaults:messenger:Habeas.sfd
-viewer:defaults:messenger:SpamAssassin.sfd
-viewer:defaults:messenger:SpamCatcher.sfd
-viewer:defaults:messenger:SpamPal.sfd
-
-
-[xpcom]
-viewer:Components:libjar.shlb
-viewer:Components:xpinstall.shlb
-viewer:Essential Files:JavaScript.shlb
-viewer:Essential Files:libreg.shlb
-viewer:Essential Files:LiveConnect.shlb
-viewer:Essential Files:NSPR20.shlb
-viewer:Essential Files:NSRuntime.shlb
-viewer:Essential Files:NSStdLib.shlb
-viewer:Essential Files:xpcom.shlb
-viewer:Essential Files:xpistub.shlb
-viewer:Essential Files:zlib.shlb
-
-[browser]
-viewer:Component Registry
-viewer:Mozilla
-viewer:Mozilla Addressbook
-viewer:Mozilla Editor
-viewer:Mozilla Message Compose
-viewer:Mozilla Messenger
-viewer:Mozilla Preferences
-viewer:Mozilla Profile Manager
-viewer:Mozilla Profile Migration
-viewer:Mozilla Profile Wizard
-viewer:Mozilla Select Profile
-; viewer:NSPR Logging
-viewer:Plug-ins:MRJPlugin
-viewer:Plug-ins:MRJPlugin.jar
-viewer:Plug-ins:Default Plug-in
-
-viewer:Essential Files:gfx.shlb
-viewer:Essential Files:libutil.shlb
-viewer:Essential Files:WidgetSupport.shlb
-viewer:Essential Files:XPICleanup
-
-viewer:Essential Files:NSSckbi.shlb
-
-viewer:Essential Files:NSS3.shlb
-viewer:Essential Files:SSL3.shlb
-viewer:Essential Files:SMIME3.shlb
-viewer:Essential Files:Softoken3.shlb
-
-; printing plugin for OSX
-viewer:Essential Files:PrintDialogPDE.plugin
--viewer:Essential Files:PrintDialogPDE.plugin:CVS
--viewer:Essential Files:PrintDialogPDE.plugin:Contents:CVS
--viewer:Essential Files:PrintDialogPDE.plugin:Contents:MacOS:CVS
--viewer:Essential Files:PrintDialogPDE.plugin:Contents:Resources:CVS
--viewer:Essential Files:PrintDialogPDE.plugin:Contents:Resources:English.lproj:CVS
-
-viewer:Components:compreg.dat
-viewer:Components:accessibility.shlb
-viewer:Components:accessibility.xpt
-viewer:Components:docshell.shlb
-viewer:Components:AppShell.shlb
-viewer:Components:appshell.xpt
-viewer:Components:bookmarks.xpt
-viewer:Components:Caps.shlb
-viewer:Components:caps.xpt
-viewer:Components:universalchardet.shlb
-viewer:Components:ChomeRegistry.shlb
-viewer:Components:chrome.xpt
-viewer:Components:Composer.shlb
-viewer:Components:composer.xpt
-viewer:Components:content_htmldoc.xpt
-viewer:Components:content_xmldoc.xpt
-viewer:Components:cookie.xpt
-viewer:Components:Cookie.shlb
-viewer:Components:appcomps.shlb
-viewer:Components:Directory.xpt
-viewer:Components:downloadmanager.xpt
-viewer:Components:docshell.xpt
-viewer:Components:dom.shlb
-viewer:Components:dom.xpt
-viewer:Components:dom_base.xpt
-viewer:Components:dom_core.xpt
-viewer:Components:dom_css.xpt
-viewer:Components:dom_events.xpt
-viewer:Components:dom_html.xpt
-viewer:Components:dom_range.xpt
-viewer:Components:dom_stylesheets.xpt
-viewer:Components:dom_traversal.xpt
-viewer:Components:dom_views.xpt
-viewer:Components:dom_xbl.xpt
-viewer:Components:dom_xpath.xpt
-viewer:Components:dom_xul.xpt
-viewer:Components:editor.xpt
-viewer:Components:HTMLEditor.shlb
-viewer:Components:EditorTxmgr.shlb
-viewer:Components:EmbedBase.xpt
-viewer:Components:EmbedComponents.xpt
-viewer:Components:EmbedComponents.shlb
-viewer:Components:FindComponent.shlb
-viewer:Components:gfx.xpt
-viewer:Components:gfxComponent.shlb
-viewer:Components:history.xpt
-viewer:Components:htmlparser.shlb
-viewer:Components:jsconsole-clhandler.js
-viewer:Components:jsdService.shlb
-viewer:Components:jsdservice.xpt
-viewer:Components:jsurl.xpt
-viewer:Components:layout.shlb
-viewer:Components:layout.xpt
-viewer:Components:chardet.xpt
-viewer:Components:universalchardet.xpt
-viewer:Components:libjar.xpt
-viewer:Components:libpref.shlb
-viewer:Components:libpref.xpt
-viewer:Components:prefextras.shlb
-viewer:Components:prefextras.xpt
-viewer:Components:libutil.xpt
-viewer:Components:i18n.shlb
-viewer:Components:Mork.shlb
-viewer:Components:mozBrowser.xpt
-viewer:Components:mozcomps.xpt
-viewer:Components:nsIStringBundle.xpt
-viewer:Components:nsLocale.xpt
-viewer:Components:nsSidebar.js
-viewer:Components:oji.shlb
-viewer:Components:oji.xpt
-viewer:Components:PIPBOOT.shlb
-viewer:Components:pipboot.xpt
-viewer:Components:PIPNSS.shlb
-viewer:Components:pipnss.xpt
-viewer:Components:PIPPKI.shlb
-viewer:Components:pippki.xpt
-viewer:Components:plugin.shlb
-viewer:Components:prefm.shlb
-viewer:Components:prefm.xpt
-viewer:Components:profile.shlb
-viewer:Components:profileservices.xpt
-viewer:Components:rdf.xpt
-viewer:Components:RDFLibrary.shlb
-viewer:Components:related.xpt
-viewer:Components:search.xpt
-viewer:Components:shistory.xpt
-viewer:Components:tmbm.xpt
-viewer:Components:txtsvc.xpt
-viewer:Components:txmgr.xpt
-viewer:Components:uconv.shlb
-viewer:Components:uconv.xpt
-viewer:Components:unicharutil.xpt
-viewer:Components:uriloader.xpt
-viewer:Components:Wallet.shlb
-viewer:Components:wallet.xpt
-viewer:Components:WalletViewers.shlb
-viewer:Components:webshell.xpt
-viewer:Components:embeddingbrowser.xpt
-viewer:Components:widget.xpt
-viewer:Components:windowds.xpt
-viewer:Components:xpcom.xpt
-viewer:Components:XPConnect.shlb
-viewer:Components:xpconnect.xpt
-viewer:Components:xpinstall.xpt
-viewer:Components:widget.shlb
-viewer:Components:autocomplete.xpt
-viewer:Components:xml-rpc.xpt
-viewer:Components:nsDictionary.js
-viewer:Components:nsProxyAutoConfig.js
-viewer:Components:nsXmlRpcClient.js
-viewer:Components:xmlextras.xpt
-viewer:Components:xmlextras.shlb
-viewer:Components:nsHelperAppDlg.js
-viewer:Components:nsProgressDialog.js
-viewer:Components:nsDownloadProgressListener.js
-viewer:Components:transformiix.shlb
-viewer:Components:nsCloseAllWindows.js
-viewer:Components:websrvcs.shlb
-viewer:Components:websrvcs.xpt
-
-viewer:Components:libimg2.shlb
-viewer:Components:icondecoder.shlb
-viewer:Components:icondecoder.xpt
-viewer:Components:mngdecoder.shlb
-
-viewer:Components:Necko.shlb
-viewer:Components:Necko2.shlb
-viewer:Components:necko.xpt
-viewer:Components:cache.xpt
-
-viewer:Components:typeaheadfind.shlb
-viewer:Components:typeaheadfind.xpt
-
-; LDAP components need to be in the browser for AutoConfig
-viewer:Components:mozldap.shlb
-viewer:Components:mozldap.xpt
-viewer:Components:ldapAutoComplete.xpt
-viewer:Essential Files:LDAPClient.shlb
-
-; p3p
-viewer:Components:p3p.xpt
-viewer:Components:p3p.shlb
-
-viewer:chrome:help.jar
-viewer:chrome:comm.jar
-viewer:chrome:content-packs.jar
-viewer:chrome:toolkit.jar
-viewer:chrome:modern.jar
-viewer:chrome:classic.jar
-viewer:chrome:pippki.jar
-viewer:chrome:pipnss.jar
-;Include this for "debug" testing - remove for actual beta release:
-;-viewer:chrome:comm:content:editor:TextEditorAppShell.xul
-
-; all the pref files must be part of base
-; to prevent migration bugs
-viewer:defaults:pref:*
-viewer:defaults:autoconfig:*
-viewer:res:arrow.gif
-viewer:res:loading-image.gif
-viewer:res:broken-image.gif
-viewer:res:charsetalias.properties
-viewer:res:charsetData.properties
-viewer:res:langGroups.properties
-viewer:res:language.properties
-viewer:res:entityTables:*
-viewer:defaults:wallet:SchemaConcat.tbl
-viewer:defaults:wallet:FieldSchema.tbl
-viewer:defaults:wallet:VcardSchema.tbl
-viewer:defaults:wallet:DistinguishedSchema.tbl
-viewer:defaults:wallet:SchemaStrings.tbl
-viewer:defaults:wallet:PositionalSchema.tbl
-viewer:defaults:wallet:StateSchema.tbl
-viewer:res:dtd:*
-viewer:res:html:*
-viewer:res:html.css
-viewer:res:quirk.css
-viewer:res:viewsource.css
-viewer:res:EditorOverride.css
-viewer:res:grabber.gif
-viewer:res:table-add-column-after-active.gif
-viewer:res:table-add-column-after-hover.gif
-viewer:res:table-add-column-after.gif
-viewer:res:table-add-column-before-active.gif
-viewer:res:table-add-column-before-hover.gif
-viewer:res:table-add-column-before.gif
-viewer:res:table-add-row-after-active.gif
-viewer:res:table-add-row-after-hover.gif
-viewer:res:table-add-row-after.gif
-viewer:res:table-add-row-before-active.gif
-viewer:res:table-add-row-before-hover.gif
-viewer:res:table-add-row-before.gif
-viewer:res:table-remove-column-active.gif
-viewer:res:table-remove-column-hover.gif
-viewer:res:table-remove-column.gif
-viewer:res:table-remove-row-active.gif
-viewer:res:table-remove-row-hover.gif
-viewer:res:table-remove-row.gif
-viewer:res:maccharset.properties
-viewer:res:rdf:dom-test-4.css
-viewer:res:rdf:folder-closed.gif
-viewer:res:rdf:folder-open.gif
-viewer:res:rdf:loading.gif
-viewer:res:rdf:LocalStore.css
-viewer:res:rdf:LocalStore.rdf
-viewer:res:rdf:online.gif
-viewer:res:rdf:unread.gif
-viewer:res:samples:*
-viewer:res:cmessage.txt
-; the line above will skip aliases to subdirectories; let's list them explicitly
-viewer:res:samples:sampleimages
-viewer:res:builtin:htmlBindings.xml
-viewer:res:builtin:platformHTMLBindings.xml
-
--viewer:res:samples:.cvsignore
--viewer:res:samples:Makefile.in
--viewer:res:samples:makefile.win
--viewer:res:samples:sampleimages:.cvsignore
--viewer:res:samples:sampleimages:CVS
--viewer:res:samples:sampleimages:Makefile.in
--viewer:res:samples:sampleimages:makefile.win
-viewer:res:strres-test.js
-viewer:res:strres-test.xul
-viewer:res:throbber:*
-viewer:res:ua.css
-viewer:res:forms.css
-viewer:res:platform-forms.css
-
-; MathML
-viewer:res:mathml.css
-viewer:res:fonts:*
-viewer:Components:ucvmath.shlb
-
-[mail]
-viewer:chrome:messenger.jar
-viewer:Components:MsgAddrbook.shlb
-viewer:Components:MsgAddrbook.xpt
-viewer:Components:mimeEmitter.shlb
-viewer:Components:mailnews.shlb
-viewer:Components:mailnews.xpt
-viewer:Components:Mime.shlb
-viewer:Components:Mime.xpt
-viewer:Components:MsgCompose.shlb
-viewer:Components:MsgCompose.xpt
-viewer:Components:MsgDB.shlb
-viewer:Components:MsgDB.xpt
-viewer:Components:MsgImap.shlb
-viewer:Components:MsgImap.xpt
-viewer:Components:MsgLocal.shlb
-viewer:Components:MsgLocal.xpt
-viewer:Components:MsgNews.shlb
-viewer:Components:MsgNews.xpt
-viewer:Components:vcard.shlb
-viewer:Components:smime.shlb
-viewer:Components:msgImport.shlb
-viewer:Components:msgImport.xpt
-viewer:Components:msgImportText.shlb
-viewer:Components:msgImportEudora.shlb
-viewer:Components:msgImportComm4xM.shlb
-viewer:Components:msgImportComm4xM.xpt
-viewer:Components:nsLDAPPrefsService.js
-viewer:Components:msgsmime.shlb
-viewer:Components:msgsmime.xpt
-viewer:Components:smime-service.js
-viewer:Components:msgmdn.shlb
-viewer:Components:msgmdn.xpt
-viewer:Components:mdn-service.js
-viewer:Components:bayesianFilter.shlb
-viewer:Components:mailviews.xpt
-viewer:Components:mailviews.shlb
-viewer:Components:offlineStartup.js
-
-[chatzilla]
-viewer:Components:chatzilla-service.js
-viewer:chrome:chatzilla.jar
-
-[venkman]
-viewer:Components:venkman-service.js
-viewer:chrome:venkman.jar
-
-[talkback]
-viewer:Components:QFA.shlb
-viewer:Components:QFA.xpt
-viewer:TalkBack:*
-
-[inspector]
-viewer:Components:inspector-cmdline.js
-viewer:Components:inspector.shlb
-viewer:Components:inspector.xpt
-viewer:chrome:inspector.jar
-viewer:defaults:pref:inspector.js
-viewer:res:inspector:viewer-registry.rdf
-viewer:res:inspector:search-registry.rdf
-
-[spellcheck]
-viewer:Components:libmyspell.dylib
-viewer:Components:libspellchecker.dylib
-viewer:Components:spellchecker.xpt
-viewer:Components:myspell:*
diff --git a/mozilla/xpinstall/packager/packages-os2 b/mozilla/xpinstall/packager/packages-os2
index 4481a08fc69..bffdbfe8c0d 100644
--- a/mozilla/xpinstall/packager/packages-os2
+++ b/mozilla/xpinstall/packager/packages-os2
@@ -366,7 +366,6 @@ bin/res/rdf/loading.gif
bin/res/throbber/*
;debug menus reference samples dir - remove for actual releases:
bin/res/samples/*
-bin/res/builtin/htmlBindings.xml
bin/res/builtin/platformHTMLBindings.xml
[mail]
diff --git a/mozilla/xpinstall/packager/packages-static-win b/mozilla/xpinstall/packager/packages-static-win
index 10967f298e9..7e48fce3a2e 100644
--- a/mozilla/xpinstall/packager/packages-static-win
+++ b/mozilla/xpinstall/packager/packages-static-win
@@ -280,7 +280,6 @@ bin\res\rdf\loading.gif
bin\res\throbber\*
;debug menus reference samples dir - remove for actual releases:
bin\res\samples\*
-bin\res\builtin\htmlBindings.xml
bin\res\builtin\platformHTMLBindings.xml
[mail]
diff --git a/mozilla/xpinstall/packager/packages-unix b/mozilla/xpinstall/packager/packages-unix
index c86d659203f..cd358051b86 100644
--- a/mozilla/xpinstall/packager/packages-unix
+++ b/mozilla/xpinstall/packager/packages-unix
@@ -357,7 +357,6 @@ bin/res/fonts/*
bin/res/dtd/*
;debug menus reference samples dir - remove for actual releases:
bin/res/samples/*
-bin/res/builtin/htmlBindings.xml
bin/res/builtin/platformHTMLBindings.xml