merge fx-team to m-c

--HG--
rename : browser/devtools/styleinspector/test/browser/browser_bug683672.js => browser/devtools/styleinspector/test/browser_bug683672.js
rename : browser/devtools/styleinspector/test/browser/browser_styleinspector.js => browser/devtools/styleinspector/test/browser_styleinspector.js
This commit is contained in:
Rob Campbell 2011-12-16 14:42:54 -04:00
commit 9cf3cc807d
1151 changed files with 27330 additions and 13671 deletions

View File

@ -214,6 +214,10 @@ protected:
static bool gIsFormFillEnabled;
private:
nsAccessNode();
nsAccessNode(const nsAccessNode&);
nsAccessNode& operator =(const nsAccessNode&);
static nsApplicationAccessible *gApplicationAccessible;
};

View File

@ -1199,13 +1199,11 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
if (!newAcc) {
// Create generic accessibles for SVG and MathML nodes.
if (content->GetNameSpaceID() == kNameSpaceID_SVG &&
content->Tag() == nsGkAtoms::svg) {
if (content->IsSVG(nsGkAtoms::svg)) {
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
nsIAccessibleRole::ROLE_DIAGRAM);
}
else if (content->GetNameSpaceID() == kNameSpaceID_MathML &&
content->Tag() == nsGkAtoms::math) {
else if (content->IsMathML(nsGkAtoms::math)) {
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
nsIAccessibleRole::ROLE_EQUATION);
}

View File

@ -65,9 +65,6 @@ class nsAccessibleWrap : public nsAccessible
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessibleWrap();
// creates the native accessible connected to this one.
virtual bool Init ();
// get the native obj-c object (mozAccessible)
NS_IMETHOD GetNativeInterface (void **aOutAccessible);
@ -93,9 +90,9 @@ class nsAccessibleWrap : public nsAccessible
void GetUnignoredChildren(nsTArray<nsRefPtr<nsAccessibleWrap> > &aChildrenArray);
virtual already_AddRefed<nsIAccessible> GetUnignoredParent();
protected:
protected:
virtual nsresult FirePlatformEvent(AccEvent* aEvent);
virtual nsresult FirePlatformEvent(AccEvent* aEvent);
/**
* Return true if the parent doesn't have children to expose to AT.
@ -103,13 +100,33 @@ class nsAccessibleWrap : public nsAccessible
bool AncestorIsFlat();
/**
* mozAccessible object. If we are in Objective-C, we use the actual Obj-C class.
* Get the native object. Create it if needed.
*/
#if defined(__OBJC__)
mozAccessible* GetNativeObject();
#else
id GetNativeObject();
#endif
private:
/**
* Our native object. Private because its creation is done lazily.
* Don't access it directly. Ever. Unless you are GetNativeObject() or Shutdown()
*/
#if defined(__OBJC__)
// if we are in Objective-C, we use the actual Obj-C class.
mozAccessible* mNativeObject;
#else
id mNativeObject;
id mNativeObject;
#endif
/**
* We have created our native. This does not mean there is one.
* This can never go back to false.
* We need it because checking whether we need a native object cost time.
*/
bool mNativeInited;
};
// Define unsupported wrap classes here

View File

@ -47,7 +47,8 @@
nsAccessibleWrap::
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessible(aContent, aShell), mNativeObject(nil)
nsAccessible(aContent, aShell), mNativeObject(nil),
mNativeInited(false)
{
}
@ -55,24 +56,19 @@ nsAccessibleWrap::~nsAccessibleWrap()
{
}
bool
nsAccessibleWrap::Init ()
mozAccessible*
nsAccessibleWrap::GetNativeObject()
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
if (!nsAccessible::Init())
return false;
if (!mNativeObject && !AncestorIsFlat()) {
// Create our native object using the class type specified in GetNativeType().
mNativeObject = [[GetNativeType() alloc] initWithAccessible:this];
if(!mNativeObject)
return false;
}
return true;
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
if (!mNativeInited && !mNativeObject && !IsDefunct() && !AncestorIsFlat())
mNativeObject = [[GetNativeType() alloc] initWithAccessible:this];
mNativeInited = true;
return mNativeObject;
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
}
NS_IMETHODIMP
@ -80,13 +76,9 @@ nsAccessibleWrap::GetNativeInterface (void **aOutInterface)
{
NS_ENSURE_ARG_POINTER(aOutInterface);
*aOutInterface = nsnull;
if (mNativeObject) {
*aOutInterface = static_cast<void*>(mNativeObject);
return NS_OK;
}
return NS_ERROR_FAILURE;
*aOutInterface = static_cast<void*>(GetNativeObject());
return *aOutInterface ? NS_OK : NS_ERROR_FAILURE;
}
// overridden in subclasses to create the right kind of object. by default we create a generic
@ -144,12 +136,16 @@ nsAccessibleWrap::GetNativeType ()
void
nsAccessibleWrap::Shutdown ()
{
// this ensure we will not try to re-create the native object.
mNativeInited = true;
// we really intend to access the member directly.
if (mNativeObject) {
[mNativeObject expire];
[mNativeObject release];
mNativeObject = nil;
}
nsAccessible::Shutdown();
}
@ -205,8 +201,7 @@ nsAccessibleWrap::InvalidateChildren()
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
if (mNativeObject)
[mNativeObject invalidateChildren];
[GetNativeObject() invalidateChildren];
nsAccessible::InvalidateChildren();
@ -220,7 +215,8 @@ nsAccessibleWrap::IsIgnored()
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
return (mNativeObject == nil) || [mNativeObject accessibilityIsIgnored];
mozAccessible* nativeObject = GetNativeObject();
return (!nativeObject) || [nativeObject accessibilityIsIgnored];
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false);
}

