Merge m-c to m-i. a=me CLOSED TREE

This commit is contained in:
Kyle Huey 2011-12-14 08:09:02 -05:00
Родитель a3f9820512 957d1ac56a
Коммит 01518e32c9
47 изменённых файлов: 1240 добавлений и 1410 удалений

Просмотреть файл

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = chrome locales app
DIRS = chrome components locales app
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/testing/testsuite-targets.mk

Просмотреть файл

@ -65,11 +65,7 @@ pref("browser.cache.memory.capacity", 1024); // kilobytes
pref("image.cache.size", 1048576); // bytes
/* offline cache prefs */
pref("browser.offline-apps.notify", true);
pref("browser.cache.offline.enable", true);
pref("browser.cache.offline.capacity", 5120); // kilobytes
pref("offline-apps.quota.max", 2048); // kilobytes
pref("offline-apps.quota.warn", 1024); // kilobytes
pref("browser.offline-apps.notify", false);
/* protocol warning prefs */
pref("network.protocol-handler.warn-external.tel", false);

Просмотреть файл

@ -68,6 +68,7 @@ function startupHttpd(baseDir, port) {
Services.scriptloader.loadSubScript(httpdURL, httpd);
let server = new httpd.nsHttpServer();
server.registerDirectory('/', new LocalFile(baseDir));
server.registerContentType('appcache', 'text/cache-manifest');
server.start(port);
}
@ -114,6 +115,7 @@ var shell = {
window.controllers.appendController(this);
window.addEventListener('keypress', this);
window.addEventListener('MozApplicationManifest', this);
this.home.addEventListener('load', this, true);
try {
@ -147,6 +149,7 @@ var shell = {
stop: function shell_stop() {
window.controllers.removeController(this);
window.removeEventListener('keypress', this);
window.removeEventListener('MozApplicationManifest', this);
},
supportsCommand: function shell_supportsCommand(cmd) {
@ -195,6 +198,29 @@ var shell = {
this.home.removeEventListener('load', this, true);
this.sendEvent(window, 'ContentStart');
break;
case 'MozApplicationManifest':
try {
let contentWindow = evt.originalTarget.defaultView;
let documentElement = contentWindow.document.documentElement;
if (!documentElement)
return;
let manifest = documentElement.getAttribute("manifest");
if (!manifest)
return;
let documentURI = contentWindow.document.documentURIObject;
let manifestURI = Services.io.newURI(manifest, null, documentURI);
Services.perms.add(documentURI, 'offline-app',
Ci.nsIPermissionManager.ALLOW_ACTION);
let updateService = Cc['@mozilla.org/offlinecacheupdate-service;1']
.getService(Ci.nsIOfflineCacheUpdateService);
updateService.scheduleUpdate(manifestURI, documentURI, window);
} catch (e) {
dump('Error while creating offline cache: ' + e + '\n');
}
break;
}
},
sendEvent: function shell_sendEvent(content, type, details) {

Просмотреть файл

Просмотреть файл

@ -1,4 +1,3 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
@ -12,18 +11,18 @@
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
# The Original Code is Mozilla.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Mozilla Foundation <http://www.mozilla.org/>.
# Portions created by the Initial Developer are Copyright (C) 2011
# 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"),
# 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
@ -35,23 +34,18 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = uconv
LIBRARY_NAME = ucvxutil_s
EXPORT_LIBRARY = 1
FORCE_STATIC_LIB = 1
MODULE = B2GComponents
XPIDL_MODULE = B2GComponents
MODULE_NAME = nsExternalUCUtil
VPATH += $(srcdir)/..
include $(srcdir)/../objs.mk
EXTRA_PP_COMPONENTS = \
B2GComponents.manifest \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -42,6 +42,7 @@ security/manager/locales/Makefile
b2g/app/Makefile
$MOZ_BRANDING_DIRECTORY/Makefile
b2g/chrome/Makefile
b2g/components/Makefile
b2g/installer/Makefile
b2g/locales/Makefile
b2g/Makefile"

Просмотреть файл

@ -221,8 +221,9 @@ var gEditItemOverlay = {
this._allTags = this._getCommonTags();
this._initTextField("tagsField", this._allTags.join(", "), false);
this._element("itemsCountText").value =
PlacesUIUtils.getFormattedString("detailsPane.multipleItems",
[this._itemIds.length]);
PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel",
this._itemIds.length,
[this._itemIds.length]);
}
// tags selector

Просмотреть файл

@ -713,8 +713,8 @@ var PlacesOrganizer = {
var itemsCountLabel = document.getElementById("itemsCountText");
selectItemDesc.hidden = false;
itemsCountLabel.value =
PlacesUIUtils.getFormattedString("detailsPane.multipleItems",
[aNodeList.length]);
PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel",
aNodeList.length, [aNodeList.length]);
infoBox.hidden = true;
return;
}
@ -743,13 +743,9 @@ var PlacesOrganizer = {
}
else {
selectItemDesc.hidden = false;
if (rowCount == 1)
itemsCountLabel.value = PlacesUIUtils.getString("detailsPane.oneItem");
else {
itemsCountLabel.value =
PlacesUIUtils.getFormattedString("detailsPane.multipleItems",
[rowCount]);
}
itemsCountLabel.value =
PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel",
rowCount, [rowCount]);
}
}
},

Просмотреть файл

@ -50,6 +50,9 @@ var Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
"resource://gre/modules/PluralForm.jsm");
XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() {
Cu.import("resource://gre/modules/PlacesUtils.jsm");
return PlacesUtils;
@ -79,6 +82,31 @@ var PlacesUIUtils = {
return bundle.formatStringFromName(key, params, params.length);
},
/**
* Get a localized plural string for the specified key name and numeric value
* substituting parameters.
*
* @param aKey
* String, key for looking up the localized string in the bundle
* @param aNumber
* Number based on which the final localized form is looked up
* @param aParams
* Array whose items will substitute #1, #2,... #n parameters
* in the string.
*
* @see https://developer.mozilla.org/en/Localization_and_Plurals
* @return The localized plural string.
*/
getPluralString: function PUIU_getPluralString(aKey, aNumber, aParams) {
let str = PluralForm.get(aNumber, bundle.GetStringFromName(aKey));
// Replace #1 with aParams[0], #2 with aParams[1], and so on.
return str.replace(/\#(\d+)/g, function (matchedId, matchedNumber) {
let param = aParams[parseInt(matchedNumber, 10) - 1];
return param !== undefined ? param : matchedId;
});
},
getString: function PUIU_getString(key) {
return bundle.GetStringFromName(key);
},

Просмотреть файл

@ -51,9 +51,6 @@
#else
@BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@
#endif
#ifdef XP_WIN
@BINPATH@/components/@DLL_PREFIX@uconvd@DLL_SUFFIX@
#endif
#ifdef XP_MACOSX
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/
@BINPATH@/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@

Просмотреть файл

@ -72,6 +72,7 @@ components/sidebar.xpt
components/dom_telephony.xpt
components/dom_system_b2g.xpt
#endif
components/uconvd.dll
components/WeaveCrypto.js
components/WeaveCrypto.manifest
components/xmlextras.xpt

Просмотреть файл

@ -59,8 +59,11 @@ saveSearch.inputLabel=Name:
saveSearch.inputDefaultText=New Search
detailsPane.noItems=No items
detailsPane.oneItem=One item
detailsPane.multipleItems=%S items
# LOCALIZATION NOTE (detailsPane.itemsCountLabel): Semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 number of items
# example: 111 items
detailsPane.itemsCountLabel=One item;#1 items
mostVisitedTitle=Most Visited
recentlyBookmarkedTitle=Recently Bookmarked

Просмотреть файл

@ -548,7 +548,7 @@ toolbarbutton.bookmark-item[open="true"] {
-moz-padding-end: 2px;
}
.bookmark-item > .toolbarbutton-icon {
.bookmark-item:not(#bookmarks-menu-button) > .toolbarbutton-icon {
width: 16px;
height: 16px;
}

Просмотреть файл

@ -478,6 +478,7 @@ MOZ_GRAPHITE_LIBS = @MOZ_GRAPHITE_LIBS@
MOZ_GRAPHITE = @MOZ_GRAPHITE@
MOZ_OTS_LIBS = @MOZ_OTS_LIBS@
MOZ_SKIA_LIBS = @MOZ_SKIA_LIBS@
MOZ_ENABLE_SKIA = @MOZ_ENABLE_SKIA@
MOZ_NATIVE_SQLITE = @MOZ_NATIVE_SQLITE@
SQLITE_CFLAGS = @SQLITE_CFLAGS@

Просмотреть файл

@ -8018,6 +8018,21 @@ AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_GMODULE_LIBS)
dnl ========================================================
dnl Graphics checks.
dnl ========================================================
if test "${OS_ARCH}" = "Darwin" -o "${OS_TARGET}" = "Android"; then
MOZ_ENABLE_SKIA=1
else
MOZ_ENABLE_SKIA=
fi
MOZ_ARG_ENABLE_BOOL(skia,
[ --enable-skia Enable use of Skia],
MOZ_ENABLE_SKIA=1,
MOZ_ENABLE_SKIA=)
dnl ========================================================
dnl Check for cairo
dnl ========================================================
@ -8198,7 +8213,13 @@ AC_SUBST(MOZ_OTS_LIBS)
dnl ========================================================
dnl Skia
dnl ========================================================
MOZ_SKIA_LIBS='$(DEPTH)/gfx/skia/$(LIB_PREFIX)skia.$(LIB_SUFFIX)'
if test "$MOZ_ENABLE_SKIA"; then
MOZ_SKIA_LIBS='$(DEPTH)/gfx/skia/$(LIB_PREFIX)skia.$(LIB_SUFFIX)'
AC_DEFINE(MOZ_ENABLE_SKIA)
else
MOZ_SKIA_LIBS=
fi
AC_SUBST(MOZ_ENABLE_SKIA)
AC_SUBST(MOZ_SKIA_LIBS)
dnl ========================================================