View File

@ -48,12 +48,6 @@ public:
nsIWeakReference *aShell);
virtual ~nsDocAccessibleWrap();
// nsIAccessNode
/**
* Creates the native accessible connected to this one.
*/
virtual bool Init();
};
#endif

View File

@ -50,18 +50,3 @@ nsDocAccessibleWrap::~nsDocAccessibleWrap()
{
}
bool
nsDocAccessibleWrap::Init ()
{
if (!nsDocAccessible::Init())
return false;
if (!mNativeObject) {
// Create our native object using the class type specified in GetNativeType().
mNativeObject = [[GetNativeType() alloc] initWithAccessible:this];
if (!mNativeObject)
return false;
}
return true;
}

View File

@ -66,6 +66,7 @@ pref("image.cache.size", 1048576); // bytes
/* offline cache prefs */
pref("browser.offline-apps.notify", false);
pref("browser.cache.offline.enable", false);
/* protocol warning prefs */
pref("network.protocol-handler.warn-external.tel", false);

View File

@ -72,11 +72,19 @@ function startupHttpd(baseDir, port) {
server.start(port);
}
// XXX until we have a security model, just let the pre-installed
// app used indexedDB.
function allowIndexedDB(url) {
let uri = Services.io.newURI(url, null, null);
Services.perms.add(uri, 'indexedDB', Ci.nsIPermissionManager.ALLOW_ACTION);
// FIXME Bug 707625
// until we have a proper security model, add some rights to
// the pre-installed web applications
function addPermissions(urls) {
let permissions = ['indexedDB', 'webapps-manage', 'offline-app'];
urls.forEach(function(url) {
let uri = Services.io.newURI(url, null, null);
let allow = Ci.nsIPermissionManager.ALLOW_ACTION;
permissions.forEach(function(permission) {
Services.perms.add(uri, permission, allow);
});
});
}
@ -135,7 +143,7 @@ var shell = {
let baseHost = 'http://localhost';
homeURL = homeURL.replace(baseDir, baseHost + ':' + SERVER_PORT);
}
allowIndexedDB(homeURL);
addPermissions([homeURL]);
} catch (e) {
let msg = 'Fatal error during startup: [' + e + '[' + homeURL + ']';
return alert(msg);
@ -172,7 +180,7 @@ var shell = {
doCommand: function shell_doCommand(cmd) {
switch (cmd) {
case 'cmd_close':
this.sendEvent(this.home.contentWindow, 'appclose');
this.home.contentWindow.postMessage('appclose', '*');
break;
}
},
@ -200,6 +208,9 @@ var shell = {
break;
case 'MozApplicationManifest':
try {
if (!Services.prefs.getBoolPref('browser.cache.offline.enable'))
return;
let contentWindow = evt.originalTarget.defaultView;
let documentElement = contentWindow.document.documentElement;
if (!documentElement)
@ -210,10 +221,18 @@ var shell = {
return;
let documentURI = contentWindow.document.documentURIObject;
let manifestURI = Services.io.newURI(manifest, null, documentURI);
if (!Services.perms.testPermission(documentURI, 'offline-app')) {
if (Services.prefs.getBoolPref('browser.offline-apps.notify')) {
// FIXME Bug 710729 - Add a UI for offline cache notifications
return;
}
return;
}
Services.perms.add(documentURI, 'offline-app',
Ci.nsIPermissionManager.ALLOW_ACTION);
let manifestURI = Services.io.newURI(manifest, null, documentURI);
let updateService = Cc['@mozilla.org/offlinecacheupdate-service;1']
.getService(Ci.nsIOfflineCacheUpdateService);
updateService.scheduleUpdate(manifestURI, documentURI, window);

View File

@ -47,6 +47,7 @@ PARALLEL_DIRS = \
components \
fuel \
locales \
modules \
themes \
$(NULL)

View File

@ -180,20 +180,20 @@ libs:: $(srcdir)/blocklist.xml
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
APP_NAME = $(MOZ_APP_DISPLAYNAME)
MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME)
ifdef MOZ_DEBUG
APP_NAME := $(APP_NAME)Debug
MAC_APP_NAME := $(MAC_APP_NAME)Debug
endif
LOWER_APP_NAME = $(shell echo $(APP_NAME) | tr '[A-Z]' '[a-z]')
LOWER_MAC_APP_NAME = $(shell echo $(MAC_APP_NAME) | tr '[A-Z]' '[a-z]')
AB_CD = $(MOZ_UI_LOCALE)
AB := $(firstword $(subst -, ,$(AB_CD)))
clean clobber repackage::
$(RM) -r $(DIST)/$(APP_NAME).app
$(RM) -r $(DIST)/$(MOZ_MACBUNDLE_NAME)
ifdef LIBXUL_SDK
APPFILES = Resources
@ -202,26 +202,24 @@ APPFILES = MacOS
endif
libs repackage:: $(PROGRAM)
$(MKDIR) -p $(DIST)/$(APP_NAME).app/Contents/MacOS
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
$(MKDIR) -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
rsync -a --exclude CVS --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" -e "s/%LOWER_APP_NAME%/$(LOWER_APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
sed -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
$(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
$(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(MOZ_MACBUNDLE_NAME) --exclude English.lproj
$(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist
sed -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj/InfoPlist.strings
rsync -a $(DIST)/bin/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)
$(RM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)/mangle $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)/shlibsign
ifdef LIBXUL_SDK
cp $(LIBXUL_DIST)/bin/$(XR_STUB_NAME) $(DIST)/$(APP_NAME).app/Contents/MacOS/firefox
cp $(LIBXUL_DIST)/bin/$(XR_STUB_NAME) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/firefox
else
$(RM) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
$(RM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM)
rsync -aL $(PROGRAM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
endif
-cp -L $(DIST)/bin/mangle $(DIST)/bin/shlibsign $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
cp -RL $(DIST)/branding/firefox.icns $(DIST)/$(APP_NAME).app/Contents/Resources/firefox.icns
cp -RL $(DIST)/branding/document.icns $(DIST)/$(APP_NAME).app/Contents/Resources/document.icns
printf APPLMOZB > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
# remove CVS dirs from packaged app
find $(DIST)/$(APP_NAME).app -type d -name "CVS" -prune -exec rm -rf {} \;
-cp -L $(DIST)/bin/mangle $(DIST)/bin/shlibsign $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)
cp -RL $(DIST)/branding/firefox.icns $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/firefox.icns
cp -RL $(DIST)/branding/document.icns $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/document.icns
printf APPLMOZB > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/PkgInfo
else
ifdef LIBXUL_SDK
@ -234,7 +232,7 @@ ifdef LIBXUL_SDK
ifndef SKIP_COPY_XULRUNNER
libs::
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
rsync -a --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks
rsync -a --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Frameworks
else
$(NSINSTALL) -D $(DIST)/bin/xulrunner
(cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)

View File

@ -225,4 +225,4 @@
</gfxItems>
</blocklist>
</blocklist>

View File

@ -145,15 +145,15 @@
<key>CFBundleExecutable</key>
<string>firefox</string>
<key>CFBundleGetInfoString</key>
<string>%APP_NAME% %APP_VERSION%</string>
<string>%MAC_APP_NAME% %APP_VERSION%</string>
<key>CFBundleIconFile</key>
<string>firefox</string>
<key>CFBundleIdentifier</key>
<string>org.mozilla.%LOWER_APP_NAME%</string>
<string>org.mozilla.%LOWER_MAC_APP_NAME%</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>%APP_NAME%</string>
<string>%MAC_APP_NAME%</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

View File

@ -1 +1 @@
CFBundleName = "%APP_NAME%";
CFBundleName = "%MAC_APP_NAME%";

View File

@ -53,11 +53,6 @@ ifdef ENABLE_TESTS
DIRS += content/test
endif
EXTRA_JS_MODULES = \
content/openLocationLastURL.jsm \
content/NetworkPrioritizer.jsm \
$(NULL)
include $(topsrcdir)/config/rules.mk
PRE_RELEASE_SUFFIX := ""

View File

@ -207,7 +207,7 @@ XPCOMUtils.defineLazyGetter(this, "Win7Features", function () {
if (WINTASKBAR_CONTRACTID in Cc &&
Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
let temp = {};
Cu.import("resource://gre/modules/WindowsPreviewPerTab.jsm", temp);
Cu.import("resource:///modules/WindowsPreviewPerTab.jsm", temp);
let AeroPeek = temp.AeroPeek;
return {
onOpenWindow: function () {

View File

@ -226,7 +226,7 @@ function onIndexedDBClear()
initIndexedDBRow();
}
function onIndexedDBUsageCallback(uri, usage)
function onIndexedDBUsageCallback(uri, usage, fileUsage)
{
if (!uri.equals(gPermURI)) {
throw new Error("Callback received for bad URI: " + uri);

View File

@ -91,7 +91,6 @@ endif
_BROWSER_FILES = \
browser_typeAheadFind.js \
browser_keywordSearch.js \
browser_NetworkPrioritizer.js \
browser_allTabsPanel.js \
browser_alltabslistener.js \
browser_bug304198.js \

View File

@ -69,22 +69,16 @@ PARALLEL_DIRS = \
search \
sessionstore \
shell \
sidebar/src \
sidebar \
tabview \
migration \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
PARALLEL_DIRS += wintaskbar
endif
ifdef MOZ_SAFE_BROWSING
PARALLEL_DIRS += safebrowsing
endif
ifdef ENABLE_TESTS
DIRS += test/browser
endif
TEST_DIRS += test
DIRS += build

View File

@ -48,9 +48,6 @@
{ 0x29e3b139, 0xad19, 0x44f3, { 0xb2, 0xc2, 0xe9, 0xf1, 0x3b, 0xa2, 0xbb, 0xc6 } }
#endif
#define NS_OPERAPROFILEMIGRATOR_CID \
{ 0xf34ff792, 0x722e, 0x4490, { 0xb1, 0x95, 0x47, 0xd2, 0x42, 0xed, 0xca, 0x1c } }
#define NS_SHELLSERVICE_CID \
{ 0x63c7b9f4, 0xcc8, 0x43f8, { 0xb6, 0x66, 0xa, 0x66, 0x16, 0x55, 0xcb, 0x73 } }

View File

@ -50,9 +50,6 @@
#endif
#include "nsProfileMigrator.h"
#if !defined(XP_OS2)
#include "nsOperaProfileMigrator.h"
#endif
#if defined(XP_WIN) && !defined(__MINGW32__)
#include "nsIEProfileMigrator.h"
#elif defined(XP_MACOSX)
@ -80,9 +77,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
#endif
#if !defined(XP_OS2)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
#if defined(XP_WIN) && !defined(__MINGW32__)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
@ -109,9 +103,6 @@ NS_DEFINE_NAMED_CID(NS_WINIEPROFILEMIGRATOR_CID);
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_SAFARIPROFILEMIGRATOR_CID);
#endif
#if !defined(XP_OS2)
NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRATOR_CID);
#endif
NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
@ -129,9 +120,6 @@ static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
#elif defined(XP_MACOSX)
{ &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor },
{ &kNS_SAFARIPROFILEMIGRATOR_CID, false, NULL, nsSafariProfileMigratorConstructor },
#endif
#if !defined(XP_OS2)
{ &kNS_OPERAPROFILEMIGRATOR_CID, false, NULL, nsOperaProfileMigratorConstructor },
#endif
{ &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID, false, NULL, nsPrivateBrowsingServiceWrapperConstructor },
{ NULL }
@ -166,9 +154,6 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
#elif defined(XP_MACOSX)
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "safari", &kNS_SAFARIPROFILEMIGRATOR_CID },
#endif
#if !defined(XP_OS2)
{ NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "opera", &kNS_OPERAPROFILEMIGRATOR_CID },
#endif
{ NS_PRIVATE_BROWSING_SERVICE_CONTRACTID, &kNS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID },
{ NULL }

View File

@ -765,7 +765,7 @@ FeedWriter.prototype = {
#expand if (fp.file.leafName != "__MOZ_APP_NAME__.exe") {
#else
#ifdef XP_MACOSX
#expand if (fp.file.leafName != "__MOZ_APP_DISPLAYNAME__.app") {
#expand if (fp.file.leafName != "__MOZ_MACBUNDLE_NAME__") {
#else
#expand if (fp.file.leafName != "__MOZ_APP_NAME__-bin") {
#endif

View File

@ -50,7 +50,7 @@ endif
DEFINES += \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
$(NULL)
EXTRA_COMPONENTS = \

View File

@ -333,9 +333,6 @@ var MigrationWizard = {
case "ie":
source = "sourceNameIE";
break;
case "opera":
source = "sourceNameOpera";
break;
case "safari":
source = "sourceNameSafari";
break;

View File

@ -70,14 +70,10 @@
browser/components/migration/src/nsProfileMigrator.cpp -->
#ifdef XP_MACOSX
<radio id="safari" label="&importFromSafari.label;" accesskey="&importFromSafari.accesskey;"/>
<radio id="opera" label="&importFromOpera.label;" accesskey="&importFromOpera.accesskey;"/>
#elifdef XP_UNIX
<radio id="opera" label="&importFromOpera.label;" accesskey="&importFromOpera.accesskey;"/>
#elifdef XP_WIN
#ifndef NO_IE_MIGRATOR
<radio id="ie" label="&importFromIE.label;" accesskey="&importFromIE.accesskey;"/>
#endif
<radio id="opera" label="&importFromOpera.label;" accesskey="&importFromOpera.accesskey;"/>
#endif
<radio id="chrome" label="&importFromChrome.label;" accesskey="&importFromChrome.accesskey;"/>
<radio id="fromfile" label="&importFromHTMLFile.label;" accesskey="&importFromHTMLFile.accesskey;" hidden="true"/>

View File

@ -53,10 +53,6 @@ CPPSRCS = nsProfileMigrator.cpp \
nsBrowserProfileMigratorUtils.cpp \
$(NULL)
ifneq ($(OS_ARCH),OS2)
CPPSRCS += nsOperaProfileMigrator.cpp
endif
ifeq ($(OS_ARCH)_$(GNU_CXX),WINNT_)
CPPSRCS += nsIEProfileMigrator.cpp \
$(NULL)

View File

@ -42,8 +42,6 @@
#include "nsToolkitCompsCID.h"
#include "nsIPlacesImportExportService.h"
#include "nsIFile.h"
#include "nsIInputStream.h"
#include "nsILineInputStream.h"
#include "nsIProperties.h"
#include "nsIProfileMigrator.h"
@ -165,57 +163,6 @@ GetProfilePath(nsIProfileStartup* aStartup, nsCOMPtr<nsIFile>& aProfileDir)
}
}
nsresult
AnnotatePersonalToolbarFolder(nsIFile* aSourceBookmarksFile,
nsIFile* aTargetBookmarksFile,
const char* aToolbarFolderName)
{
nsCOMPtr<nsIInputStream> fileInputStream;
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(fileInputStream),
aSourceBookmarksFile);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIOutputStream> outputStream;
rv = NS_NewLocalFileOutputStream(getter_AddRefs(outputStream),
aTargetBookmarksFile);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsILineInputStream> lineInputStream =
do_QueryInterface(fileInputStream, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCAutoString sourceBuffer;
nsCAutoString targetBuffer;
bool moreData = false;
PRUint32 bytesWritten = 0;
do {
lineInputStream->ReadLine(sourceBuffer, &moreData);
if (!moreData)
break;
PRInt32 nameOffset = sourceBuffer.Find(aToolbarFolderName);
if (nameOffset >= 0) {
// Found the personal toolbar name on a line, check to make sure it's
// actually a folder.
NS_NAMED_LITERAL_CSTRING(folderPrefix, "<DT><H3 ");
PRInt32 folderPrefixOffset = sourceBuffer.Find(folderPrefix);
if (folderPrefixOffset >= 0)
sourceBuffer.Insert(NS_LITERAL_CSTRING("PERSONAL_TOOLBAR_FOLDER=\"true\" "),
folderPrefixOffset + folderPrefix.Length());
}
targetBuffer.Assign(sourceBuffer);
targetBuffer.Append("\r\n");
outputStream->Write(targetBuffer.get(), targetBuffer.Length(),
&bytesWritten);
}
while (1);
outputStream->Close();
return NS_OK;
}
nsresult
ImportBookmarksHTML(nsIFile* aBookmarksFile,
bool aImportIntoRoot,

View File

@ -99,15 +99,6 @@ void GetMigrateDataFromArray(MigrationData* aDataArray,
// this is already cloned, modify it to your heart's content
void GetProfilePath(nsIProfileStartup* aStartup, nsCOMPtr<nsIFile>& aProfileDir);
// The Netscape Bookmarks Format (bookmarks.html) is fairly standard but
// each browser vendor seems to have their own way of identifying the
// Personal Toolbar Folder. This function scans for the vendor-specific
// name in the source Bookmarks file and then writes out a normalized
// variant into the target folder.
nsresult AnnotatePersonalToolbarFolder(nsIFile* aSourceBookmarksFile,
nsIFile* aTargetBookmarksFile,
const char* aToolbarFolderName);
// In-place import from aBookmarksFile into a folder in the user's bookmarks.
// If the importIntoRoot parameter has a value of true, the bookmarks will be
// imported into the bookmarks root folder. Otherwise, they'll be imported into

File diff suppressed because it is too large Load Diff

View File

@ -1,224 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The Browser Profile Migrator.
*
* The Initial Developer of the Original Code is Ben Goodger.
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ben Goodger <ben@bengoodger.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef operaprofilemigrator___h___
#define operaprofilemigrator___h___
#include "nsCOMPtr.h"
#include "nsIBinaryInputStream.h"
#include "nsIBrowserProfileMigrator.h"
#include "nsIObserverService.h"
#include "nsStringAPI.h"
#include "nsTArray.h"
#include "nsIMutableArray.h"
#include "nsINavHistoryService.h"
#include "nsIStringBundle.h"
class nsICookieManager2;
class nsILineInputStream;
class nsILocalFile;
class nsINIParser;
class nsIPermissionManager;
class nsIPrefBranch;
class nsINavBookmarksService;
class nsIRDFResource;
class nsOperaProfileMigrator : public nsIBrowserProfileMigrator,
public nsINavHistoryBatchCallback
{
public:
NS_DECL_NSIBROWSERPROFILEMIGRATOR
NS_DECL_NSINAVHISTORYBATCHCALLBACK
NS_DECL_ISUPPORTS
nsOperaProfileMigrator();
virtual ~nsOperaProfileMigrator();
public:
typedef enum { STRING, INT, BOOL, COLOR } PrefType;
typedef nsresult(*prefConverter)(void*, nsIPrefBranch*);
struct PrefTransform {
const char* sectionName;
const char* keyName;
PrefType type;
const char* targetPrefName;
prefConverter prefSetterFunc;
bool prefHasValue;
union {
PRInt32 intValue;
bool boolValue;
char* stringValue;
};
};
static nsresult SetFile(void* aTransform, nsIPrefBranch* aBranch);
static nsresult SetCookieBehavior(void* aTransform, nsIPrefBranch* aBranch);
static nsresult SetCookieLifetime(void* aTransform, nsIPrefBranch* aBranch);
static nsresult SetImageBehavior(void* aTransform, nsIPrefBranch* aBranch);
static nsresult SetBool(void* aTransform, nsIPrefBranch* aBranch);
static nsresult SetWString(void* aTransform, nsIPrefBranch* aBranch);
static nsresult SetInt(void* aTransform, nsIPrefBranch* aBranch);
static nsresult SetString(void* aTransform, nsIPrefBranch* aBranch);
protected:
nsresult CopyPreferences(bool aReplace);
nsresult ParseColor(nsINIParser &aParser, const char* aSectionName,
char** aResult);
nsresult CopyUserContentSheet(nsINIParser &aParser);
nsresult CopyProxySettings(nsINIParser &aParser, nsIPrefBranch* aBranch);
nsresult GetInteger(nsINIParser &aParser, const char* aSectionName,
const char* aKeyName, PRInt32* aResult);
nsresult CopyCookies(bool aReplace);
/**
* Migrate history to Places.
* This will end up calling CopyHistoryBatched helper, that provides batch
* support. Batching allows for better performances and integrity.
*
* @param aReplace
* Indicates if we should replace current history or append to it.
*/
nsresult CopyHistory(bool aReplace);
nsresult CopyHistoryBatched(bool aReplace);
/**
* Migrate bookmarks to Places.
* This will end up calling CopyBookmarksBatched helper, that provides batch
* support. Batching allows for better performances and integrity.
*
* @param aReplace
* Indicates if we should replace current bookmarks or append to them.
* When appending we will usually default to bookmarks menu.
*/
nsresult CopyBookmarks(bool aReplace);
nsresult CopyBookmarksBatched(bool aReplace);
void ClearToolbarFolder(nsINavBookmarksService * aBookmarksService,
PRInt64 aToolbarFolder);
nsresult ParseBookmarksFolder(nsILineInputStream* aStream,
PRInt64 aFolder,
PRInt64 aToolbar,
nsINavBookmarksService* aBMS);
#if defined(XP_WIN) || (defined(XP_UNIX) && !defined(XP_MACOSX))
nsresult CopySmartKeywords(nsINavBookmarksService* aBMS,
nsIStringBundle* aBundle,
PRInt64 aParentFolder);
#endif // defined(XP_WIN) || (defined(XP_UNIX) && !defined(XP_MACOSX))
void GetOperaProfile(const PRUnichar* aProfile, nsILocalFile** aFile);
private:
nsCOMPtr<nsILocalFile> mOperaProfile;
nsCOMPtr<nsIMutableArray> mProfiles;
nsCOMPtr<nsIObserverService> mObserverService;
};
class nsOperaCookieMigrator
{
public:
nsOperaCookieMigrator(nsIInputStream* aSourceStream);
virtual ~nsOperaCookieMigrator();
nsresult Migrate();
typedef enum { BEGIN_DOMAIN_SEGMENT = 0x01,
DOMAIN_COMPONENT = 0x1E,
END_DOMAIN_SEGMENT = 0x84 | 0x80, // 0x04 | (1 << 8)
BEGIN_PATH_SEGMENT = 0x02,
PATH_COMPONENT = 0x1D,
END_PATH_SEGMENT = 0x05 | 0x80, // 0x05 | (1 << 8)
FILTERING_INFO = 0x1F,
PATH_HANDLING_INFO = 0x21,
THIRD_PARTY_HANDLING_INFO = 0x25,
BEGIN_COOKIE_SEGMENT = 0x03,
COOKIE_ID = 0x10,
COOKIE_DATA = 0x11,
COOKIE_EXPIRY = 0x12,
COOKIE_LASTUSED = 0x13,
COOKIE_COMMENT = 0x14,
COOKIE_COMMENT_URL = 0x15,
COOKIE_V1_DOMAIN = 0x16,
COOKIE_V1_PATH = 0x17,
COOKIE_V1_PORT_LIMITATIONS = 0x18,
COOKIE_SECURE = 0x19 | 0x80,
COOKIE_VERSION = 0x1A,
COOKIE_OTHERFLAG_1 = 0x1B | 0x80,
COOKIE_OTHERFLAG_2 = 0x1C | 0x80,
COOKIE_OTHERFLAG_3 = 0x20 | 0x80,
COOKIE_OTHERFLAG_4 = 0x22 | 0x80,
COOKIE_OTHERFLAG_5 = 0x23 | 0x80,
COOKIE_OTHERFLAG_6 = 0x24 | 0x80
} TAG;
protected:
nsOperaCookieMigrator() { }
nsresult ReadHeader();
void SynthesizePath(char** aResult);
void SynthesizeDomain(char** aResult);
nsresult AddCookieOverride(nsIPermissionManager* aManager);
nsresult AddCookie(nsICookieManager2* aManager);
private:
nsCOMPtr<nsIBinaryInputStream> mStream;
nsTArray<char*> mDomainStack;
nsTArray<char*> mPathStack;
struct Cookie {
nsCString id;
nsCString data;
PRInt32 expiryTime;
bool isSecure;
};
PRUint32 mAppVersion;
PRUint32 mFileVersion;
PRUint16 mTagTypeLength;
PRUint16 mPayloadTypeLength;
bool mCookieOpen;
Cookie mCurrCookie;
PRUint8 mCurrHandlingInfo;
};
#endif

View File

@ -139,7 +139,6 @@ NS_IMPL_ISUPPORTS1(nsProfileMigrator, nsIProfileMigrator)
#define INTERNAL_NAME_IEXPLORE "iexplore"
#define INTERNAL_NAME_MOZILLA_SUITE "apprunner"
#define INTERNAL_NAME_OPERA "opera"
#define INTERNAL_NAME_CHROME "chrome"
#endif
@ -220,10 +219,6 @@ nsProfileMigrator::GetDefaultBrowserMigratorKey(nsACString& aKey,
aKey = "ie";
return NS_OK;
}
else if (internalName.LowerCaseEqualsLiteral(INTERNAL_NAME_OPERA)) {
aKey = "opera";
return NS_OK;
}
else if (internalName.LowerCaseEqualsLiteral(INTERNAL_NAME_CHROME)) {
aKey = "chrome";
return NS_OK;
@ -243,7 +238,6 @@ nsProfileMigrator::GetDefaultBrowserMigratorKey(nsACString& aKey,
#if defined(XP_MACOSX)
CHECK_MIGRATOR("safari");
#endif
CHECK_MIGRATOR("opera");
CHECK_MIGRATOR("chrome");
#undef CHECK_MIGRATOR

View File

@ -46,6 +46,9 @@
#include <CoreFoundation/CoreFoundation.h>
class nsIPrefBranch;
class nsINavBookmarksService;
class nsIRDFResource;
class nsIRDFDataSource;
class nsSafariProfileMigrator : public nsIBrowserProfileMigrator,

View File

@ -51,7 +51,7 @@ include $(topsrcdir)/config/rules.mk
DEFINES += \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
$(NULL)
ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))

View File

@ -1352,7 +1352,7 @@ var gApplicationsPane = {
#expand aExecutable.leafName != "__MOZ_APP_NAME__.exe";
#else
#ifdef XP_MACOSX
#expand aExecutable.leafName != "__MOZ_APP_DISPLAYNAME__.app";
#expand aExecutable.leafName != "__MOZ_MACBUNDLE_NAME__";
#else
#expand aExecutable.leafName != "__MOZ_APP_NAME__-bin";
#endif

View File

@ -50,8 +50,6 @@ XPIDLSRCS = \
DIRS = src
ifdef ENABLE_TESTS
DIRS += test/browser
endif
TEST_DIRS = test
include $(topsrcdir)/config/rules.mk

View File

@ -36,11 +36,11 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../../..
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = browser/components/sessionstore/test/browser
relativesrcdir = browser/components/sessionstore/test
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -116,7 +116,7 @@ function test() {
let rootDir = getRootDirectory(gTestPath);
const testURL = rootDir + "browser_248970_b_sample.html";
const testURL2 = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_248970_b_sample.html";
"browser/components/sessionstore/test/browser_248970_b_sample.html";
// get closed tab count
let count = ss.getClosedTabCount(window);

View File

@ -40,7 +40,7 @@ function test() {
waitForExplicitFinish();
let testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_339445_sample.html";
"browser/components/sessionstore/test/browser_339445_sample.html";
let tab = gBrowser.addTab(testURL);
tab.linkedBrowser.addEventListener("load", function(aEvent) {

View File

@ -48,7 +48,7 @@ function test() {
gPrefService.setIntPref("browser.sessionstore.interval", 0);
const testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_423132_sample.html";
"browser/components/sessionstore/test/browser_423132_sample.html";
// open a new window
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no", "about:blank");

View File

@ -39,7 +39,7 @@ function test() {
waitForExplicitFinish();
const baseURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_447951_sample.html#";
"browser/components/sessionstore/test/browser_447951_sample.html#";
let tab = gBrowser.addTab();
tab.linkedBrowser.addEventListener("load", function(aEvent) {

View File

@ -40,7 +40,7 @@ function test() {
waitForExplicitFinish();
let testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_459906_sample.html";
"browser/components/sessionstore/test/browser_459906_sample.html";
let uniqueValue = "<b>Unique:</b> " + Date.now();
var frameCount = 0;

View File

@ -40,7 +40,7 @@ function test() {
waitForExplicitFinish();
let testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_461743_sample.html";
"browser/components/sessionstore/test/browser_461743_sample.html";
let frameCount = 0;
let tab = gBrowser.addTab(testURL);

View File

@ -98,7 +98,7 @@ function test() {
mainURL = testURL;
frame1URL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_463205_helper.html";
"browser/components/sessionstore/test/browser_463205_helper.html";
frame2URL = rootDir + "browser_463205_helper.html";
frame3URL = "data:text/html,mark2";

View File

@ -18,7 +18,7 @@
else {
frames[1].document.location.hash = "#original";
frames[0].document.location = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_463205_helper.html";
"browser/components/sessionstore/test/browser_463205_helper.html";
}
}, false);
</script>

View File

@ -40,7 +40,7 @@ function test() {
waitForExplicitFinish();
let testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_463206_sample.html";
"browser/components/sessionstore/test/browser_463206_sample.html";
var frameCount = 0;
let tab = gBrowser.addTab(testURL);

View File

@ -7,7 +7,7 @@
<script>
var targetUrl = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_464620_xd.html";
"browser/components/sessionstore/test/browser_464620_xd.html";
var firstPass;
function setup() {

View File

@ -40,7 +40,7 @@ function test() {
waitForExplicitFinish();
let testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_464620_a.html";
"browser/components/sessionstore/test/browser_464620_a.html";
var frameCount = 0;
let tab = gBrowser.addTab(testURL);

View File

@ -8,7 +8,7 @@
<script>
var targetUrl = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_464620_xd.html";
"browser/components/sessionstore/test/browser_464620_xd.html";
var firstPass;
function setup() {

View File

@ -40,7 +40,7 @@ function test() {
waitForExplicitFinish();
let testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_464620_b.html";
"browser/components/sessionstore/test/browser_464620_b.html";
var frameCount = 0;
let tab = gBrowser.addTab(testURL);

View File

@ -47,7 +47,7 @@ function test() {
let testPath = file.path;
let testURL = "http://mochi.test:8888/browser/" +
"browser/components/sessionstore/test/browser/browser_466937_sample.html";
"browser/components/sessionstore/test/browser_466937_sample.html";
let tab = gBrowser.addTab(testURL);
tab.linkedBrowser.addEventListener("load", function(aEvent) {

Some files were not shown because too many files have changed in this diff Show More