Просмотреть файл

@ -100,12 +100,10 @@ BatteryManager::Init(nsPIDOMWindow *aWindow, nsIScriptContext* aScriptContext)
hal::RegisterBatteryObserver(this);
hal::BatteryInformation* batteryInfo = new hal::BatteryInformation();
hal::GetCurrentBatteryInformation(batteryInfo);
hal::BatteryInformation batteryInfo;
hal::GetCurrentBatteryInformation(&batteryInfo);
UpdateFromBatteryInfo(*batteryInfo);
delete batteryInfo;
UpdateFromBatteryInfo(batteryInfo);
}
void

Просмотреть файл

@ -2001,19 +2001,6 @@ _releasevariantvalue(NPVariant* variant)
VOID_TO_NPVARIANT(*variant);
}
bool NP_CALLBACK
_tostring(NPObject* npobj, NPVariant *result)
{
NS_ERROR("Write me!");
if (!NS_IsMainThread()) {
NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_tostring called from the wrong thread\n"));
return false;
}
return false;
}
void NP_CALLBACK
_setexception(NPObject* npobj, const NPUTF8 *message)
{

Просмотреть файл

@ -75,25 +75,29 @@ CPPSRCS = \
DEFINES += -DMOZ_GFX -DUSE_CAIRO
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
ifdef MOZ_ENABLE_SKIA
CPPSRCS += \
SourceSurfaceSkia.cpp \
DrawTargetSkia.cpp \
PathSkia.cpp \
SourceSurfaceSkia.cpp \
DrawTargetSkia.cpp \
PathSkia.cpp \
ScaledFontSkia.cpp \
ScaledFontMac.cpp \
$(NULL)
DEFINES += -DUSE_SKIA
endif
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
ifdef MOZ_ENABLE_SKIA
CPPSRCS += \
ScaledFontMac.cpp \
$(NULL)
endif
endif
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
CPPSRCS += \
SourceSurfaceSkia.cpp \
DrawTargetSkia.cpp \
ScaledFontSkia.cpp \
PathSkia.cpp \
$(NULL)
DEFINES += -DUSE_SKIA -DSK_BUILD_FOR_ANDROID_NDK
DEFINES += -DSK_BUILD_FOR_ANDROID_NDK
endif
DEFINES += -DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0
@ -109,13 +113,14 @@ CPPSRCS += \
SourceSurfaceD2DTarget.cpp \
PathD2D.cpp \
ScaledFontDWrite.cpp \
SourceSurfaceSkia.cpp \
DrawTargetSkia.cpp \
PathSkia.cpp \
ScaledFontSkia.cpp \
$(NULL)
DEFINES += -DWIN32
ifdef MOZ_ENABLE_SKIA
CPPSRCS += \
ScaledFontWin.cpp \
$(NULL)
DEFINES += -DWIN32 -DUSE_SKIA
endif
endif
#ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)

Просмотреть файл

@ -54,7 +54,7 @@ endif
DIRS += 2d ycbcr angle src qcms gl layers harfbuzz/src ots/src thebes ipc
ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT)))
ifdef MOZ_ENABLE_SKIA
DIRS += skia
endif

Просмотреть файл

@ -1,96 +0,0 @@
# vim:set noet ts=8:
# ***** 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 = uconvd
LIBRARY_NAME = uconvd
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = UConvData
ifeq (WINNT,$(OS_TARGET))
FORCE_SHARED_LIB = 1
else
LIBXUL_LIBRARY = 1
endif
# To avoid conflict with OS/2 system uconv.dll
SHORT_LIBNAME = mzuconvd
CPPSRCS = \
nsUConvDataModule.cpp \
$(NULL)
LOCAL_INCLUDES = -I$(srcdir)/../util \
-I$(srcdir)/../ucvlatin \
-I$(srcdir)/../ucvibm \
-I$(srcdir)/../ucvja \
-I$(srcdir)/../ucvtw2 \
-I$(srcdir)/../ucvtw \
-I$(srcdir)/../ucvko \
-I$(srcdir)/../ucvcn \
$(NULL)
EXTRA_DSO_LDOPTS += \
$(XPCOM_GLUE_LDOPTS) \
$(XPCOM_LIBS) \
$(MOZ_JS_LIBS) \
$(NSPR_LIBS) \
$(MOZALLOC_LIB) \
$(NULL)
SHARED_LIBRARY_LIBS += \
../ucvlatin/$(LIB_PREFIX)ucvlatin_s.$(LIB_SUFFIX) \
../ucvibm/$(LIB_PREFIX)ucvibm_s.$(LIB_SUFFIX) \
../ucvja/$(LIB_PREFIX)ucvja_s.$(LIB_SUFFIX) \
../ucvtw2/$(LIB_PREFIX)ucvtw2_s.$(LIB_SUFFIX) \
../ucvtw/$(LIB_PREFIX)ucvtw_s.$(LIB_SUFFIX) \
../ucvko/$(LIB_PREFIX)ucvko_s.$(LIB_SUFFIX) \
../ucvcn/$(LIB_PREFIX)ucvcn_s.$(LIB_SUFFIX) \
$(NULL)
ifdef FORCE_SHARED_LIB
SHARED_LIBRARY_LIBS += \
../util/external/$(LIB_PREFIX)ucvxutil_s.$(LIB_SUFFIX) \
$(NULL)
endif
include $(topsrcdir)/config/rules.mk

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -76,7 +76,25 @@ ifneq (,$(INTEL_ARCHITECTURE))
CPPSRCS += nsUTF8ToUnicodeSSE2.cpp
endif
LOCAL_INCLUDES = -I$(srcdir)/../util
LOCAL_INCLUDES = -I$(srcdir)/../util \
-I$(srcdir)/../ucvlatin \
-I$(srcdir)/../ucvibm \
-I$(srcdir)/../ucvja \
-I$(srcdir)/../ucvtw2 \
-I$(srcdir)/../ucvtw \
-I$(srcdir)/../ucvko \
-I$(srcdir)/../ucvcn \
$(NULL)
SHARED_LIBRARY_LIBS += \
../ucvlatin/$(LIB_PREFIX)ucvlatin_s.$(LIB_SUFFIX) \
../ucvibm/$(LIB_PREFIX)ucvibm_s.$(LIB_SUFFIX) \
../ucvja/$(LIB_PREFIX)ucvja_s.$(LIB_SUFFIX) \
../ucvtw2/$(LIB_PREFIX)ucvtw2_s.$(LIB_SUFFIX) \
../ucvtw/$(LIB_PREFIX)ucvtw_s.$(LIB_SUFFIX) \
../ucvko/$(LIB_PREFIX)ucvko_s.$(LIB_SUFFIX) \
../ucvcn/$(LIB_PREFIX)ucvcn_s.$(LIB_SUFFIX) \
$(NULL)
include $(topsrcdir)/config/rules.mk

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -45,9 +45,8 @@ include $(DEPTH)/config/autoconf.mk
MODULE = ucvcn
LIBRARY_NAME = ucvcn_s
FORCE_STATIC_LIB=1
ifneq (WINNT,$(OS_TARGET))
LIBXUL_LIBRARY = 1
endif
CPPSRCS = \
nsGB2312ToUnicodeV2.cpp \

Просмотреть файл

@ -39,7 +39,6 @@
#include "nsUCSupport.h"
#include "nsICharsetConverterManager.h"
#include "nsIServiceManager.h"
#include "nsServiceManagerUtils.h"
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);

Просмотреть файл

@ -46,9 +46,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = ucvibm
LIBRARY_NAME = ucvibm_s
FORCE_STATIC_LIB = 1
ifneq (WINNT,$(OS_TARGET))
LIBXUL_LIBRARY = 1
endif
CPPSRCS = \

Просмотреть файл

@ -46,9 +46,8 @@ include $(DEPTH)/config/autoconf.mk
MODULE = ucvja
LIBRARY_NAME = ucvja_s
FORCE_STATIC_LIB = 1
ifneq (WINNT,$(OS_TARGET))
LIBXUL_LIBRARY = 1
endif
CPPSRCS = \
nsJapaneseToUnicode.cpp \

Просмотреть файл

@ -42,7 +42,6 @@
#include "nsICharsetConverterManager.h"
#include "nsIServiceManager.h"
#include "nsServiceManagerUtils.h"
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
#ifdef XP_OS2

Просмотреть файл

@ -45,9 +45,8 @@ include $(DEPTH)/config/autoconf.mk
MODULE = ucvko
LIBRARY_NAME = ucvko_s
FORCE_STATIC_LIB=1
ifneq (WINNT,$(OS_TARGET))
LIBXUL_LIBRARY = 1
endif
CPPSRCS = \
nsEUCKRToUnicode.cpp \

Просмотреть файл

@ -39,7 +39,6 @@
#include "nsUCSupport.h"
#include "nsICharsetConverterManager.h"
#include "nsIServiceManager.h"
#include "nsServiceManagerUtils.h"
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);

Просмотреть файл

@ -45,9 +45,8 @@ include $(DEPTH)/config/autoconf.mk
MODULE = ucvlatin
LIBRARY_NAME = ucvlatin_s
FORCE_STATIC_LIB = 1
ifneq (WINNT,$(OS_TARGET))
LIBXUL_LIBRARY = 1
endif
CPPSRCS = \
nsAsciiToUnicode.cpp \

Просмотреть файл

@ -45,9 +45,8 @@ include $(DEPTH)/config/autoconf.mk
MODULE = ucvtw
LIBRARY_NAME = ucvtw_s
FORCE_STATIC_LIB=1
ifneq (WINNT,$(OS_TARGET))
LIBXUL_LIBRARY = 1
endif
CPPSRCS = \
nsBIG5ToUnicode.cpp \

Просмотреть файл

@ -45,9 +45,8 @@ include $(DEPTH)/config/autoconf.mk
MODULE = ucvtw2
LIBRARY_NAME = ucvtw2_s
FORCE_STATIC_LIB=1
ifneq (WINNT,$(OS_TARGET))
LIBXUL_LIBRARY = 1
endif
CPPSRCS = \
nsEUCTWToUnicode.cpp \

Просмотреть файл

@ -42,8 +42,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = external
MODULE = uconv
LIBRARY_NAME = ucvutil_s
EXPORT_LIBRARY = 1
@ -52,7 +50,18 @@ LIBXUL_LIBRARY = 1
MODULE_NAME = nsUCUtil
include $(srcdir)/objs.mk
CSRCS = \
ugen.c \
uscan.c \
umap.c \
$(NULL)
CPPSRCS = \
nsUCSupport.cpp \
nsUCConstructors.cpp \
nsUnicodeDecodeHelper.cpp \
nsUnicodeEncodeHelper.cpp \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -1,12 +0,0 @@
CSRCS = \
ugen.c \
uscan.c \
umap.c \
$(NULL)
CPPSRCS = \
nsUCSupport.cpp \
nsUCConstructors.cpp \
nsUnicodeDecodeHelper.cpp \
nsUnicodeEncodeHelper.cpp \
$(NULL)

Просмотреть файл

@ -312,7 +312,6 @@ class XPCShellTests(object):
On a remote system, this is more complex and we need to overload this function.
"""
cmd = wrapCommand(cmd)
print cmd
proc = Popen(cmd, stdout=stdout, stderr=stderr,
env=env, cwd=cwd)
return proc

Просмотреть файл

@ -200,12 +200,6 @@ COMPONENT_LIBS += \
windowds \
$(NULL)
ifneq (WINNT,$(OS_ARCH))
COMPONENT_LIBS += \
uconvd \
$(NULL)
endif
ifdef BUILD_CTYPES
COMPONENT_LIBS += \
jsctypes \
@ -419,7 +413,7 @@ ifdef HAVE_CLOCK_MONOTONIC
EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
endif
ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT)))
ifdef MOZ_ENABLE_SKIA
EXTRA_DSO_LDOPTS += $(MOZ_SKIA_LIBS)
endif

Просмотреть файл

@ -205,15 +205,8 @@
#endif
#endif
#ifdef XP_WIN
#define UCONV_DATA_MODULE
#else
#define UCONV_DATA_MODULE MODULE(nsUConvDataModule)
#endif
#define XUL_MODULES \
MODULE(nsUConvModule) \
UCONV_DATA_MODULE \
MODULE(nsI18nModule) \
MODULE(nsChardetModule) \
UNIVERSALCHARDET_MODULE \

Просмотреть файл

@ -237,18 +237,10 @@ ifdef APP_LIBXUL_DIRS
tier_platform_dirs += $(APP_LIBXUL_DIRS)
endif
ifneq (WINNT,$(OS_ARCH))
tier_platform_dirs += intl/uconv/datamodule
endif
tier_platform_dirs += toolkit/library
tier_platform_dirs += xpcom/stub
ifeq (WINNT,$(OS_ARCH))
tier_platform_dirs += intl/uconv/datamodule
endif
ifdef NS_TRACE_MALLOC
tier_platform_dirs += tools/trace-malloc
endif

Просмотреть файл

@ -46,6 +46,7 @@ typedef struct {
const unsigned char *mask_bits;
int hot_x;
int hot_y;
const char *hash;
} nsGtkCursor;
/* MOZ_CURSOR_HAND_GRAB */
@ -415,21 +416,23 @@ enum {
MOZ_CURSOR_NONE
};
// create custom pixmap cursor
// create custom pixmap cursor. The hash values must stay in sync with the
// bitmap data above. To see the hash function, have a look at XcursorImageHash
// in libXcursor
static const nsGtkCursor GtkCursors[] = {
{ moz_hand_grab_bits, moz_hand_grab_mask_bits, 10, 10 },
{ moz_hand_grabbing_bits, moz_hand_grabbing_mask_bits, 10, 10 },
{ moz_copy_bits, moz_copy_mask_bits, 2, 2 },
{ moz_alias_bits, moz_alias_mask_bits, 2, 2 },
{ moz_menu_bits, moz_menu_mask_bits, 2, 2 },
{ moz_spinning_bits, moz_spinning_mask_bits, 2, 2 },
{ moz_zoom_in_bits, moz_zoom_in_mask_bits, 6, 6 },
{ moz_zoom_out_bits, moz_zoom_out_mask_bits, 6, 6 },
{ moz_not_allowed_bits, moz_not_allowed_mask_bits, 9, 9 },
{ moz_vertical_text_bits, moz_vertical_text_mask_bits, 8, 4 },
{ moz_nesw_resize_bits, moz_nesw_resize_mask_bits, 8, 8 },
{ moz_nwse_resize_bits, moz_nwse_resize_mask_bits, 8, 8 },
{ moz_none_bits, moz_none_mask_bits, 0, 0 }
{ moz_hand_grab_bits, moz_hand_grab_mask_bits, 10, 10, "5aca4d189052212118709018842178c0" },
{ moz_hand_grabbing_bits, moz_hand_grabbing_mask_bits, 10, 10, "208530c400c041818281048008011002" },
{ moz_copy_bits, moz_copy_mask_bits, 2, 2, "08ffe1cb5fe6fc01f906f1c063814ccf" },
{ moz_alias_bits, moz_alias_mask_bits, 2, 2, "0876e1c15ff2fc01f906f1c363074c0f" },
{ moz_menu_bits, moz_menu_mask_bits, 2, 2, "08ffe1e65f80fcfdf9fff11263e74c48" },
{ moz_spinning_bits, moz_spinning_mask_bits, 2, 2, "08e8e1c95fe2fc01f976f1e063a24ccd" },
{ moz_zoom_in_bits, moz_zoom_in_mask_bits, 6, 6, "f41c0e382c94c0958e07017e42b00462" },
{ moz_zoom_out_bits, moz_zoom_out_mask_bits, 6, 6, "f41c0e382c97c0938e07017e42800402" },
{ moz_not_allowed_bits, moz_not_allowed_mask_bits, 9, 9, "03b6e0fcb3499374a867d041f52298f0" },
{ moz_vertical_text_bits, moz_vertical_text_mask_bits, 8, 4, "048008013003cff3c00c801001200000" },
{ moz_nesw_resize_bits, moz_nesw_resize_mask_bits, 8, 8, "50585d75b494802d0151028115016902" },
{ moz_nwse_resize_bits, moz_nwse_resize_mask_bits, 8, 8, "38c5dff7c7b8962045400281044508d2" },
{ moz_none_bits, moz_none_mask_bits, 0, 0, NULL }
};
#endif /* nsGtkCursors_h__ */

Просмотреть файл

@ -203,6 +203,8 @@ static void key_event_to_context_menu_event(nsMouseEvent &aEvent,
static int is_parent_ungrab_enter(GdkEventCrossing *aEvent);
static int is_parent_grab_leave(GdkEventCrossing *aEvent);
static void GetBrandName(nsXPIDLString& brandName);
/* callbacks from widgets */
#if defined(MOZ_WIDGET_GTK2)
static gboolean expose_event_cb (GtkWidget *widget,
@ -1846,39 +1848,63 @@ nsWindow::SetIcon(const nsAString& aIconSpec)
if (!mShell)
return NS_OK;
nsCAutoString iconName;
if (aIconSpec.EqualsLiteral("default")) {
nsXPIDLString brandName;
GetBrandName(brandName);
AppendUTF16toUTF8(brandName, iconName);
ToLowerCase(iconName);
} else {
AppendUTF16toUTF8(aIconSpec, iconName);
}
nsCOMPtr<nsILocalFile> iconFile;
nsCAutoString path;
nsTArray<nsCString> iconList;
// Look for icons with the following suffixes appended to the base name.
// The last two entries (for the old XPM format) will be ignored unless
// no icons are found using the other suffixes. XPM icons are depricated.
bool foundIcon = gtk_icon_theme_has_icon(gtk_icon_theme_get_default(),
iconName.get());
const char extensions[6][7] = { ".png", "16.png", "32.png", "48.png",
if (!foundIcon) {
// Look for icons with the following suffixes appended to the base name
// The last two entries (for the old XPM format) will be ignored unless
// no icons are found using other suffixes. XPM icons are deprecated.
const char extensions[6][7] = { ".png", "16.png", "32.png", "48.png",
".xpm", "16.xpm" };
for (PRUint32 i = 0; i < ArrayLength(extensions); i++) {
// Don't bother looking for XPM versions if we found a PNG.
if (i == ArrayLength(extensions) - 2 && iconList.Length())
break;
for (PRUint32 i = 0; i < ArrayLength(extensions); i++) {
// Don't bother looking for XPM versions if we found a PNG.
if (i == ArrayLength(extensions) - 2 && foundIcon)
break;
nsAutoString extension;
extension.AppendASCII(extensions[i]);
nsAutoString extension;
extension.AppendASCII(extensions[i]);
ResolveIconName(aIconSpec, extension, getter_AddRefs(iconFile));
if (iconFile) {
iconFile->GetNativePath(path);
iconList.AppendElement(path);
ResolveIconName(aIconSpec, extension, getter_AddRefs(iconFile));
if (iconFile) {
iconFile->GetNativePath(path);
GdkPixbuf *icon = gdk_pixbuf_new_from_file(path.get(), NULL);
if (icon){
gtk_icon_theme_add_builtin_icon(iconName.get(),
gdk_pixbuf_get_height(icon),
icon);
g_object_unref(icon);
foundIcon = true;
}
}
}
}
// leave the default icon intact if no matching icons were found
if (iconList.Length() == 0)
return NS_OK;
if (foundIcon) {
gtk_window_set_icon_name(GTK_WINDOW(mShell), iconName.get());
}
return SetWindowIconList(iconList);
return NS_OK;
}
nsIntPoint
nsWindow::WidgetToScreenOffset()
{
@ -5145,33 +5171,6 @@ nsWindow::SetupPluginPort(void)
return (void *)window;
}
nsresult
nsWindow::SetWindowIconList(const nsTArray<nsCString> &aIconList)
{
GList *list = NULL;
for (PRUint32 i = 0; i < aIconList.Length(); ++i) {
const char *path = aIconList[i].get();
LOG(("window [%p] Loading icon from %s\n", (void *)this, path));
GdkPixbuf *icon = gdk_pixbuf_new_from_file(path, NULL);
if (!icon)
continue;
list = g_list_append(list, icon);
}
if (!list)
return NS_ERROR_FAILURE;
gtk_window_set_icon_list(GTK_WINDOW(mShell), list);
g_list_foreach(list, (GFunc) g_object_unref, NULL);
g_list_free(list);
return NS_OK;
}
void
nsWindow::SetDefaultIcon(void)
{
@ -5645,9 +5644,17 @@ get_gtk_cursor(nsCursor aCursor)
break;
}
// if by now we don't have a xcursor, this means we have to make a
// custom one
if (newType != 0xff) {
// If by now we don't have a xcursor, this means we have to make a custom
// one. First, we try creating a named cursor based on the hash of our
// custom bitmap, as libXcursor has some magic to convert bitmapped cursors
// to themed cursors
if (newType != 0xFF && GtkCursors[newType].hash) {
gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(),
GtkCursors[newType].hash);
}
// If we still don't have a xcursor, we now really create a bitmap cursor
if (newType != 0xff && !gdkcursor) {
GdkPixbuf * cursor_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 32, 32);
if (!cursor_pixbuf)
return NULL;

Просмотреть файл

@ -385,7 +385,6 @@ private:
nsWindow *GetContainerWindow();
void SetUrgencyHint(GtkWidget *top_window, bool state);
void *SetupPluginPort(void);
nsresult SetWindowIconList(const nsTArray<nsCString> &aIconList);
void SetDefaultIcon(void);
void InitButtonEvent(nsMouseEvent &aEvent, GdkEventButton *aGdkEvent);
bool DispatchCommandEvent(nsIAtom* aCommand);

Просмотреть файл

@ -67,7 +67,6 @@
# define NS_CycleCollectorForget NS_CycleCollectorForget_P
# define NS_CycleCollectorSuspect2 NS_CycleCollectorSuspect2_P
# define NS_CycleCollectorForget2 NS_CycleCollectorForget2_P
# define NS_IsCycleCollectorThread NS_IsCycleCollectorThread_P
#endif
#include "nscore.h"
@ -405,9 +404,6 @@ NS_CycleCollectorSuspect2(nsISupports *n);
XPCOM_API(bool)
NS_CycleCollectorForget2(nsPurpleBufferEntry *e);
XPCOM_API(bool)
NS_IsCycleCollectorThread();
#endif
/**

Просмотреть файл

@ -345,7 +345,6 @@ private:
return PR_SUCCESS;
}
public:
/**
* Shutdown
* Free static members.
@ -357,8 +356,6 @@ public:
sDeadlockDetector = 0;
}
private:
# ifdef MOZILLA_INTERNAL_API
// so it can call BlockingResourceBase::Shutdown()
friend void LogTerm();

Просмотреть файл

@ -225,11 +225,9 @@ private:
mFirstSeen(CallStack::kNone),
mOrderedLT() // FIXME bug 456272: set to empirical
{ // dep size?
MOZ_COUNT_CTOR(OrderingEntry);
}
~OrderingEntry()
{
MOZ_COUNT_DTOR(OrderingEntry);
}
CallStack mFirstSeen; // first site from which the resource appeared
@ -369,7 +367,6 @@ public:
mLock = PR_NewLock();
if (!mLock)
NS_RUNTIMEABORT("couldn't allocate deadlock detector lock");
MOZ_COUNT_CTOR(DeadlockDetector);
}
/**
@ -381,7 +378,6 @@ public:
{
PL_HashTableDestroy(mOrdering);
PR_DestroyLock(mLock);
MOZ_COUNT_DTOR(DeadlockDetector);
}
/**

Просмотреть файл

@ -40,9 +40,10 @@
#include "nscore.h"
#include "mozilla/threads/nsThreadIDs.h"
#if defined(MOZILLA_INTERNAL_API) && !defined(XPCOM_MAKING_STUB)
#if defined(MOZILLA_INTERNAL_API)
#define NS_IsCycleCollectorThread NS_IsCycleCollectorThread_P
#if defined(XP_WIN)
XPCOM_API(bool) NS_IsCycleCollectorThread();
bool NS_IsCycleCollectorThread();
#elif defined(NS_TLS)
// Defined in nsThreadManager.cpp.
extern NS_TLS mozilla::threads::ID gTLSThreadID;
@ -51,10 +52,10 @@ inline bool NS_IsCycleCollectorThread()
return gTLSThreadID == mozilla::threads::CycleCollector;
}
#else
XPCOM_API(bool) NS_IsCycleCollectorThread();
NS_COM_GLUE bool NS_IsCycleCollectorThread();
#endif
#else
XPCOM_API(bool) NS_IsCycleCollectorThread();
NS_COM_GLUE bool NS_IsCycleCollectorThread();
#endif
#endif /* nsCycleCollectorUtils_h__ */

Просмотреть файл

@ -35,8 +35,6 @@
*
* ***** END LICENSE BLOCK ***** */
#define XPCOM_MAKING_STUB
#include "nsXPCOM.h"
#include "nsXPCOMPrivate.h"
#include "nsXPCOMStrings.h"
@ -561,12 +559,3 @@ NS_CycleCollectorForget2(nsPurpleBufferEntry* e)
{
return NS_CycleCollectorForget2_P(e);
}
#ifdef XP_WIN
#undef NS_IsCycleCollectorThread
EXPORT_XPCOM_API(bool)
NS_IsCycleCollectorThread()
{
return NS_IsCycleCollectorThread_P();
}
#endif