Merging http://hg.mozilla.org/mozilla-central and http://hg.mozilla.org/mobile-browser into one repository
--HG-- extra : rebase_source : a71bd564ebf5bf4f93d13e84114f759c263130b0
|
@ -0,0 +1,8 @@
|
|||
# .hgignore - List of filenames hg should ignore
|
||||
|
||||
# Filenames that should be ignored wherever they appear
|
||||
~$
|
||||
\.pyc$
|
||||
\.swp$
|
||||
(^|/)TAGS$
|
||||
\.DS_Store$
|
|
@ -0,0 +1,8 @@
|
|||
14bbac84b71cbb9d603ed571538c9c41b023d94e FENNEC_M4
|
||||
7dbca6d7d5cf0a052c658b6ba3e89068b0772734 FENNEC_M7
|
||||
eb17df1df284c8aa882ae626d6f8b298adc55c6b FENNEC_M8
|
||||
b394a7122c1018dd3d49d9049bcbbcb5b9ab17e2 FENNEC_A1
|
||||
5f1388238359c2019572316cf75c3a404d2d4e70 FENNEC_A2
|
||||
84195fc5e34609b49862f95799e21b6f790ec9cc FENNEC_M11
|
||||
9aa835472fed9cb58c809c2f3182e46bf5ce25bd FENNEC_B1
|
||||
6da60192232841d4d6a090a577585c70d790dac8 FENNEC_B5
|
|
@ -0,0 +1,62 @@
|
|||
# ***** 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.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.com>
|
||||
# Joel Maher <jmaher@mozilla.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 *****
|
||||
|
||||
DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = chrome locales components modules themes app
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
PARALLEL_DIRS += $(DEPTH)/xulrunner/tools/redit
|
||||
endif
|
||||
|
||||
ifdef WINCE
|
||||
DIRS += installer/wince
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
include $(topsrcdir)/testing/testsuite-targets.mk
|
||||
|
||||
package-mobile-tests:
|
||||
$(MAKE) stage-mochitest DIST_BIN=$(DEPTH)/$(DIST)/bin/xulrunner
|
||||
$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
|
||||
@(cd $(PKG_STAGE) && tar $(TAR_CREATE_FLAGS) - *) | bzip2 -f > $(DIST)/$(PKG_PATH)$(TEST_PACKAGE)
|
|
@ -0,0 +1,219 @@
|
|||
# ***** 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.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.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 *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = profile/extensions
|
||||
|
||||
PREF_JS_EXPORTS = $(srcdir)/mobile.js
|
||||
DIST_FILES = application.ini
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
PROGRAM=$(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
|
||||
CPPSRCS = nsBrowserApp.cpp
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
||||
|
||||
LIBS += $(JEMALLOC_LIBS)
|
||||
|
||||
ifeq (Linux_1, $(OS_ARCH)_$(GNU_LD))
|
||||
OS_LDFLAGS += -Wl,-rpath='$$ORIGIN'
|
||||
NSDISTMODE = copy
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_LIBXUL
|
||||
APP_XPCOM_LIBS = $(XPCOM_GLUE_LDOPTS)
|
||||
else
|
||||
MOZILLA_INTERNAL_API = 1
|
||||
APP_XPCOM_LIBS = $(XPCOM_LIBS)
|
||||
endif
|
||||
|
||||
LIBS += $(APP_XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
|
||||
else
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
LIBS += $(DIST)/bin/XUL
|
||||
else
|
||||
EXTRA_DSO_LIBS += xul
|
||||
LIBS += $(EXTRA_DSO_LIBS)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,version)
|
||||
endif
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
ifdef _MSC_VER
|
||||
# Always enter a Windows program through wmain, whether or not we're
|
||||
# a console application.
|
||||
ifdef WINCE
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
|
||||
else
|
||||
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
endif
|
||||
endif
|
||||
endif #LIBXUL_SDK
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
|
||||
GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
|
||||
APP_BUILDID = $(shell $(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid)
|
||||
APP_ICON = mobile
|
||||
APP_SPLASH = splash
|
||||
|
||||
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) \
|
||||
-DGRE_BUILDID=$(GRE_BUILDID) \
|
||||
-DAPP_BUILDID=$(APP_BUILDID) \
|
||||
-DAPP_NAME=$(MOZ_APP_NAME) \
|
||||
-DAPP_VERSION=$(MOZ_APP_VERSION) \
|
||||
-DMOZ_UPDATER=$(MOZ_UPDATER) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZILLA_OFFICIAL
|
||||
DEFINES += -DMOZILLA_OFFICIAL
|
||||
endif
|
||||
|
||||
SOURCE_STAMP := $(shell cd $(srcdir)/.. && hg identify 2>/dev/null | cut -f1 -d' ')
|
||||
ifdef SOURCE_STAMP
|
||||
DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
|
||||
endif
|
||||
|
||||
# strip a trailing slash from the repo URL because it's not always present,
|
||||
# and we want to construct a working URL in buildconfig.html
|
||||
# make+shell+sed = awful
|
||||
_dollar=$$
|
||||
SOURCE_REPO := $(shell cd $(srcdir)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
|
||||
# extra sanity check for old versions of hg
|
||||
# that don't support showconfig
|
||||
ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
|
||||
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
|
||||
endif
|
||||
|
||||
ifdef WINCE
|
||||
DEFINES += -DWINCE=1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
REDIT_PATH = $(LIBXUL_DIST)/host/bin
|
||||
endif
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
REDIT_PATH = $(LIBXUL_DIST)/bin
|
||||
endif
|
||||
|
||||
APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
APP_BINARY_FASTSTART = $(MOZ_APP_NAME)faststart$(BIN_SUFFIX)
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
||||
APP_NAME = $(MOZ_APP_DISPLAYNAME)
|
||||
APP_VERSION = $(MOZ_APP_VERSION)
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
APP_NAME := $(APP_NAME)Debug
|
||||
endif
|
||||
|
||||
AB_CD = $(MOZ_UI_LOCALE)
|
||||
|
||||
AB := $(firstword $(subst -, ,$(AB_CD)))
|
||||
|
||||
clean clobber repackage::
|
||||
rm -rf $(DIST)/$(APP_NAME).app
|
||||
|
||||
ifdef LIBXUL_SDK
|
||||
APPFILES = Resources
|
||||
else
|
||||
APPFILES = MacOS
|
||||
endif
|
||||
|
||||
libs repackage:: application.ini
|
||||
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/%APP_BINARY%/$(APP_BINARY)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
|
||||
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -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
|
||||
ifdef LIBXUL_SDK
|
||||
cp $(LIBXUL_DIST)/bin/xulrunner$(BIN_SUFFIX) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
|
||||
rsync -a --exclude nsinstall --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks
|
||||
else
|
||||
rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
|
||||
rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
|
||||
endif
|
||||
printf "APPLMOZB" > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
|
||||
|
||||
else # MOZ_WIDGET_TOOLKIT != cocoa
|
||||
|
||||
libs::
|
||||
ifdef LIBXUL_SDK
|
||||
cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY)
|
||||
endif
|
||||
ifdef MOZ_FASTSTART
|
||||
ifdef _MSC_VER
|
||||
ifdef WINCE
|
||||
cp $(LIBXUL_DIST)/bin/faststartstub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY_FASTSTART)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifndef SKIP_COPY_XULRUNNER
|
||||
ifdef LIBXUL_SDK
|
||||
$(NSINSTALL) -D $(DIST)/bin/xulrunner
|
||||
(cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
|
||||
endif
|
||||
endif # SKIP_COPY_XULRUNNER
|
||||
|
||||
$(NSINSTALL) -D $(DIST)/bin/chrome/icons/default
|
||||
|
||||
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
|
||||
cp $(srcdir)/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
|
||||
cp $(srcdir)/$(APP_SPLASH).bmp $(DIST)/bin/$(APP_SPLASH).bmp
|
||||
$(REDIT_PATH)/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(srcdir)/$(APP_ICON).ico
|
||||
endif
|
||||
|
||||
endif
|
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 1.4 KiB |
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,26 @@
|
|||
#filter substitution
|
||||
[App]
|
||||
Vendor=Mozilla
|
||||
Name=Fennec
|
||||
Version=@APP_VERSION@
|
||||
BuildID=@APP_BUILDID@
|
||||
#ifdef MOZ_SOURCE_REPO
|
||||
SourceRepository=@MOZ_SOURCE_REPO@
|
||||
#endif
|
||||
#ifdef MOZ_SOURCE_STAMP
|
||||
SourceStamp=@MOZ_SOURCE_STAMP@
|
||||
#endif
|
||||
ID={a23983c0-fd0e-11dc-95ff-0800200c9a66}
|
||||
|
||||
[Gecko]
|
||||
MinVersion=1.9.2b5pre
|
||||
MaxVersion=@GRE_MILESTONE@
|
||||
|
||||
[XRE]
|
||||
EnableExtensionManager=1
|
||||
|
||||
[Crash Reporter]
|
||||
#if MOZILLA_OFFICIAL
|
||||
Enabled=1
|
||||
#endif
|
||||
ServerURL=https://crash-reports.mozilla.com/submit
|
|
@ -0,0 +1,7 @@
|
|||
D/Contents////
|
||||
/background.png/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/disk.icns/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/document.icns/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/dsstore/1.1/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/firefox.icns/1.3/Sun Dec 2 23:08:12 2007/-kb/
|
||||
/license.r/1.4/Mon May 5 00:40:25 2008//
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -0,0 +1,2 @@
|
|||
D/Resources////
|
||||
/Info.plist.in/1.18/Tue Feb 19 05:11:34 2008//
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild/Contents
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>html</string>
|
||||
<string>htm</string>
|
||||
<string>shtml</string>
|
||||
<string>xht</string>
|
||||
<string>xhtml</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>HTML Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>HTML</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>text</string>
|
||||
<string>txt</string>
|
||||
<string>js</string>
|
||||
<string>log</string>
|
||||
<string>css</string>
|
||||
<string>xul</string>
|
||||
<string>rdf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Text Document</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>TEXT</string>
|
||||
<string>utxt</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>jpeg</string>
|
||||
<string>jpg</string>
|
||||
<string>png</string>
|
||||
<string>gif</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>fileBookmark.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>GIFf</string>
|
||||
<string>JPEG</string>
|
||||
<string>PNGf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>fennec</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>%APP_NAME% %APP_VERSION%</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>fennec</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.mozilla.fennec</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>%APP_NAME%</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>%APP_VERSION%</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>MOZB</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>http URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>http</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>https URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>ftp URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>ftp</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>file URL</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>file</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>%APP_VERSION%</string>
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<true/>
|
||||
<key>CGDisableCoalescedUpdates</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
D/English.lproj////
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild/Contents/Resources
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -0,0 +1,2 @@
|
|||
/InfoPlist.strings.in/1.4/Wed Jan 2 19:06:47 2008//
|
||||
D
|
|
@ -0,0 +1 @@
|
|||
mozilla/browser/app/macbuild/Contents/Resources/English.lproj
|
|
@ -0,0 +1 @@
|
|||
:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
|
|
@ -0,0 +1 @@
|
|||
CFBundleName = "%APP_NAME%";
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,117 @@
|
|||
// See /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h for language IDs.
|
||||
data 'LPic' (5000) {
|
||||
// Default language ID, 0 = English
|
||||
$"0000"
|
||||
// Number of entries in list
|
||||
$"0001"
|
||||
|
||||
// Entry 1
|
||||
// Language ID, 0 = English
|
||||
$"0000"
|
||||
// Resource ID, 0 = STR#/TEXT/styl 5000
|
||||
$"0000"
|
||||
// Multibyte language, 0 = no
|
||||
$"0000"
|
||||
};
|
||||
|
||||
resource 'STR#' (5000, "English") {
|
||||
{
|
||||
// Language (unused?) = English
|
||||
"English",
|
||||
// Accept (Agree)
|
||||
"Accept",
|
||||
// Decline (Disagree)
|
||||
"Decline",
|
||||
// Print, ellipsis is 0xC9
|
||||
"PrintÉ",
|
||||
// Save As, ellipsis is 0xC9
|
||||
"Save AsÉ",
|
||||
// Descriptive text, curly quotes are 0xD2 and 0xD3
|
||||
"You are about to install\n"
|
||||
"Minefield.\n"
|
||||
"\n"
|
||||
"Please read the license agreement. If you agree to its terms and accept, click ÒAcceptÓ to access the software. Otherwise, click ÒDeclineÓ to cancel."
|
||||
};
|
||||
};
|
||||
|
||||
// Beware of 1024(?) byte (character?) line length limitation. Split up long
|
||||
// lines.
|
||||
// If straight quotes are used ("), remember to escape them (\").
|
||||
// Newline is \n, to leave a blank line, use two of them.
|
||||
// 0xD2 and 0xD3 are curly double-quotes ("), 0xD4 and 0xD5 are curly
|
||||
// single quotes ('), 0xD5 is also the apostrophe.
|
||||
data 'TEXT' (5000, "English") {
|
||||
"MINEFIELD END-USER SOFTWARE LICENSE AGREEMENT\n"
|
||||
"Version 3.0, May 2008\n"
|
||||
"\n"
|
||||
"A SOURCE CODE VERSION OF CERTAIN MINEFIELD BROWSER FUNCTIONALITY THAT YOU MAY USE, MODIFY AND DISTRIBUTE IS AVAILABLE TO YOU FREE-OF-CHARGE FROM WWW.MOZILLA.ORG UNDER THE MOZILLA PUBLIC LICENSE and other open source software licenses.\n"
|
||||
"\n"
|
||||
"The accompanying executable code version of Minefield and related documentation (the ÒProductÓ) is made available to you under the terms of this MINEFIELD END-USER SOFTWARE LICENSE AGREEMENT (THE ÒAGREEMENTÓ). BY CLICKING THE ÒACCEPTÓ BUTTON, OR BY INSTALLING OR USING THE MINEFIELD BROWSER, YOU ARE CONSENTING TO BE BOUND BY THE AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT CLICK THE ÒACCEPTÓ BUTTON, AND DO NOT INSTALL OR USE ANY PART OF THE MINEFIELD BROWSER.\n"
|
||||
"\n"
|
||||
"DURING THE MINEFIELD INSTALLATION PROCESS, AND AT LATER TIMES, YOU MAY BE GIVEN THE OPTION OF INSTALLING ADDITIONAL COMPONENTS FROM THIRD-PARTY SOFTWARE PROVIDERS. THE INSTALLATION AND USE OF THOSE THIRD-PARTY COMPONENTS MAY BE GOVERNED BY ADDITIONAL LICENSE AGREEMENTS.\n"
|
||||
"\n"
|
||||
"1. LICENSE GRANT. The Mozilla Corporation grants you a non-exclusive license to use the executable code version of the Product. This Agreement will also govern any software upgrades provided by Mozilla that replace and/or supplement the original Product, unless such upgrades are accompanied by a separate license, in which case the terms of that license will govern.\n"
|
||||
"\n"
|
||||
"2. TERMINATION. If you breach this Agreement your right to use the Product will terminate immediately and without notice, but all provisions of this Agreement except the License Grant (Paragraph 1) will survive termination and continue in effect. Upon termination, you must destroy all copies of the Product.\n"
|
||||
"\n"
|
||||
"3. PROPRIETARY RIGHTS. Portions of the Product are available in source code form under the terms of the Mozilla Public License and other open source licenses (collectively, ÒOpen Source LicensesÓ) at http://www.mozilla.org/MPL. Nothing in this Agreement will be construed to limit any rights granted under the Open Source Licenses. Subject to the foregoing, Mozilla, for itself and on behalf of its licensors, hereby reserves all intellectual property rights in the Product, except for the rights expressly granted in this Agreement. You may not remove or alter any trademark, logo, copyright or other proprietary notice in or on the Product. This license does not grant you any right to use the trademarks, service marks or logos of Mozilla or its licensors.\n"
|
||||
"\n"
|
||||
"4. PRIVACY POLICY. You agree to the Mozilla Firefox Privacy Policy, made available online at http://www.mozilla.com/legal/privacy/, as that policy may be changed from time to time. When Mozilla changes the policy in a material way a notice will be posted on the website at www.mozilla.com and when any change is made in the privacy policy, the updated policy will be posted at the above link. It is your responsibility to ensure that you understand the terms of the privacy policy, so you should periodically check the current version of the policy for changes.\n"
|
||||
"\n"
|
||||
"5. WEBSITE INFORMATION SERVICES. Mozilla and its contributors, licensors and partners work to provide the most accurate and up-to-date phishing and malware information. However, they cannot guarantee that this information is comprehensive and error-free: some risky sites may not be identified, and some safe sites may be identified in error.\n"
|
||||
"\n"
|
||||
"6. DISCLAIMER OF WARRANTY. THE PRODUCT IS PROVIDED ÒAS ISÓ WITH ALL FAULTS. TO THE EXTENT PERMITTED BY LAW, MOZILLA AND MOZILLAÕS DISTRIBUTORS, AND LICENSORS HEREBY DISCLAIM ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES THAT THE PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE AND NON-INFRINGING. YOU BEAR THE ENTIRE RISK AS TO SELECTING THE PRODUCT FOR YOUR PURPOSES AND AS TO THE QUALITY AND PERFORMANCE OF THE PRODUCT. THIS LIMITATION WILL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.\n"
|
||||
"\n"
|
||||
"7. LIMITATION OF LIABILITY. EXCEPT AS REQUIRED BY LAW, MOZILLA AND ITS DISTRIBUTORS, DIRECTORS, LICENSORS, CONTRIBUTORS AND AGENTS (COLLECTIVELY, THE ÒMOZILLA GROUPÓ) WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES ARISING OUT OF OR IN ANY WAY RELATING TO THIS AGREEMENT OR THE USE OF OR INABILITY TO USE THE PRODUCT, INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOST PROFITS, LOSS OF DATA, AND COMPUTER FAILURE OR MALFUNCTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF THE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH SUCH CLAIM IS BASED. THE MOZILLA GROUPÕS COLLECTIVE LIABILITY UNDER THIS AGREEMENT WILL NOT EXCEED THE GREATER OF $500 (FIVE HUNDRED DOLLARS) AND THE FEES PAID BY YOU UNDER THE LICENSE (IF ANY). SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.\n"
|
||||
"\n"
|
||||
"8. EXPORT CONTROLS. This license is subject to all applicable export restrictions. You must comply with all export and import laws and restrictions and regulations of any United States or foreign agency or authority relating to the Product and its use.\n"
|
||||
"\n"
|
||||
"9. U.S. GOVERNMENT END-USERS. This Product is a Òcommercial item,Ó as that term is defined in 48 C.F.R. 2.101, consisting of Òcommercial computer softwareÓ and Òcommercial computer software documentation,Ó as such terms are used in 48 C.F.R. 12.212 (Sept. 1995) and 48 C.F.R. 227.7202 (June 1995). Consistent with 48 C.F.R. 12.212, 48 C.F.R. 27.405(b)(2) (June 1998) and 48 C.F.R. 227.7202, all U.S. Government End Users acquire the Product with only those rights as set forth therein.\n"
|
||||
"\n"
|
||||
"10. MISCELLANEOUS. (a) This Agreement constitutes the entire agreement between Mozilla and you concerning the subject matter hereof, and it may only be modified by a written amendment signed by an authorized executive of Mozilla. (b) Except to the extent applicable law, if any, provides otherwise, this Agreement will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions. (c) This Agreement will not be governed by the United Nations Convention on Contracts for the International Sale of Goods. "
|
||||
"(d) If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the partiesÕ original intent, and the remaining portions will remain in full force and effect. (e) A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. (f) Except as required by law, the controlling language of this Agreement is English. "
|
||||
"(g) You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms; the Mozilla Corporation may assign its rights under this Agreement without condition. (h) This Agreement will be binding upon and inure to the benefit of the parties, their successors and permitted assigns."
|
||||
};
|
||||
|
||||
data 'styl' (5000, "English") {
|
||||
// Number of styles following = 2
|
||||
$"0002"
|
||||
|
||||
// Style 1. This is used to display the header lines in bold text.
|
||||
// Start character = 0
|
||||
$"0000 0000"
|
||||
// Height = 16
|
||||
$"0010"
|
||||
// Ascent = 12
|
||||
$"000C"
|
||||
// Font family = 1024 (Lucida Grande)
|
||||
$"0400"
|
||||
// Style bitfield, 0x1=bold 0x2=italic 0x4=underline 0x8=outline
|
||||
// 0x10=shadow 0x20=condensed 0x40=extended
|
||||
$"01"
|
||||
// Style, unused?
|
||||
$"02"
|
||||
// Size = 12 point
|
||||
$"000C"
|
||||
// Color, RGB
|
||||
$"0000 0000 0000"
|
||||
|
||||
// Style 2. This is used to display the body.
|
||||
// Start character = 68
|
||||
$"0000 0044"
|
||||
// Height = 16
|
||||
$"0010"
|
||||
// Ascent = 12
|
||||
$"000C"
|
||||
// Font family = 1024 (Lucida Grande)
|
||||
$"0400"
|
||||
// Style bitfield, 0x1=bold 0x2=italic 0x4=underline 0x8=outline
|
||||
// 0x10=shadow 0x20=condensed 0x40=extended
|
||||
$"00"
|
||||
// Style, unused?
|
||||
$"02"
|
||||
// Size = 12 point
|
||||
$"000C"
|
||||
// Color, RGB
|
||||
$"0000 0000 0000"
|
||||
};
|
После Ширина: | Высота: | Размер: 4.2 KiB |
|
@ -0,0 +1,596 @@
|
|||
/* ***** 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 Mobile Browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Matt Brubeck <mbrubeck@mozilla.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 ***** */
|
||||
|
||||
#filter substitution
|
||||
|
||||
// For browser.xml binding
|
||||
//
|
||||
// cacheRatio* is a ratio that determines the amount of pixels to cache. The
|
||||
// ratio is multiplied by the viewport width or height to get the displayport's
|
||||
// width or height, respectively.
|
||||
//
|
||||
// (divide integer value by 1000 to get the ratio)
|
||||
//
|
||||
// For instance: cachePercentageWidth is 1500
|
||||
// viewport height is 500
|
||||
// => display port height will be 500 * 1.5 = 750
|
||||
//
|
||||
pref("toolkit.browser.cacheRatioWidth", 2000);
|
||||
pref("toolkit.browser.cacheRatioHeight", 3000);
|
||||
|
||||
// How long before a content view (a handle to a remote scrollable object)
|
||||
// expires.
|
||||
pref("toolkit.browser.contentViewExpire", 3000);
|
||||
|
||||
pref("toolkit.defaultChromeURI", "chrome://browser/content/browser.xul");
|
||||
pref("general.useragent.compatMode.firefox", true);
|
||||
pref("browser.chromeURL", "chrome://browser/content/");
|
||||
|
||||
pref("browser.tabs.warnOnClose", true);
|
||||
#ifdef MOZ_IPC
|
||||
pref("browser.tabs.remote", true);
|
||||
#else
|
||||
pref("browser.tabs.remote", false);
|
||||
#endif
|
||||
|
||||
pref("toolkit.screen.lock", false);
|
||||
|
||||
// From libpref/src/init/all.js, extended to allow a slightly wider zoom range.
|
||||
pref("zoom.minPercent", 20);
|
||||
pref("zoom.maxPercent", 400);
|
||||
pref("toolkit.zoomManager.zoomValues", ".2,.3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3,4");
|
||||
|
||||
// Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
|
||||
pref("browser.viewport.scaleRatio", -1);
|
||||
|
||||
/* use custom widget for html:select */
|
||||
pref("ui.use_native_popup_windows", true);
|
||||
|
||||
/* allow scrollbars to float above chrome ui */
|
||||
pref("ui.scrollbarsCanOverlapContent", 1);
|
||||
|
||||
/* use long press to display a context menu */
|
||||
pref("ui.click_hold_context_menus", true);
|
||||
|
||||
/* cache prefs */
|
||||
pref("browser.cache.disk.enable", false);
|
||||
pref("browser.cache.disk.capacity", 0); // kilobytes
|
||||
pref("browser.cache.disk.smart_size.enabled", false);
|
||||
pref("browser.cache.disk.smart_size.first_run", false);
|
||||
|
||||
pref("browser.cache.memory.enable", true);
|
||||
pref("browser.cache.memory.capacity", 1024); // kilobytes
|
||||
|
||||
/* image cache prefs */
|
||||
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
|
||||
|
||||
/* protocol warning prefs */
|
||||
pref("network.protocol-handler.warn-external.tel", false);
|
||||
pref("network.protocol-handler.warn-external.mailto", false);
|
||||
pref("network.protocol-handler.warn-external.vnd.youtube", false);
|
||||
|
||||
/* http prefs */
|
||||
pref("network.http.pipelining", true);
|
||||
pref("network.http.pipelining.ssl", true);
|
||||
pref("network.http.proxy.pipelining", true);
|
||||
pref("network.http.pipelining.maxrequests" , 6);
|
||||
pref("network.http.keep-alive.timeout", 600);
|
||||
pref("network.http.max-connections", 6);
|
||||
pref("network.http.max-connections-per-server", 4);
|
||||
pref("network.http.max-persistent-connections-per-server", 4);
|
||||
pref("network.http.max-persistent-connections-per-proxy", 4);
|
||||
#ifdef MOZ_PLATFORM_MAEMO
|
||||
pref("network.autodial-helper.enabled", true);
|
||||
#endif
|
||||
|
||||
// See bug 545869 for details on why these are set the way they are
|
||||
pref("network.buffer.cache.count", 24);
|
||||
pref("network.buffer.cache.size", 16384);
|
||||
|
||||
/* history max results display */
|
||||
pref("browser.display.history.maxresults", 100);
|
||||
|
||||
/* How many times should have passed before the remote tabs list is refreshed */
|
||||
pref("browser.display.remotetabs.timeout", 10);
|
||||
|
||||
/* session history */
|
||||
pref("browser.sessionhistory.max_total_viewers", 1);
|
||||
pref("browser.sessionhistory.max_entries", 50);
|
||||
pref("browser.sessionhistory.optimize_eviction", true);
|
||||
|
||||
/* session store */
|
||||
pref("browser.sessionstore.resume_session_once", false);
|
||||
pref("browser.sessionstore.resume_from_crash", true);
|
||||
pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
|
||||
pref("browser.sessionstore.interval", 10000); // milliseconds
|
||||
pref("browser.sessionstore.max_tabs_undo", 5);
|
||||
|
||||
/* these should help performance */
|
||||
pref("mozilla.widget.force-24bpp", true);
|
||||
pref("mozilla.widget.use-buffer-pixmap", true);
|
||||
pref("mozilla.widget.disable-native-theme", true);
|
||||
|
||||
/* download manager (don't show the window or alert) */
|
||||
pref("browser.download.useDownloadDir", true);
|
||||
pref("browser.download.folderList", 1); // Default to ~/Downloads
|
||||
pref("browser.download.manager.showAlertOnComplete", false);
|
||||
pref("browser.download.manager.showAlertInterval", 2000);
|
||||
pref("browser.download.manager.retention", 2);
|
||||
pref("browser.download.manager.showWhenStarting", false);
|
||||
pref("browser.download.manager.closeWhenDone", true);
|
||||
pref("browser.download.manager.openDelay", 0);
|
||||
pref("browser.download.manager.focusWhenStarting", false);
|
||||
pref("browser.download.manager.flashCount", 2);
|
||||
pref("browser.download.manager.displayedHistoryDays", 7);
|
||||
|
||||
/* download alerts (disabled above) */
|
||||
pref("alerts.slideIncrement", 1);
|
||||
pref("alerts.slideIncrementTime", 10);
|
||||
pref("alerts.totalOpenTime", 6000);
|
||||
pref("alerts.height", 50);
|
||||
|
||||
/* password manager */
|
||||
pref("signon.rememberSignons", true);
|
||||
pref("signon.expireMasterPassword", false);
|
||||
pref("signon.SignonFileName", "signons.txt");
|
||||
|
||||
/* form helper */
|
||||
pref("formhelper.enabled", true);
|
||||
pref("formhelper.autozoom", true);
|
||||
pref("formhelper.autozoom.caret", true);
|
||||
pref("formhelper.restore", false);
|
||||
|
||||
/* find helper */
|
||||
pref("findhelper.autozoom", true);
|
||||
|
||||
/* autocomplete */
|
||||
pref("browser.formfill.enable", true);
|
||||
|
||||
/* microsummaries */
|
||||
pref("browser.microsummary.enabled", false);
|
||||
pref("browser.microsummary.updateGenerators", false);
|
||||
|
||||
/* spellcheck */
|
||||
pref("layout.spellcheckDefault", 0);
|
||||
|
||||
/* extension manager and xpinstall */
|
||||
pref("xpinstall.whitelist.add", "addons.mozilla.org");
|
||||
|
||||
pref("extensions.autoupdate.enabled", true);
|
||||
pref("extensions.autoupdate.interval", 86400);
|
||||
pref("extensions.update.enabled", false);
|
||||
pref("extensions.update.interval", 86400);
|
||||
pref("extensions.dss.enabled", false);
|
||||
pref("extensions.dss.switchPending", false);
|
||||
pref("extensions.ignoreMTimeChanges", false);
|
||||
pref("extensions.logging.enabled", false);
|
||||
pref("extensions.hideInstallButton", true);
|
||||
pref("extensions.showMismatchUI", false);
|
||||
pref("extensions.hideUpdateButton", false);
|
||||
|
||||
pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%");
|
||||
|
||||
/* preferences for the Get Add-ons pane */
|
||||
pref("extensions.getAddons.cache.enabled", true);
|
||||
pref("extensions.getAddons.maxResults", 15);
|
||||
pref("extensions.getAddons.recommended.browseURL", "https://addons.mozilla.org/%LOCALE%/mobile/recommended/");
|
||||
pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/list/featured/all/%MAX_RESULTS%/%OS%/%VERSION%");
|
||||
pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/mobile/search?q=%TERMS%");
|
||||
pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%");
|
||||
pref("extensions.getAddons.browseAddons", "https://addons.mozilla.org/%LOCALE%/mobile/");
|
||||
pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/mobile/api/%API_VERSION%/search/guid:%IDS%?src=mobile&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
|
||||
|
||||
/* blocklist preferences */
|
||||
pref("extensions.blocklist.enabled", true);
|
||||
pref("extensions.blocklist.interval", 86400);
|
||||
pref("extensions.blocklist.url", "https://addons.mozilla.org/blocklist/3/%APP_ID%/%APP_VERSION%/%PRODUCT%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%PING_COUNT%/%TOTAL_PING_COUNT%/%DAYS_SINCE_LAST_PING%/");
|
||||
pref("extensions.blocklist.detailsURL", "https://www.mozilla.com/%LOCALE%/blocklist/");
|
||||
|
||||
/* block popups by default, and notify the user about blocked popups */
|
||||
pref("dom.disable_open_during_load", true);
|
||||
pref("privacy.popups.showBrowserMessage", true);
|
||||
|
||||
pref("keyword.enabled", true);
|
||||
pref("keyword.URL", "http://www.google.com/m?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=");
|
||||
|
||||
pref("accessibility.typeaheadfind", false);
|
||||
pref("accessibility.typeaheadfind.timeout", 5000);
|
||||
pref("accessibility.typeaheadfind.flashBar", 1);
|
||||
pref("accessibility.typeaheadfind.linksonly", false);
|
||||
pref("accessibility.typeaheadfind.casesensitive", 0);
|
||||
// zoom key(F7) conflicts with caret browsing on maemo
|
||||
pref("accessibility.browsewithcaret_shortcut.enabled", false);
|
||||
|
||||
// Whether or not we show a dialog box informing the user that the update was
|
||||
// successfully applied.
|
||||
pref("app.update.showInstalledUI", false);
|
||||
|
||||
// Whether the character encoding menu is under the main Firefox button. This
|
||||
// preference is a string so that localizers can alter it.
|
||||
pref("browser.menu.showCharacterEncoding", "chrome://browser/locale/browser.properties");
|
||||
pref("intl.charsetmenu.browser.static", "chrome://browser/locale/browser.properties");
|
||||
|
||||
// pointer to the default engine name
|
||||
pref("browser.search.defaultenginename", "chrome://browser/locale/region.properties");
|
||||
// SSL error page behaviour
|
||||
pref("browser.ssl_override_behavior", 2);
|
||||
pref("browser.xul.error_pages.expert_bad_cert", false);
|
||||
|
||||
// disable logging for the search service by default
|
||||
pref("browser.search.log", false);
|
||||
|
||||
// ordering of search engines in the engine list.
|
||||
pref("browser.search.order.1", "chrome://browser/locale/region.properties");
|
||||
pref("browser.search.order.2", "chrome://browser/locale/region.properties");
|
||||
|
||||
// disable updating
|
||||
pref("browser.search.update", false);
|
||||
pref("browser.search.update.log", false);
|
||||
pref("browser.search.updateinterval", 6);
|
||||
|
||||
// enable search suggestions by default
|
||||
pref("browser.search.suggest.enabled", true);
|
||||
|
||||
// Tell the search service to load search plugins from the locale JAR
|
||||
pref("browser.search.loadFromJars", true);
|
||||
pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/");
|
||||
|
||||
// tell the search service that we don't really expose the "current engine"
|
||||
pref("browser.search.noCurrentEngine", true);
|
||||
|
||||
// enable xul error pages
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
|
||||
// Specify emptyRestriction = 0 so that bookmarks appear in the list by default
|
||||
pref("browser.urlbar.default.behavior", 0);
|
||||
pref("browser.urlbar.default.behavior.emptyRestriction", 0);
|
||||
|
||||
// Let the faviconservice know that we display favicons as 32x32px so that it
|
||||
// uses the right size when optimizing favicons
|
||||
pref("places.favicons.optimizeToDimension", 32);
|
||||
|
||||
// various and sundry awesomebar prefs (should remove/re-evaluate
|
||||
// these once bug 447900 is fixed)
|
||||
pref("browser.urlbar.clickSelectsAll", true);
|
||||
pref("browser.urlbar.doubleClickSelectsAll", true);
|
||||
pref("browser.urlbar.autoFill", false);
|
||||
pref("browser.urlbar.matchOnlyTyped", false);
|
||||
pref("browser.urlbar.matchBehavior", 1);
|
||||
pref("browser.urlbar.filter.javascript", true);
|
||||
pref("browser.urlbar.maxRichResults", 24); // increased so we see more results when portrait
|
||||
pref("browser.urlbar.search.chunkSize", 1000);
|
||||
pref("browser.urlbar.search.timeout", 100);
|
||||
pref("browser.urlbar.restrict.history", "^");
|
||||
pref("browser.urlbar.restrict.bookmark", "*");
|
||||
pref("browser.urlbar.restrict.tag", "+");
|
||||
pref("browser.urlbar.match.title", "#");
|
||||
pref("browser.urlbar.match.url", "@");
|
||||
pref("browser.urlbar.autocomplete.search_threshold", 5);
|
||||
pref("browser.history.grouping", "day");
|
||||
pref("browser.history.showSessions", false);
|
||||
pref("browser.sessionhistory.max_entries", 50);
|
||||
pref("browser.history_expire_days", 180);
|
||||
pref("browser.history_expire_days_min", 90);
|
||||
pref("browser.history_expire_sites", 40000);
|
||||
pref("browser.places.migratePostDataAnnotations", true);
|
||||
pref("browser.places.updateRecentTagsUri", true);
|
||||
pref("places.frecency.numVisits", 10);
|
||||
pref("places.frecency.numCalcOnIdle", 50);
|
||||
pref("places.frecency.numCalcOnMigrate", 50);
|
||||
pref("places.frecency.updateIdleTime", 60000);
|
||||
pref("places.frecency.firstBucketCutoff", 4);
|
||||
pref("places.frecency.secondBucketCutoff", 14);
|
||||
pref("places.frecency.thirdBucketCutoff", 31);
|
||||
pref("places.frecency.fourthBucketCutoff", 90);
|
||||
pref("places.frecency.firstBucketWeight", 100);
|
||||
pref("places.frecency.secondBucketWeight", 70);
|
||||
pref("places.frecency.thirdBucketWeight", 50);
|
||||
pref("places.frecency.fourthBucketWeight", 30);
|
||||
pref("places.frecency.defaultBucketWeight", 10);
|
||||
pref("places.frecency.embedVisitBonus", 0);
|
||||
pref("places.frecency.linkVisitBonus", 100);
|
||||
pref("places.frecency.typedVisitBonus", 2000);
|
||||
pref("places.frecency.bookmarkVisitBonus", 150);
|
||||
pref("places.frecency.downloadVisitBonus", 0);
|
||||
pref("places.frecency.permRedirectVisitBonus", 0);
|
||||
pref("places.frecency.tempRedirectVisitBonus", 0);
|
||||
pref("places.frecency.defaultVisitBonus", 0);
|
||||
pref("places.frecency.unvisitedBookmarkBonus", 140);
|
||||
pref("places.frecency.unvisitedTypedBonus", 200);
|
||||
|
||||
// disable color management
|
||||
pref("gfx.color_management.mode", 0);
|
||||
|
||||
// don't allow JS to move and resize existing windows
|
||||
pref("dom.disable_window_move_resize", true);
|
||||
|
||||
// prevent click image resizing for nsImageDocument
|
||||
pref("browser.enable_click_image_resizing", false);
|
||||
|
||||
// open in tab preferences
|
||||
// 0=default window, 1=current window/tab, 2=new window, 3=new tab in most window
|
||||
pref("browser.link.open_external", 3);
|
||||
pref("browser.link.open_newwindow", 3);
|
||||
// 0=force all new windows to tabs, 1=don't force, 2=only force those with no features set
|
||||
pref("browser.link.open_newwindow.restriction", 0);
|
||||
|
||||
// controls which bits of private data to clear. by default we clear them all.
|
||||
pref("privacy.item.cache", true);
|
||||
pref("privacy.item.cookies", true);
|
||||
pref("privacy.item.offlineApps", true);
|
||||
pref("privacy.item.history", true);
|
||||
pref("privacy.item.formdata", true);
|
||||
pref("privacy.item.downloads", true);
|
||||
pref("privacy.item.passwords", true);
|
||||
pref("privacy.item.sessions", true);
|
||||
pref("privacy.item.geolocation", true);
|
||||
pref("privacy.item.siteSettings", true);
|
||||
pref("privacy.item.syncAccount", true);
|
||||
|
||||
#ifdef MOZ_PLATFORM_MAEMO
|
||||
pref("plugins.force.wmode", "opaque");
|
||||
#endif
|
||||
|
||||
// URL to the Learn More link XXX this is the firefox one. Bug 495578 fixes this.
|
||||
pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");
|
||||
|
||||
// base url for the wifi geolocation network provider
|
||||
pref("geo.wifi.uri", "https://www.google.com/loc/json");
|
||||
|
||||
// enable geo
|
||||
pref("geo.enabled", true);
|
||||
|
||||
// content sink control -- controls responsiveness during page load
|
||||
// see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9
|
||||
pref("content.sink.enable_perf_mode", 2); // 0 - switch, 1 - interactive, 2 - perf
|
||||
pref("content.sink.pending_event_mode", 0);
|
||||
pref("content.sink.perf_deflect_count", 1000000);
|
||||
pref("content.sink.perf_parse_time", 50000000);
|
||||
|
||||
pref("javascript.options.mem.gc_frequency", 300);
|
||||
pref("javascript.options.mem.high_water_mark", 32);
|
||||
pref("javascript.options.methodjit.chrome", false);
|
||||
|
||||
pref("dom.max_chrome_script_run_time", 0); // disable slow script dialog for chrome
|
||||
pref("dom.max_script_run_time", 20);
|
||||
|
||||
// JS error console
|
||||
pref("devtools.errorconsole.enabled", false);
|
||||
|
||||
// kinetic tweakables
|
||||
pref("browser.ui.kinetic.updateInterval", 30);
|
||||
pref("browser.ui.kinetic.decelerationRate", 20);
|
||||
pref("browser.ui.kinetic.speedSensitivity", 80);
|
||||
pref("browser.ui.kinetic.swipeLength", 160);
|
||||
|
||||
// zooming
|
||||
pref("browser.ui.zoom.pageFitGranularity", 9); // don't zoom to fit by less than 1/9 (11%)
|
||||
pref("browser.ui.zoom.animationDuration", 200); // ms duration of double-tap zoom animation
|
||||
pref("browser.ui.zoom.reflow", false); // Change text wrapping on double-tap
|
||||
pref("browser.ui.zoom.reflow.fontSize", 720);
|
||||
|
||||
// pinch gesture
|
||||
pref("browser.ui.pinch.maxGrowth", 150); // max pinch distance growth
|
||||
pref("browser.ui.pinch.maxShrink", 200); // max pinch distance shrinkage
|
||||
pref("browser.ui.pinch.scalingFactor", 500); // scaling factor for above pinch limits
|
||||
|
||||
// Touch radius (area around the touch location to look for target elements),
|
||||
// in 1/240-inch pixels:
|
||||
pref("browser.ui.touch.left", 8);
|
||||
pref("browser.ui.touch.right", 8);
|
||||
pref("browser.ui.touch.top", 12);
|
||||
pref("browser.ui.touch.bottom", 4);
|
||||
pref("browser.ui.touch.weight.visited", 120); // percentage
|
||||
|
||||
// plugins
|
||||
#if MOZ_PLATFORM_MAEMO == 6
|
||||
pref("plugin.disable", false);
|
||||
#else
|
||||
pref("plugin.disable", true);
|
||||
#endif
|
||||
pref("dom.ipc.plugins.enabled", true);
|
||||
|
||||
// process priority
|
||||
// higher values give content process less CPU time
|
||||
#if MOZ_PLATFORM_MAEMO
|
||||
pref("dom.ipc.content.nice", 10);
|
||||
#else
|
||||
pref("dom.ipc.content.nice", 1);
|
||||
#endif
|
||||
|
||||
// product URLs
|
||||
// The breakpad report server to link to in about:crashes
|
||||
pref("breakpad.reportURL", "http://crash-stats.mozilla.com/report/index/");
|
||||
pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/mobile/%VERSION%/releasenotes/");
|
||||
pref("app.sync.tutorialURL", "https://support.mozilla.com/kb/sync-firefox-between-desktop-and-mobile");
|
||||
pref("app.support.baseURL", "http://support.mozilla.com/mobile");
|
||||
pref("app.feedbackURL", "http://input.mozilla.com/feedback/");
|
||||
pref("app.privacyURL", "http://www.mozilla.com/%LOCALE%/m/privacy.html");
|
||||
pref("app.creditsURL", "http://www.mozilla.org/credits/");
|
||||
#if MOZ_UPDATE_CHANNEL == beta
|
||||
pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/features/");
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/beta/faq/");
|
||||
#else
|
||||
pref("app.featuresURL", "http://www.mozilla.com/%LOCALE%/mobile/features/");
|
||||
pref("app.faqURL", "http://www.mozilla.com/%LOCALE%/mobile/faq/");
|
||||
#endif
|
||||
|
||||
pref("app.promo.spark.baseURL", "http://spark.mozilla.org");
|
||||
#ifdef MOZ_OFFICIAL_BRANDING
|
||||
pref("app.promo.spark.endDate", "2011-05-01");
|
||||
#else
|
||||
pref("app.promo.spark.endDate", "2011-01-01");
|
||||
#endif
|
||||
|
||||
// Name of alternate about: page for certificate errors (when undefined, defaults to about:neterror)
|
||||
pref("security.alternate_certificate_error_page", "certerror");
|
||||
|
||||
pref("security.warn_viewing_mixed", false); // Warning is disabled. See Bug 616712.
|
||||
|
||||
// Override some named colors to avoid inverse OS themes
|
||||
pref("ui.-moz-dialog", "#efebe7");
|
||||
pref("ui.-moz-dialogtext", "#101010");
|
||||
pref("ui.-moz-field", "#fff");
|
||||
pref("ui.-moz-fieldtext", "#1a1a1a");
|
||||
pref("ui.-moz-buttonhoverface", "#f3f0ed");
|
||||
pref("ui.-moz-buttonhovertext", "#101010");
|
||||
pref("ui.-moz-combobox", "#fff");
|
||||
pref("ui.-moz-comboboxtext", "#101010");
|
||||
pref("ui.buttonface", "#ece7e2");
|
||||
pref("ui.buttonhighlight", "#fff");
|
||||
pref("ui.buttonshadow", "#aea194");
|
||||
pref("ui.buttontext", "#101010");
|
||||
pref("ui.captiontext", "#101010");
|
||||
pref("ui.graytext", "#b1a598");
|
||||
pref("ui.highlight", "#fad184");
|
||||
pref("ui.highlighttext", "#1a1a1a");
|
||||
pref("ui.infobackground", "#f5f5b5");
|
||||
pref("ui.infotext", "#000");
|
||||
pref("ui.menu", "#f7f5f3");
|
||||
pref("ui.menutext", "#101010");
|
||||
pref("ui.threeddarkshadow", "#000");
|
||||
pref("ui.threedface", "#ece7e2");
|
||||
pref("ui.threedhighlight", "#fff");
|
||||
pref("ui.threedlightshadow", "#ece7e2");
|
||||
pref("ui.threedshadow", "#aea194");
|
||||
pref("ui.window", "#efebe7");
|
||||
pref("ui.windowtext", "#101010");
|
||||
pref("ui.windowframe", "#efebe7");
|
||||
|
||||
#ifdef MOZ_OFFICIAL_BRANDING
|
||||
pref("browser.search.param.yahoo-fr", "moz35");
|
||||
pref("browser.search.param.yahoo-fr-cjkt", "moz35");
|
||||
pref("browser.search.param.yahoo-fr-ja", "mozff");
|
||||
#endif
|
||||
|
||||
/* app update prefs */
|
||||
pref("app.update.timer", 60000); // milliseconds (1 min)
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
pref("app.update.enabled", true);
|
||||
pref("app.update.timerFirstInterval", 20000); // milliseconds
|
||||
pref("app.update.auto", false);
|
||||
pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");
|
||||
pref("app.update.mode", 1);
|
||||
pref("app.update.silent", false);
|
||||
pref("app.update.url", "https://aus2.mozilla.org/update/4/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%PLATFORM_VERSION%/update.xml");
|
||||
pref("app.update.nagTimer.restart", 86400);
|
||||
pref("app.update.promptWaitTime", 43200);
|
||||
pref("app.update.idletime", 60);
|
||||
pref("app.update.showInstalledUI", false);
|
||||
pref("app.update.incompatible.mode", 0);
|
||||
pref("app.update.download.backgroundInterval", 0);
|
||||
|
||||
#ifdef MOZ_OFFICIAL_BRANDING
|
||||
pref("app.update.interval", 86400);
|
||||
pref("app.update.url.manual", "http://www.mozilla.com/%LOCALE%/m/");
|
||||
pref("app.update.url.details", "http://www.mozilla.com/%LOCALE%/mobile/releases/");
|
||||
#else
|
||||
pref("app.update.interval", 28800);
|
||||
pref("app.update.url.manual", "http://www.mozilla.com/%LOCALE%/mobile/");
|
||||
pref("app.update.url.details", "http://www.mozilla.com/%LOCALE%/mobile/");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// replace newlines with spaces on paste into single-line text boxes
|
||||
pref("editor.singleLine.pasteNewlines", 2);
|
||||
|
||||
#ifdef MOZ_PLATFORM_MAEMO
|
||||
// update fonts for better readability
|
||||
pref("font.default.x-baltic", "SwissA");
|
||||
pref("font.default.x-central-euro", "SwissA");
|
||||
pref("font.default.x-cyrillic", "SwissA");
|
||||
pref("font.default.x-unicode", "SwissA");
|
||||
pref("font.default.x-user-def", "SwissA");
|
||||
pref("font.default.x-western", "SwissA");
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
pref("browser.sync.enabled", true);
|
||||
|
||||
// sync service
|
||||
pref("services.sync.client.type", "mobile");
|
||||
pref("services.sync.registerEngines", "Tab,Bookmarks,Form,History,Password,Prefs");
|
||||
pref("services.sync.autoconnectDelay", 5);
|
||||
|
||||
// prefs to sync by default
|
||||
pref("services.sync.prefs.sync.browser.startup.homepage.title", true);
|
||||
pref("services.sync.prefs.sync.browser.startup.homepage", true);
|
||||
pref("services.sync.prefs.sync.browser.tabs.warnOnClose", true);
|
||||
pref("services.sync.prefs.sync.browser.ui.zoom.reflow", true);
|
||||
pref("services.sync.prefs.sync.devtools.errorconsole.enabled", true);
|
||||
pref("services.sync.prefs.sync.javascript.enabled", true);
|
||||
pref("services.sync.prefs.sync.lightweightThemes.isThemeSelected", true);
|
||||
pref("services.sync.prefs.sync.lightweightThemes.usedThemes", true);
|
||||
pref("services.sync.prefs.sync.network.cookie.cookieBehavior", true);
|
||||
pref("services.sync.prefs.sync.permissions.default.image", true);
|
||||
pref("services.sync.prefs.sync.signon.rememberSignons", true);
|
||||
#endif
|
||||
|
||||
// threshold where a tap becomes a drag, in 1/240" reference pixels
|
||||
// The names of the preferences are to be in sync with nsEventStateManager.cpp
|
||||
pref("ui.dragThresholdX", 25);
|
||||
pref("ui.dragThresholdY", 25);
|
||||
|
||||
#if MOZ_PLATFORM_MAEMO == 6
|
||||
pref("layers.acceleration.disabled", false);
|
||||
#else
|
||||
pref("layers.acceleration.disabled", true);
|
||||
#endif
|
||||
|
||||
pref("notification.feature.enabled", true);
|
||||
|
||||
// prevent tooltips from showing up
|
||||
pref("browser.chrome.toolbar_tips", false);
|
||||
pref("indexedDB.feature.enabled", false);
|
||||
|
||||
// prevent video elements from preloading too much data
|
||||
pref("media.preload.default", 1); // default to preload none
|
||||
pref("media.preload.auto", 2); // preload metadata if preload=auto
|
||||
|
||||
// optimize images memory usage
|
||||
pref("image.mem.decodeondraw", true);
|
||||
pref("content.image.allow_locking", false);
|
||||
pref("image.mem.min_discard_timeout_ms", 20000);
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
/* -*- 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 mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@brianryner.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 ***** */
|
||||
|
||||
#include "nsXULAppAPI.h"
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prprf.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsStringGlue.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
// we want to use the DLL blocklist if possible
|
||||
#define XRE_WANT_DLL_BLOCKLIST
|
||||
// we want a wmain entry point
|
||||
#include "nsWindowsWMain.cpp"
|
||||
#endif
|
||||
|
||||
static void Output(const char *fmt, ... )
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
|
||||
#if defined(XP_WIN) && !MOZ_WINCONSOLE
|
||||
PRUnichar msg[2048];
|
||||
_vsnwprintf(msg, sizeof(msg)/sizeof(msg[0]), NS_ConvertUTF8toUTF16(fmt).get(), ap);
|
||||
MessageBoxW(NULL, msg, L"XULRunner", MB_OK | MB_ICONERROR);
|
||||
#else
|
||||
vfprintf(stderr, fmt, ap);
|
||||
#endif
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if |arg| matches the given argument name.
|
||||
*/
|
||||
static PRBool IsArg(const char* arg, const char* s)
|
||||
{
|
||||
if (*arg == '-')
|
||||
{
|
||||
if (*++arg == '-')
|
||||
++arg;
|
||||
return !PL_strcasecmp(arg, s);
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
if (*arg == '/')
|
||||
return !PL_strcasecmp(++arg, s);
|
||||
#endif
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
class ScopedLogging
|
||||
{
|
||||
public:
|
||||
ScopedLogging() { NS_LogInit(); }
|
||||
~ScopedLogging() { NS_LogTerm(); }
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
ScopedLogging log;
|
||||
|
||||
nsCOMPtr<nsILocalFile> appini;
|
||||
nsresult rv = XRE_GetBinaryPath(argv[0], getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't calculate the application directory.");
|
||||
return 255;
|
||||
}
|
||||
appini->SetNativeLeafName(NS_LITERAL_CSTRING("application.ini"));
|
||||
|
||||
// Allow firefox.exe to launch XULRunner apps via -app <application.ini>
|
||||
// Note that -app must be the *first* argument.
|
||||
char *appEnv = nsnull;
|
||||
const char *appDataFile = PR_GetEnv("XUL_APP_FILE");
|
||||
if (appDataFile && *appDataFile) {
|
||||
rv = XRE_GetFileFromPath(appDataFile, getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Invalid path found: '%s'", appDataFile);
|
||||
return 255;
|
||||
}
|
||||
}
|
||||
else if (argc > 1 && IsArg(argv[1], "app")) {
|
||||
if (argc == 2) {
|
||||
Output("Incorrect number of arguments passed to -app");
|
||||
return 255;
|
||||
}
|
||||
|
||||
rv = XRE_GetFileFromPath(argv[2], getter_AddRefs(appini));
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("application.ini path not recognized: '%s'", argv[2]);
|
||||
return 255;
|
||||
}
|
||||
|
||||
appEnv = PR_smprintf("XUL_APP_FILE=%s", argv[2]);
|
||||
PR_SetEnv(appEnv);
|
||||
argv[2] = argv[0];
|
||||
argv += 2;
|
||||
argc -= 2;
|
||||
}
|
||||
|
||||
nsXREAppData *appData;
|
||||
rv = XRE_CreateAppData(appini, &appData);
|
||||
if (NS_FAILED(rv)) {
|
||||
Output("Couldn't read application.ini");
|
||||
return 255;
|
||||
}
|
||||
|
||||
int result = XRE_main(argc, argv, appData);
|
||||
XRE_FreeAppData(appData);
|
||||
if (appEnv)
|
||||
PR_smprintf_free(appEnv);
|
||||
return result;
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
# ***** 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.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2010
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.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 *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq (beta,$(MOZ_UPDATE_CHANNEL))
|
||||
EXTENSIONS = \
|
||||
feedback@mobile.mozilla.org \
|
||||
$(NULL)
|
||||
|
||||
ABS_DIST = $(call core_abspath,$(DIST))
|
||||
|
||||
define _PACKAGE_EXTENSIONS
|
||||
rm -f $(ABS_DIST)/bin/extensions/$(dir).xpi
|
||||
mkdir -p $(ABS_DIST)/bin/extensions
|
||||
cd $(srcdir)/$(dir)/; $(ZIP) -r9 $(ABS_DIST)/bin/extensions/$(dir).xpi *
|
||||
|
||||
endef # do not remove the blank line!
|
||||
|
||||
libs::
|
||||
$(foreach dir,$(EXTENSIONS),$(_PACKAGE_EXTENSIONS))
|
||||
|
||||
endif
|
|
@ -0,0 +1,5 @@
|
|||
content feedback content/
|
||||
skin feedback classic/1.0 skin/
|
||||
locale feedback en-US locale/en-US/
|
||||
|
||||
overlay chrome://browser/content/browser.xul chrome://feedback/content/overlay.xul
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
function populateFeedback(aMessage) {
|
||||
let json = aMessage.json;
|
||||
|
||||
let referrer = json.referrer;
|
||||
let URLElem = content.document.getElementById("id_url");
|
||||
if (URLElem)
|
||||
URLElem.value = referrer;
|
||||
|
||||
let URLElems = content.document.getElementsByClassName("url");
|
||||
for (let index=0; index<URLElems.length; index++)
|
||||
URLElems[index].value = referrer;
|
||||
|
||||
let device = json.device || "";
|
||||
let deviceElem = content.document.getElementById("id_device");
|
||||
if (deviceElem)
|
||||
deviceElem.value = device;
|
||||
|
||||
let deviceElems = content.document.getElementsByClassName("device");
|
||||
for (let index=0; index<deviceElems.length; index++)
|
||||
deviceElems[index].value = device;
|
||||
|
||||
let manufacturer = json.manufacturer || "";
|
||||
let manufacturerElem = content.document.getElementById("id_manufacturer");
|
||||
if (manufacturerElem)
|
||||
manufacturerElem.value = manufacturer;
|
||||
|
||||
let manufacturerElems = content.document.getElementsByClassName("manufacturer");
|
||||
for (let index=0; index<manufacturerElems.length; index++)
|
||||
manufacturerElems[index].value = manufacturer;
|
||||
}
|
||||
|
||||
addMessageListener("Feedback:InitPage", populateFeedback);
|
|
@ -0,0 +1,137 @@
|
|||
/* ***** 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 Feedback.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Mark Finkle <mark.finkle@gmail.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 ***** */
|
||||
|
||||
var Feedback = {
|
||||
_prefs: [],
|
||||
_device: "",
|
||||
_manufacturer: "",
|
||||
|
||||
init: function(aEvent) {
|
||||
// Delay the widget initialization during startup.
|
||||
window.addEventListener("UIReadyDelayed", function(aEvent) {
|
||||
let appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
|
||||
document.getElementById("feedback-about").setAttribute("desc", appInfo.version);
|
||||
|
||||
// A simple frame script to fill in the referrer page and device info
|
||||
messageManager.loadFrameScript("chrome://feedback/content/content.js", true);
|
||||
|
||||
window.removeEventListener(aEvent.type, arguments.callee, false);
|
||||
document.getElementById("feedback-container").hidden = false;
|
||||
|
||||
let feedbackPrefs = document.getElementById("feedback-tools").childNodes;
|
||||
for (let i = 0; i < feedbackPrefs.length; i++) {
|
||||
let pref = feedbackPrefs[i].getAttribute("pref");
|
||||
if (!pref)
|
||||
continue;
|
||||
|
||||
let value = Services.prefs.getPrefType(pref) == Ci.nsIPrefBranch.PREF_INVALID ? false : Services.prefs.getBoolPref(pref);
|
||||
Feedback._prefs.push({ "name": pref, "value": value });
|
||||
}
|
||||
|
||||
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
|
||||
Feedback._device = sysInfo.get("device");
|
||||
Feedback._manufacturer = sysInfo.get("manufacturer");
|
||||
}, false);
|
||||
},
|
||||
|
||||
openFeedback: function(aName) {
|
||||
let pref = "extensions.feedback.url." + aName;
|
||||
let url = Services.prefs.getPrefType(pref) == Ci.nsIPrefBranch.PREF_INVALID ? "" : Services.prefs.getCharPref(pref);
|
||||
if (!url)
|
||||
return;
|
||||
|
||||
let currentURL = Browser.selectedBrowser.currentURI.spec;
|
||||
let newTab = BrowserUI.newTab(url, Browser.selectedTab);
|
||||
|
||||
// Tell the feedback page to fill in the referrer URL
|
||||
newTab.browser.messageManager.addMessageListener("DOMContentLoaded", function() {
|
||||
newTab.browser.messageManager.removeMessageListener("DOMContentLoaded", arguments.callee, true);
|
||||
newTab.browser.messageManager.sendAsyncMessage("Feedback:InitPage", { referrer: currentURL, device: Feedback._device, manufacturer: Feedback._manufacturer });
|
||||
});
|
||||
},
|
||||
|
||||
openReadme: function() {
|
||||
let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);
|
||||
let url = formatter.formatURLPref("app.releaseNotesURL");
|
||||
BrowserUI.newTab(url, Browser.selectedTab);
|
||||
},
|
||||
|
||||
updateRestart: function updateRestart() {
|
||||
let msg = document.getElementById("feedback-messages");
|
||||
if (msg) {
|
||||
let value = "restart-app";
|
||||
let notification = msg.getNotificationWithValue(value);
|
||||
if (notification) {
|
||||
// Check if the prefs are back to the initial state dismiss the restart
|
||||
// notification because if does not make sense anymore
|
||||
for each (let pref in this._prefs) {
|
||||
let value = Services.prefs.getPrefType(pref.name) == Ci.nsIPrefBranch.PREF_INVALID ? false : Services.prefs.getBoolPref(pref.name);
|
||||
if (value != pref.value)
|
||||
return;
|
||||
}
|
||||
|
||||
notification.close();
|
||||
return;
|
||||
}
|
||||
|
||||
let restartCallback = function(aNotification, aDescription) {
|
||||
// Notify all windows that an application quit has been requested
|
||||
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
|
||||
Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
|
||||
|
||||
// If nothing aborted, quit the app
|
||||
if (cancelQuit.data == false) {
|
||||
let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
|
||||
appStartup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
|
||||
}
|
||||
};
|
||||
|
||||
let strings = Strings.browser;
|
||||
|
||||
let buttons = [ {
|
||||
label: strings.GetStringFromName("notificationRestart.button"),
|
||||
accessKey: "",
|
||||
callback: restartCallback
|
||||
} ];
|
||||
|
||||
let message = strings.GetStringFromName("notificationRestart.normal");
|
||||
msg.appendNotification(message, value, "", msg.PRIORITY_WARNING_LOW, buttons);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("load", Feedback.init, false);
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-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 Feedback.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Mozilla Corporation.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2010
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Mark Finkle <mark.finkle@gmail.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 LGPL or the GPL. 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 ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://feedback/skin/overlay.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % feedbackDTD SYSTEM "chrome://browser/locale/feedback.dtd">
|
||||
%feedbackDTD;
|
||||
]>
|
||||
|
||||
<overlay id="feedback-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript" src="chrome://feedback/content/overlay.js"/>
|
||||
|
||||
<box id="panel-controls">
|
||||
<toolbarbutton id="tool-feedback" class="panel-row-button" autocheck="true" type="radio" group="1" linkedpanel="feedback-container" insertafter="tool-addons"/>
|
||||
</box>
|
||||
|
||||
<deck id="panel-items">
|
||||
<vbox id="feedback-container" flex="1" hidden="true">
|
||||
<notificationbox id="feedback-messages" flex="1">
|
||||
<richlistbox id="feedback-list" flex="1" onselect="this.ensureSelectedElementIsVisible()">
|
||||
<label id="feedback-list-header" class="panel-header" value="&feedbackHeader2.label;"/>
|
||||
<settings id="feedback-communicate" label="&feedback.communicate.title;">
|
||||
<setting title="&feedback.feedback.title;" type="control">
|
||||
<button id="feedback-feedback-happy" oncommand="Feedback.openFeedback('happy');"/>
|
||||
<button id="feedback-feedback-sad" oncommand="Feedback.openFeedback('sad');"/>
|
||||
</setting>
|
||||
</settings>
|
||||
<settings id="feedback-information" label="&feedback.information.title;">
|
||||
<setting id="feedback-about" title="&feedback.about.title;" type="control">
|
||||
<button id="feedback-about-button" label="&feedback.about.button;" oncommand="Feedback.openReadme();"/>
|
||||
</setting>
|
||||
</settings>
|
||||
<settings id="feedback-tools" label="&feedback.tools.title;">
|
||||
<setting pref="extensions.checkCompatibility.4.0b" title="&feedback.forceCompat.title;" type="bool" inverted="true" oninputchanged="Feedback.updateRestart();"/>
|
||||
<setting pref="devtools.errorconsole.enabled" title="&feedback.errorConsole.title;" type="bool"/>
|
||||
</settings>
|
||||
</richlistbox>
|
||||
</notificationbox>
|
||||
</vbox>
|
||||
</deck>
|
||||
</overlay>
|
|
@ -0,0 +1,2 @@
|
|||
pref("extensions.feedback.url.happy", "http://input.mozilla.com/happy");
|
||||
pref("extensions.feedback.url.sad", "http://input.mozilla.com/sad");
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>feedback@mobile.mozilla.org</em:id>
|
||||
<em:version>1.0.1</em:version>
|
||||
<em:type>2</em:type>
|
||||
|
||||
<!-- Target Application this extension can install into,
|
||||
with minimum and maximum supported versions. -->
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{a23983c0-fd0e-11dc-95ff-0800200c9a66}</em:id>
|
||||
<em:minVersion>2.0b1pre</em:minVersion>
|
||||
<em:maxVersion>4.*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Feedback</em:name>
|
||||
<em:description>Help make Firefox better by giving feedback.</em:description>
|
||||
<em:creator>Mozilla Corporation</em:creator>
|
||||
<em:iconURL>chrome://feedback/skin/dino-32.png</em:iconURL>
|
||||
</Description>
|
||||
</RDF>
|
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/beta-hdpi.png
Normal file
После Ширина: | Высота: | Размер: 2.6 KiB |
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/dino-32.png
Normal file
После Ширина: | Высота: | Размер: 1.5 KiB |
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/happy-32.png
Normal file
После Ширина: | Высота: | Размер: 2.4 KiB |
|
@ -0,0 +1,11 @@
|
|||
#tool-feedback {
|
||||
list-style-image: url("chrome://feedback/skin/beta-hdpi.png");
|
||||
}
|
||||
|
||||
#feedback-feedback-happy {
|
||||
list-style-image: url("chrome://feedback/skin/happy-32.png");
|
||||
}
|
||||
|
||||
#feedback-feedback-sad {
|
||||
list-style-image: url("chrome://feedback/skin/sad-32.png");
|
||||
}
|
Двоичные данные
mobile/app/profile/extensions/feedback@mobile.mozilla.org/skin/sad-32.png
Normal file
После Ширина: | Высота: | Размер: 2.3 KiB |
После Ширина: | Высота: | Размер: 79 KiB |
|
@ -0,0 +1,49 @@
|
|||
# ***** 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 Mozilla Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Justin Dolske <dolske@mozilla.com> (original author)
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = \
|
||||
content \
|
||||
locales \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,3 @@
|
|||
mobile/app/android/drawable/alertaddons.png
|
||||
mobile/app/android/drawable/alertdownloads.png
|
||||
mobile/branding/nightly/content/splash.png
|
|
@ -0,0 +1,2 @@
|
|||
MOZ_APP_DISPLAYNAME=Fennec
|
||||
MOZ_UPDATER=1
|
|
@ -0,0 +1,25 @@
|
|||
# Branding Makefile
|
||||
# - jars chrome artwork
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LINUX_BRANDING_FILES = \
|
||||
fennec_26x26.png \
|
||||
fennec_40x40.png \
|
||||
fennec_48x48.png \
|
||||
fennec_72x72.png \
|
||||
fennec_scalable.png \
|
||||
fennec_maemo_icon26.txt \
|
||||
$(NULL)
|
||||
|
||||
export::
|
||||
$(NSINSTALL) -D $(DIST)/branding
|
||||
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
|
||||
$(NSINSTALL) -D $(DIST)/install
|
После Ширина: | Высота: | Размер: 16 KiB |
После Ширина: | Высота: | Размер: 1.7 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 2.9 KiB |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 7.1 KiB |
|
@ -0,0 +1,74 @@
|
|||
iVBORw0KGgoAAAANSUh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y2npXw7HyDKmqa31vbNBPlddOon/Gh
|
||||
sq4JmXgAvXu38WD2B8Jho1bTuvK+X17WGzrN5RIwW0o2UsD+gGldkRPY370Z
|
||||
NmcVgW2hSl2FsupJ8B47wO+tmzwTrqp6pMJDGDq6GwmqtCW0l2CjRqvxUAds
|
||||
v1wcl01Ao9W4yfprJz7TlrBdTkeWUePXwj5bHC7KTDkezAw8J01NYDw45DGY
|
||||
DF1k/Qhd81Jr7qZNC3tl6PlSvO4mUMtphkaH+tUXn1inbnn+cZWNdDLRP9C7
|
||||
s/1L//8Bqswshy9iKZTVBkOJhYqZ7PGf3NnaMPPGri89gSIJz8hg/3pWxBLx
|
||||
GHZt27q2fvaSMK62cffd391Cc80X+h+aa//ovkbgGoFrBK4R+DzjPwIMAJH8
|
||||
nEzLJzdlAAAAAElFTkSuQmCC
|
||||
|
После Ширина: | Высота: | Размер: 5.8 KiB |
|
@ -0,0 +1,7 @@
|
|||
chrome.jar:
|
||||
% content branding %content/branding/
|
||||
content/branding/about.png (about.png)
|
||||
content/branding/logoWordmark.png (logoWordmark.png)
|
||||
content/branding/logo.png (logo.png)
|
||||
content/branding/favicon32.png (favicon32.png)
|
||||
content/branding/spark.png (spark.png)
|
После Ширина: | Высота: | Размер: 19 KiB |
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 19 KiB |
|
@ -0,0 +1,47 @@
|
|||
# ***** 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 Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Benjamin Smedberg <benjamin@smedbergs.us>
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = mobile/branding/nightly/locales
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DEFINES += -DAB_CD=$(AB_CD)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY brandShortName "Fennec">
|
||||
<!ENTITY brandFullName "Mozilla Fennec">
|
||||
<!ENTITY vendorShortName "Mozilla">
|
||||
<!ENTITY logoTrademark "">
|
|
@ -0,0 +1,2 @@
|
|||
brandShortName=Fennec
|
||||
brandFullName=Mozilla Fennec
|
|
@ -0,0 +1,7 @@
|
|||
#filter substitution
|
||||
|
||||
@AB_CD@.jar:
|
||||
% locale branding @AB_CD@ %locale/branding/
|
||||
# Nightly branding only exists in en-US
|
||||
locale/branding/brand.dtd (en-US/brand.dtd)
|
||||
* locale/branding/brand.properties (en-US/brand.properties)
|
|
@ -0,0 +1,49 @@
|
|||
# ***** 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 Mozilla Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Justin Dolske <dolske@mozilla.com> (original author)
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = \
|
||||
content \
|
||||
locales \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,3 @@
|
|||
mobile/app/android/drawable/alertaddons.png
|
||||
mobile/app/android/drawable/alertdownloads.png
|
||||
mobile/branding/official/content/splash.png
|
|
@ -0,0 +1,3 @@
|
|||
MOZ_APP_DISPLAYNAME=Firefox
|
||||
ANDROID_PACKAGE_NAME=org.mozilla.firefox
|
||||
MOZ_UPDATER=
|
|
@ -0,0 +1,25 @@
|
|||
# Branding Makefile
|
||||
# - jars chrome artwork
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LINUX_BRANDING_FILES = \
|
||||
fennec_26x26.png \
|
||||
fennec_40x40.png \
|
||||
fennec_48x48.png \
|
||||
fennec_72x72.png \
|
||||
fennec_scalable.png \
|
||||
fennec_maemo_icon26.txt \
|
||||
$(NULL)
|
||||
|
||||
export::
|
||||
$(NSINSTALL) -D $(DIST)/branding
|
||||
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
|
||||
$(NSINSTALL) -D $(DIST)/install
|
После Ширина: | Высота: | Размер: 25 KiB |
После Ширина: | Высота: | Размер: 2.6 KiB |
После Ширина: | Высота: | Размер: 1.9 KiB |
После Ширина: | Высота: | Размер: 4.3 KiB |
После Ширина: | Высота: | Размер: 5.5 KiB |
После Ширина: | Высота: | Размер: 11 KiB |
|
@ -0,0 +1,126 @@
|
|||
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
|
||||
d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFZtJREFUeNqsWguQXXV5/533
|
||||
uY/du7vZ9ya72WSTmARCXjQkhJcpoqAgjlUELFO1IqU6reMwY7Ut0oL1hUo7
|
||||
UhVfzGhlZCo+oWq0CaBEQ4Ih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7Gj7D9
|
||||
COXFq6OJhhG1xnLwFRsw/wLEbtTCvBEiIu3UYdG2vHrxW7uMNcsLRl7sazxh
|
||||
BAtSi0O5ZZDvEPhFm0hDUguFiCKWBEZOg5E35LsFR7yCHPcqj++rHnjkYPjU
|
||||
mId9DcUnGzKL9B1J9GqL+FwjRCTyjWh0NIwRn1uIoL2bm/RVb+q1L1jXafbU
|
||||
/SRhtfk9OSWTo/I606dYj+I5qHWSQIHFSTlMaiOVuHhg0p/87bh38mA5PEqO
|
||||
OtJQdqaR7+JYbuR9dN7/NfAKDJhPJ/0cQwrzBjTqRPyHjpZ+U+nvV9F3op5U
|
||||
ObHpS/LGglVNWpfvBOrjU8GhEwnGlPQ9h0iHSkPBakOKjTwvnqN4+Idfc79y
|
||||
A36/uI1GamUbymcbYp1zXm0YPi9oKOSdI/Ovz6qNozDM/0Me//8w4Pcjozai
|
||||
M2+Y3pBzDZjfzseNz+E5Ep0jr/rnfwQYAPIpIT+p2s+HAAAAAElFTkSuQmCC
|
||||
|
После Ширина: | Высота: | Размер: 9.2 KiB |
|
@ -0,0 +1,7 @@
|
|||
chrome.jar:
|
||||
% content branding %content/branding/
|
||||
content/branding/about.png (about.png)
|
||||
content/branding/logoWordmark.png (logoWordmark.png)
|
||||
content/branding/logo.png (logo.png)
|
||||
content/branding/favicon32.png (favicon32.png)
|
||||
content/branding/spark.png (spark.png)
|
После Ширина: | Высота: | Размер: 19 KiB |
После Ширина: | Высота: | Размер: 14 KiB |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 19 KiB |
|
@ -0,0 +1,47 @@
|
|||
# ***** 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 Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Benjamin Smedberg <benjamin@smedbergs.us>
|
||||
# Portions created by the Initial Developer are Copyright (C) 2004
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# 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 *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = mobile/branding/official/locales
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DEFINES += -DAB_CD=$(AB_CD)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,4 @@
|
|||
<!ENTITY brandShortName "Firefox">
|
||||
<!ENTITY brandFullName "Mozilla Firefox">
|
||||
<!ENTITY vendorShortName "Mozilla">
|
||||
<!ENTITY logoTrademark "Firefox and the Firefox logos are trademarks of the Mozilla Foundation.">
|
|
@ -0,0 +1,2 @@
|
|||
brandShortName=Firefox
|
||||
brandFullName=Mozilla Firefox
|
|
@ -0,0 +1,7 @@
|
|||
#filter substitution
|
||||
|
||||
@AB_CD@.jar:
|
||||
% locale branding @AB_CD@ %locale/branding/
|
||||
# Branding only exists in en-US
|
||||
locale/branding/brand.dtd (en-US/brand.dtd)
|
||||
* locale/branding/brand.properties (en-US/brand.properties)
|
|
@ -0,0 +1,90 @@
|
|||
# ***** 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.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.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 LIBXUL_SDK
|
||||
# Needed for building our components as part of libxul
|
||||
APP_LIBXUL_DIRS += mobile/components/build
|
||||
|
||||
include $(topsrcdir)/toolkit/toolkit-tiers.mk
|
||||
else
|
||||
ifdef ENABLE_TESTS
|
||||
tier_testharness_dirs += \
|
||||
testing/mochitest \
|
||||
$(NULL)
|
||||
endif
|
||||
endif
|
||||
|
||||
TIERS += app
|
||||
|
||||
ifdef MOZ_EXTENSIONS
|
||||
tier_app_dirs += extensions
|
||||
endif
|
||||
|
||||
ifdef MOZ_SERVICES_SYNC
|
||||
tier_app_dirs += services
|
||||
endif
|
||||
|
||||
tier_app_dirs += \
|
||||
$(MOZ_BRANDING_DIRECTORY) \
|
||||
mobile \
|
||||
$(NULL)
|
||||
|
||||
|
||||
installer:
|
||||
@$(MAKE) -C mobile/installer installer
|
||||
|
||||
package:
|
||||
rm -rf dist/fennec*
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
@$(MAKE) -C mobile/installer installer
|
||||
else
|
||||
@$(MAKE) -C mobile/installer
|
||||
endif
|
||||
|
||||
install::
|
||||
@echo "Mobile can't be installed directly."
|
||||
@exit 1
|
||||
|
||||
deb: package
|
||||
@$(MAKE) -C mobile/installer deb
|
||||
|
||||
upload::
|
||||
@$(MAKE) -C mobile/installer upload
|
||||
|
||||
ifeq ($(OS_TARGET),Linux)
|
||||
deb: installer
|
||||
endif
|
|
@ -0,0 +1,55 @@
|
|||
# ***** 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.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# the Mozilla Foundation <http://www.mozilla.org/>.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2007
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Mark Finkle <mfinkle@mozilla.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 *****
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DEFINES += -DAB_CD=$(MOZ_UI_LOCALE) \
|
||||
-DPACKAGE=browser \
|
||||
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,95 @@
|
|||
var AlertsHelper = {
|
||||
_timeoutID: -1,
|
||||
_listener: null,
|
||||
_cookie: "",
|
||||
_clickable: false,
|
||||
get container() {
|
||||
delete this.container;
|
||||
let container = document.getElementById("alerts-container");
|
||||
|
||||
// Move the popup on the other side if we are in RTL
|
||||
let [leftSidebar, rightSidebar] = [Elements.tabs.getBoundingClientRect(), Elements.controls.getBoundingClientRect()];
|
||||
if (leftSidebar.left > rightSidebar.left)
|
||||
container.setAttribute("left", "0");
|
||||
else
|
||||
container.setAttribute("right", "0");
|
||||
|
||||
let self = this;
|
||||
container.addEventListener("transitionend", function() {
|
||||
self.alertTransitionOver();
|
||||
}, true);
|
||||
|
||||
return this.container = container;
|
||||
},
|
||||
|
||||
showAlertNotification: function ah_show(aImageURL, aTitle, aText, aTextClickable, aCookie, aListener) {
|
||||
this._clickable = aTextClickable || false;
|
||||
this._listener = aListener || null;
|
||||
this._cookie = aCookie || "";
|
||||
|
||||
// Reset the container settings from the last time so layout can happen naturally
|
||||
let container = this.container;
|
||||
container.removeAttribute("width");
|
||||
let alertText = document.getElementById("alerts-text");
|
||||
alertText.style.whiteSpace = "";
|
||||
|
||||
document.getElementById("alerts-image").setAttribute("src", aImageURL);
|
||||
document.getElementById("alerts-title").value = aTitle;
|
||||
alertText.textContent = aText;
|
||||
|
||||
container.hidden = false;
|
||||
let bcr = container.getBoundingClientRect();
|
||||
if (bcr.width > window.innerWidth - 50) {
|
||||
// If the window isn't wide enough, we need to re-layout
|
||||
container.setAttribute("width", window.innerWidth - 50); // force a max width
|
||||
alertText.style.whiteSpace = "pre-wrap"; // wrap text as needed
|
||||
bcr = container.getBoundingClientRect(); // recalculate the bcr
|
||||
}
|
||||
container.setAttribute("width", bcr.width); // redundant but cheap
|
||||
container.setAttribute("height", bcr.height);
|
||||
|
||||
#ifdef ANDROID
|
||||
let offset = (window.innerWidth - container.width) / 2;
|
||||
if (offset < 0)
|
||||
Cu.reportError("showAlertNotification called before the window is ready");
|
||||
else if (container.hasAttribute("left"))
|
||||
container.setAttribute("left", offset);
|
||||
else
|
||||
container.setAttribute("right", offset);
|
||||
#endif
|
||||
|
||||
container.classList.add("showing");
|
||||
|
||||
let timeout = Services.prefs.getIntPref("alerts.totalOpenTime");
|
||||
let self = this;
|
||||
if (this._timeoutID)
|
||||
clearTimeout(this._timeoutID);
|
||||
this._timeoutID = setTimeout(function() { self._timeoutAlert(); }, timeout);
|
||||
},
|
||||
|
||||
_timeoutAlert: function ah__timeoutAlert() {
|
||||
this._timeoutID = -1;
|
||||
|
||||
this.container.classList.remove("showing");
|
||||
if (this._listener)
|
||||
this._listener.observe(null, "alertfinished", this._cookie);
|
||||
},
|
||||
|
||||
alertTransitionOver: function ah_alertTransitionOver() {
|
||||
let container = this.container;
|
||||
if (!container.classList.contains("showing")) {
|
||||
container.height = 0;
|
||||
container.hidden = true;
|
||||
}
|
||||
},
|
||||
|
||||
click: function ah_click(aEvent) {
|
||||
if (this._clickable && this._listener)
|
||||
this._listener.observe(null, "alertclickcallback", this._cookie);
|
||||
|
||||
if (this._timeoutID != -1) {
|
||||
clearTimeout(this._timeoutID);
|
||||
this._timeoutAlert();
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,152 @@
|
|||
// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
|
||||
/*
|
||||
* ***** 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 Mobile Browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Benjamin Stover <bstover@mozilla.com>
|
||||
* Matt Brubeck <mbrubeck@mozilla.com>
|
||||
* Jaakko Kiviluoto <jaakko.kiviluoto@digia.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 ***** */
|
||||
|
||||
/**
|
||||
* Responsible for zooming in to a given view rectangle
|
||||
*/
|
||||
const AnimatedZoom = {
|
||||
startScale: null,
|
||||
|
||||
/** Starts an animated zoom to zoomRect. */
|
||||
animateTo: function(aZoomRect) {
|
||||
if (!aZoomRect)
|
||||
return;
|
||||
|
||||
this.zoomTo = aZoomRect.clone();
|
||||
|
||||
if (this.animationDuration === undefined)
|
||||
this.animationDuration = Services.prefs.getIntPref("browser.ui.zoom.animationDuration");
|
||||
|
||||
Browser.hideSidebars();
|
||||
Browser.hideTitlebar();
|
||||
Browser.forceChromeReflow();
|
||||
|
||||
this.start();
|
||||
|
||||
// Check if zooming animations were occuring before.
|
||||
if (!this.zoomRect) {
|
||||
this.updateTo(this.zoomFrom);
|
||||
|
||||
mozRequestAnimationFrame(this);
|
||||
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("AnimatedZoomBegin", true, true);
|
||||
window.dispatchEvent(event);
|
||||
}
|
||||
},
|
||||
|
||||
start: function start() {
|
||||
this.tab = Browser.selectedTab;
|
||||
this.browser = this.tab.browser;
|
||||
this.zoomFrom = this.zoomRect || this.getStartRect();
|
||||
this.startScale = this.browser.scale;
|
||||
this.beginTime = mozAnimationStartTime;
|
||||
},
|
||||
|
||||
/** Get the visible rect, in device pixels relative to the content origin. */
|
||||
getStartRect: function getStartRect() {
|
||||
let browser = this.browser;
|
||||
let bcr = browser.getBoundingClientRect();
|
||||
let scroll = browser.getRootView().getPosition();
|
||||
return new Rect(scroll.x, scroll.y, bcr.width, bcr.height);
|
||||
},
|
||||
|
||||
/** Update the visible rect, in device pixels relative to the content origin. */
|
||||
updateTo: function(nextRect) {
|
||||
let zoomRatio = window.innerWidth / nextRect.width;
|
||||
let scale = this.startScale * zoomRatio;
|
||||
let scrollX = nextRect.left * zoomRatio;
|
||||
let scrollY = nextRect.top * zoomRatio;
|
||||
|
||||
this.browser.fuzzyZoom(scale, scrollX, scrollY);
|
||||
|
||||
this.zoomRect = nextRect;
|
||||
},
|
||||
|
||||
/** Stop animation, zoom to point, and clean up. */
|
||||
finish: function() {
|
||||
this.updateTo(this.zoomTo || this.zoomRect);
|
||||
|
||||
// Check whether the zoom limits have changed since the animation started.
|
||||
let browser = this.browser;
|
||||
let finalScale = this.tab.clampZoomLevel(browser.scale);
|
||||
if (browser.scale != finalScale)
|
||||
browser.scale = finalScale; // scale= calls finishFuzzyZoom.
|
||||
else
|
||||
browser.finishFuzzyZoom();
|
||||
|
||||
Browser.hideSidebars();
|
||||
Browser.hideTitlebar();
|
||||
|
||||
this.beginTime = null;
|
||||
this.zoomTo = null;
|
||||
this.zoomFrom = null;
|
||||
this.zoomRect = null;
|
||||
this.startScale = null;
|
||||
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("AnimatedZoomEnd", true, true);
|
||||
window.dispatchEvent(event);
|
||||
},
|
||||
|
||||
isZooming: function isZooming() {
|
||||
return this.beginTime != null;
|
||||
},
|
||||
|
||||
onBeforePaint: function(aTimeStamp) {
|
||||
try {
|
||||
let tdiff = aTimeStamp - this.beginTime;
|
||||
let counter = tdiff / this.animationDuration;
|
||||
if (counter < 1) {
|
||||
// update browser to interpolated rectangle
|
||||
let rect = this.zoomFrom.blend(this.zoomTo, counter);
|
||||
this.updateTo(rect);
|
||||
mozRequestAnimationFrame(this);
|
||||
} else {
|
||||
// last cycle already rendered final scaled image, now clean up
|
||||
this.finish();
|
||||
}
|
||||
} catch(e) {
|
||||
this.finish();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,35 @@
|
|||
var AppMenu = {
|
||||
get panel() {
|
||||
delete this.panel;
|
||||
return this.panel = document.getElementById("appmenu");
|
||||
},
|
||||
|
||||
show: function show() {
|
||||
if (BrowserUI.activePanel || BrowserUI.isPanelVisible())
|
||||
return;
|
||||
this.panel.setAttribute("count", this.panel.childNodes.length);
|
||||
this.panel.hidden = false;
|
||||
|
||||
addEventListener("keypress", this, true);
|
||||
|
||||
BrowserUI.lockToolbar();
|
||||
BrowserUI.pushPopup(this, [this.panel, Elements.toolbarContainer]);
|
||||
},
|
||||
|
||||
hide: function hide() {
|
||||
this.panel.hidden = true;
|
||||
|
||||
removeEventListener("keypress", this, true);
|
||||
|
||||
BrowserUI.unlockToolbar();
|
||||
BrowserUI.popPopup(this);
|
||||
},
|
||||
|
||||
toggle: function toggle() {
|
||||
this.panel.hidden ? this.show() : this.hide();
|
||||
},
|
||||
|
||||
handleEvent: function handleEvent(aEvent) {
|
||||
this.hide();
|
||||
}
|
||||
};
|
|
@ -0,0 +1,44 @@
|
|||
var AwesomePanel = function(aElementId, aCommandId) {
|
||||
let command = document.getElementById(aCommandId);
|
||||
|
||||
this.panel = document.getElementById(aElementId),
|
||||
|
||||
this.open = function aw_open() {
|
||||
command.setAttribute("checked", "true");
|
||||
this.panel.hidden = false;
|
||||
|
||||
if (this.panel.hasAttribute("onshow")) {
|
||||
let func = new Function("panel", this.panel.getAttribute("onshow"));
|
||||
func.call(this.panel);
|
||||
}
|
||||
|
||||
if (this.panel.open)
|
||||
this.panel.open();
|
||||
},
|
||||
|
||||
this.close = function aw_close() {
|
||||
if (this.panel.hasAttribute("onhide")) {
|
||||
let func = new Function("panel", this.panel.getAttribute("onhide"));
|
||||
func.call(this.panel);
|
||||
}
|
||||
|
||||
if (this.panel.close)
|
||||
this.panel.close();
|
||||
|
||||
this.panel.hidden = true;
|
||||
command.removeAttribute("checked");
|
||||
},
|
||||
|
||||
this.doCommand = function aw_doCommand() {
|
||||
BrowserUI.doCommand(aCommandId);
|
||||
},
|
||||
|
||||
this.openLink = function aw_openLink(aEvent) {
|
||||
let item = aEvent.originalTarget;
|
||||
let uri = item.getAttribute("url") || item.getAttribute("uri");
|
||||
if (uri != "") {
|
||||
Browser.selectedBrowser.userTypedValue = uri;
|
||||
BrowserUI.goToURI(uri);
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,76 @@
|
|||
var BookmarkHelper = {
|
||||
_editor: null,
|
||||
|
||||
get box() {
|
||||
delete this.box;
|
||||
this.box = document.getElementById("bookmark-container");
|
||||
return this.box;
|
||||
},
|
||||
|
||||
edit: function BH_edit(aURI) {
|
||||
if (!aURI)
|
||||
aURI = getBrowser().currentURI;
|
||||
|
||||
let itemId = PlacesUtils.getMostRecentBookmarkForURI(aURI);
|
||||
if (itemId == -1)
|
||||
return;
|
||||
|
||||
// When opening the bookmark helper dialog be sure there is not others
|
||||
// popup opened like the bookmakr popup
|
||||
BookmarkPopup.hide();
|
||||
|
||||
let title = PlacesUtils.bookmarks.getItemTitle(itemId);
|
||||
let tags = PlacesUtils.tagging.getTagsForURI(aURI, {});
|
||||
|
||||
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
this._editor = document.createElementNS(XULNS, "placeitem");
|
||||
this._editor.setAttribute("id", "bookmark-item");
|
||||
this._editor.setAttribute("flex", "1");
|
||||
this._editor.setAttribute("type", "bookmark");
|
||||
this._editor.setAttribute("ui", "manage");
|
||||
this._editor.setAttribute("title", title);
|
||||
this._editor.setAttribute("uri", aURI.spec);
|
||||
this._editor.setAttribute("itemid", itemId);
|
||||
this._editor.setAttribute("tags", tags.join(", "));
|
||||
this._editor.setAttribute("onclose", "BookmarkHelper.close()");
|
||||
document.getElementById("bookmark-form").appendChild(this._editor);
|
||||
|
||||
this.box.hidden = false;
|
||||
BrowserUI.pushDialog(this);
|
||||
|
||||
function waitForWidget(self) {
|
||||
try {
|
||||
self._editor.startEditing();
|
||||
} catch(e) {
|
||||
setTimeout(waitForWidget, 0, self);
|
||||
}
|
||||
}
|
||||
setTimeout(waitForWidget, 0, this);
|
||||
},
|
||||
|
||||
save: function BH_save() {
|
||||
this._editor.stopEditing(true);
|
||||
},
|
||||
|
||||
close: function BH_close() {
|
||||
BrowserUI.updateStar();
|
||||
|
||||
// Note: the _editor will have already saved the data, if needed, by the time
|
||||
// this method is called, since this method is called via the "close" event.
|
||||
this._editor.parentNode.removeChild(this._editor);
|
||||
this._editor = null;
|
||||
|
||||
BrowserUI.popDialog();
|
||||
this.box.hidden = true;
|
||||
},
|
||||
|
||||
removeBookmarksForURI: function BH_removeBookmarksForURI(aURI) {
|
||||
//XXX blargle xpconnect! might not matter, but a method on
|
||||
// nsINavBookmarksService that takes an array of items to
|
||||
// delete would be faster. better yet, a method that takes a URI!
|
||||
let itemIds = PlacesUtils.getBookmarksForURI(aURI);
|
||||
itemIds.forEach(PlacesUtils.bookmarks.removeItem);
|
||||
|
||||
BrowserUI.updateStar();
|
||||
}
|
||||
};
|
|
@ -0,0 +1,38 @@
|
|||
var BookmarkPopup = {
|
||||
get box() {
|
||||
delete this.box;
|
||||
this.box = document.getElementById("bookmark-popup");
|
||||
|
||||
let [tabsSidebar, controlsSidebar] = [Elements.tabs.getBoundingClientRect(), Elements.controls.getBoundingClientRect()];
|
||||
this.box.setAttribute(tabsSidebar.left < controlsSidebar.left ? "right" : "left", controlsSidebar.width - this.box.offset);
|
||||
this.box.top = BrowserUI.starButton.getBoundingClientRect().top - this.box.offset;
|
||||
|
||||
// Hide the popup if there is any new page loading
|
||||
let self = this;
|
||||
messageManager.addMessageListener("pagehide", function(aMessage) {
|
||||
self.hide();
|
||||
});
|
||||
|
||||
return this.box;
|
||||
},
|
||||
|
||||
hide : function hide() {
|
||||
this.box.hidden = true;
|
||||
BrowserUI.popPopup(this);
|
||||
},
|
||||
|
||||
show : function show() {
|
||||
this.box.hidden = false;
|
||||
this.box.anchorTo(BrowserUI.starButton);
|
||||
|
||||
// include starButton here, so that click-to-dismiss works as expected
|
||||
BrowserUI.pushPopup(this, [this.box, BrowserUI.starButton]);
|
||||
},
|
||||
|
||||
toggle : function toggle() {
|
||||
if (this.box.hidden)
|
||||
this.show();
|
||||
else
|
||||
this.hide();
|
||||
}
|
||||
};
|
|
@ -0,0 +1,107 @@
|
|||
// -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
|
||||
var ContextCommands = {
|
||||
copy: function cc_copy() {
|
||||
let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
|
||||
clipboard.copyString(ContextHelper.popupState.string);
|
||||
|
||||
let target = ContextHelper.popupState.target;
|
||||
if (target)
|
||||
target.focus();
|
||||
},
|
||||
|
||||
#ifdef ANDROID
|
||||
selectInput: function cc_selectInput() {
|
||||
let imePicker = Cc["@mozilla.org/imepicker;1"].getService(Ci.nsIIMEPicker);
|
||||
imePicker.show();
|
||||
},
|
||||
#endif
|
||||
|
||||
paste: function cc_paste() {
|
||||
let target = ContextHelper.popupState.target;
|
||||
if (target.localName == "browser") {
|
||||
let x = ContextHelper.popupState.x;
|
||||
let y = ContextHelper.popupState.y;
|
||||
let json = {x: x, y: y, command: "paste" };
|
||||
messageManager.sendAsyncMessage("Browser:ContextCommand", json);
|
||||
} else {
|
||||
target.editor.paste(Ci.nsIClipboard.kGlobalClipboard);
|
||||
target.focus();
|
||||
}
|
||||
},
|
||||
|
||||
selectAll: function cc_selectAll() {
|
||||
let target = ContextHelper.popupState.target;
|
||||
if (target.localName == "browser") {
|
||||
let x = ContextHelper.popupState.x;
|
||||
let y = ContextHelper.popupState.y;
|
||||
let json = {x: x, y: y, command: "select-all" };
|
||||
messageManager.sendAsyncMessage("Browser:ContextCommand", json);
|
||||
} else {
|
||||
target.editor.selectAll();
|
||||
target.focus();
|
||||
}
|
||||
},
|
||||
|
||||
openInNewTab: function cc_openInNewTab() {
|
||||
Browser.addTab(ContextHelper.popupState.linkURL, false, Browser.selectedTab);
|
||||
},
|
||||
|
||||
saveLink: function cc_saveLink() {
|
||||
let browser = ContextHelper.popupState.target;
|
||||
ContentAreaUtils.saveURL(ContextHelper.popupState.linkURL, null, "SaveLinkTitle", false, true, browser.documentURI);
|
||||
},
|
||||
|
||||
saveImage: function cc_saveImage() {
|
||||
let popupState = ContextHelper.popupState;
|
||||
let browser = popupState.target;
|
||||
|
||||
// Bug 638523
|
||||
// Using directly SaveImageURL fails here since checking the cache for a
|
||||
// remote page seems to not work (could it be nsICacheSession prohibition)?
|
||||
ContentAreaUtils.internalSave(popupState.mediaURL, null, null,
|
||||
popupState.contentDisposition,
|
||||
popupState.contentType, false, "SaveImageTitle",
|
||||
null, browser.documentURI, true, null);
|
||||
},
|
||||
|
||||
shareLink: function cc_shareLink() {
|
||||
let state = ContextHelper.popupState;
|
||||
SharingUI.show(state.linkURL, state.linkTitle);
|
||||
},
|
||||
|
||||
shareMedia: function cc_shareMedia() {
|
||||
SharingUI.show(ContextHelper.popupState.mediaURL, null);
|
||||
},
|
||||
|
||||
bookmarkLink: function cc_bookmarkLink() {
|
||||
let state = ContextHelper.popupState;
|
||||
let bookmarks = PlacesUtils.bookmarks;
|
||||
try {
|
||||
bookmarks.insertBookmark(BookmarkList.panel.mobileRoot,
|
||||
Util.makeURI(state.linkURL),
|
||||
bookmarks.DEFAULT_INDEX,
|
||||
state.linkTitle || state.linkURL);
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
|
||||
let message = Strings.browser.GetStringFromName("alertLinkBookmarked");
|
||||
let toaster = Cc["@mozilla.org/toaster-alerts-service;1"].getService(Ci.nsIAlertsService);
|
||||
toaster.showAlertNotification(null, message, "", false, "", null);
|
||||
},
|
||||
|
||||
sendCommand: function cc_playVideo(aCommand) {
|
||||
let browser = ContextHelper.popupState.target;
|
||||
browser.messageManager.sendAsyncMessage("Browser:ContextCommand", { command: aCommand });
|
||||
},
|
||||
|
||||
editBookmark: function cc_editBookmark() {
|
||||
let target = ContextHelper.popupState.target;
|
||||
target.startEditing();
|
||||
},
|
||||
|
||||
removeBookmark: function cc_removeBookmark() {
|
||||
let target = ContextHelper.popupState.target;
|
||||
target.remove();
|
||||
}
|
||||
};
|
|
@ -0,0 +1,802 @@
|
|||
/* ***** 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 Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Justin Dolske <dolske@mozilla.com> (original author)
|
||||
* Ehsan Akhgari <ehsan.akhgari@gmail.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 ***** */
|
||||
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var loginManager = {
|
||||
|
||||
/* ---------- private members ---------- */
|
||||
|
||||
|
||||
get _formFillService() {
|
||||
return this._formFillService =
|
||||
Cc["@mozilla.org/satchel/form-fill-controller;1"].
|
||||
getService(Ci.nsIFormFillController);
|
||||
},
|
||||
|
||||
// Private Browsing Service
|
||||
// If the service is not available, null will be returned.
|
||||
__privateBrowsingService : undefined,
|
||||
get _privateBrowsingService() {
|
||||
if (this.__privateBrowsingService == undefined) {
|
||||
if ("@mozilla.org/privatebrowsing;1" in Cc)
|
||||
this.__privateBrowsingService = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
else
|
||||
this.__privateBrowsingService = null;
|
||||
}
|
||||
return this.__privateBrowsingService;
|
||||
},
|
||||
|
||||
|
||||
// Whether we are in private browsing mode
|
||||
get _inPrivateBrowsing() {
|
||||
var pbSvc = this._privateBrowsingService;
|
||||
if (pbSvc)
|
||||
return pbSvc.privateBrowsingEnabled;
|
||||
else
|
||||
return false;
|
||||
},
|
||||
|
||||
_nsLoginInfo : null, // Constructor for nsILoginInfo implementation
|
||||
_debug : false, // mirrors signon.debug
|
||||
_remember : true, // mirrors signon.rememberSignons preference
|
||||
|
||||
init : function () {
|
||||
// Cache references to current |this| in utility objects
|
||||
this._domEventListener._pwmgr = this;
|
||||
this._observer._pwmgr = this;
|
||||
|
||||
// Form submit observer checks forms for new logins and pw changes.
|
||||
Services.obs.addObserver(this._observer, "earlyformsubmit", false);
|
||||
|
||||
// Add event listener to process page when DOM is complete.
|
||||
addEventListener("pageshow", this._domEventListener, false);
|
||||
addEventListener("unload", this._domEventListener, false);
|
||||
|
||||
// Get constructor for nsILoginInfo
|
||||
this._nsLoginInfo = new Components.Constructor(
|
||||
"@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo);
|
||||
|
||||
// Preferences. Add observer so we get notified of changes.
|
||||
Services.prefs.addObserver("signon.", this._observer, false);
|
||||
|
||||
// Get current preference values.
|
||||
this._debug = Services.prefs.getBoolPref("signon.debug");
|
||||
this._remember = Services.prefs.getBoolPref("signon.rememberSignons");
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* log
|
||||
*
|
||||
* Internal function for logging debug messages to the Error Console window
|
||||
*/
|
||||
log : function (message) {
|
||||
if (!this._debug)
|
||||
return;
|
||||
dump("PasswordUtils: " + message + "\n");
|
||||
Services.console.logStringMessage("PasswordUtils: " + message);
|
||||
},
|
||||
|
||||
|
||||
/* fillForm
|
||||
*
|
||||
* Fill the form with login information if we can find it.
|
||||
*/
|
||||
fillForm: function (form) {
|
||||
this._fillForm(form, true, true, false, null);
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* _fillform
|
||||
*
|
||||
* Fill the form with login information if we can find it.
|
||||
* autofillForm denotes if we should fill the form in automatically
|
||||
* ignoreAutocomplete denotes if we should ignore autocomplete=off attributes
|
||||
* foundLogins is an array of nsILoginInfo
|
||||
*/
|
||||
_fillForm : function (form, autofillForm, ignoreAutocomplete,
|
||||
clobberPassword, foundLogins) {
|
||||
// Heuristically determine what the user/pass fields are
|
||||
// We do this before checking to see if logins are stored,
|
||||
// so that the user isn't prompted for a master password
|
||||
// without need.
|
||||
var [usernameField, passwordField, ignored] =
|
||||
this._getFormFields(form, false);
|
||||
|
||||
// Need a valid password field to do anything.
|
||||
if (passwordField == null)
|
||||
return false;
|
||||
|
||||
// If the fields are disabled or read-only, there's nothing to do.
|
||||
if (passwordField.disabled || passwordField.readOnly ||
|
||||
usernameField && (usernameField.disabled ||
|
||||
usernameField.readOnly)) {
|
||||
this.log("not filling form, login fields disabled");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Discard logins which have username/password values that don't
|
||||
// fit into the fields (as specified by the maxlength attribute).
|
||||
// The user couldn't enter these values anyway, and it helps
|
||||
// with sites that have an extra PIN to be entered (bug 391514)
|
||||
var maxUsernameLen = Number.MAX_VALUE;
|
||||
var maxPasswordLen = Number.MAX_VALUE;
|
||||
|
||||
// If attribute wasn't set, default is -1.
|
||||
if (usernameField && usernameField.maxLength >= 0)
|
||||
maxUsernameLen = usernameField.maxLength;
|
||||
if (passwordField.maxLength >= 0)
|
||||
maxPasswordLen = passwordField.maxLength;
|
||||
|
||||
var logins = foundLogins.filter(function (l) {
|
||||
var fit = (l.username.length <= maxUsernameLen &&
|
||||
l.password.length <= maxPasswordLen);
|
||||
if (!fit)
|
||||
this.log("Ignored " + l.username + " login: won't fit");
|
||||
|
||||
return fit;
|
||||
}, this);
|
||||
|
||||
|
||||
// Nothing to do if we have no matching logins available.
|
||||
if (logins.length == 0)
|
||||
return false;
|
||||
|
||||
|
||||
// The reason we didn't end up filling the form, if any. We include
|
||||
// this in the formInfo object we send with the passwordmgr-found-logins
|
||||
// notification. See the _notifyFoundLogins docs for possible values.
|
||||
var didntFillReason = null;
|
||||
|
||||
// Attach autocomplete stuff to the username field, if we have
|
||||
// one. This is normally used to select from multiple accounts,
|
||||
// but even with one account we should refill if the user edits.
|
||||
if (usernameField)
|
||||
this._attachToInput(usernameField);
|
||||
|
||||
// Don't clobber an existing password.
|
||||
if (passwordField.value && !clobberPassword) {
|
||||
didntFillReason = "existingPassword";
|
||||
this._notifyFoundLogins(didntFillReason, usernameField,
|
||||
passwordField, foundLogins, null);
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the form has an autocomplete=off attribute in play, don't
|
||||
// fill in the login automatically. We check this after attaching
|
||||
// the autocomplete stuff to the username field, so the user can
|
||||
// still manually select a login to be filled in.
|
||||
var isFormDisabled = false;
|
||||
if (!ignoreAutocomplete &&
|
||||
(this._isAutocompleteDisabled(form) ||
|
||||
this._isAutocompleteDisabled(usernameField) ||
|
||||
this._isAutocompleteDisabled(passwordField))) {
|
||||
|
||||
isFormDisabled = true;
|
||||
this.log("form not filled, has autocomplete=off");
|
||||
}
|
||||
|
||||
// Variable such that we reduce code duplication and can be sure we
|
||||
// should be firing notifications if and only if we can fill the form.
|
||||
var selectedLogin = null;
|
||||
|
||||
if (usernameField && usernameField.value) {
|
||||
// If username was specified in the form, only fill in the
|
||||
// password if we find a matching login.
|
||||
var username = usernameField.value.toLowerCase();
|
||||
|
||||
let matchingLogins = logins.filter(function(l)
|
||||
l.username.toLowerCase() == username);
|
||||
if (matchingLogins.length) {
|
||||
selectedLogin = matchingLogins[0];
|
||||
} else {
|
||||
didntFillReason = "existingUsername";
|
||||
this.log("Password not filled. None of the stored " +
|
||||
"logins match the username already present.");
|
||||
}
|
||||
} else if (logins.length == 1) {
|
||||
selectedLogin = logins[0];
|
||||
} else {
|
||||
// We have multiple logins. Handle a special case here, for sites
|
||||
// which have a normal user+pass login *and* a password-only login
|
||||
// (eg, a PIN). Prefer the login that matches the type of the form
|
||||
// (user+pass or pass-only) when there's exactly one that matches.
|
||||
let matchingLogins;
|
||||
if (usernameField)
|
||||
matchingLogins = logins.filter(function(l) l.username);
|
||||
else
|
||||
matchingLogins = logins.filter(function(l) !l.username);
|
||||
if (matchingLogins.length == 1) {
|
||||
selectedLogin = matchingLogins[0];
|
||||
} else {
|
||||
didntFillReason = "multipleLogins";
|
||||
this.log("Multiple logins for form, so not filling any.");
|
||||
}
|
||||
}
|
||||
|
||||
var didFillForm = false;
|
||||
if (selectedLogin && autofillForm && !isFormDisabled) {
|
||||
// Fill the form
|
||||
if (usernameField)
|
||||
usernameField.value = selectedLogin.username;
|
||||
passwordField.value = selectedLogin.password;
|
||||
didFillForm = true;
|
||||
} else if (selectedLogin && !autofillForm) {
|
||||
// For when autofillForm is false, but we still have the information
|
||||
// to fill a form, we notify observers.
|
||||
didntFillReason = "noAutofillForms";
|
||||
Services.obs.notifyObservers(form, "passwordmgr-found-form", didntFillReason);
|
||||
this.log("autofillForms=false but form can be filled; notified observers");
|
||||
} else if (selectedLogin && isFormDisabled) {
|
||||
// For when autocomplete is off, but we still have the information
|
||||
// to fill a form, we notify observers.
|
||||
didntFillReason = "autocompleteOff";
|
||||
Services.obs.notifyObservers(form, "passwordmgr-found-form", didntFillReason);
|
||||
this.log("autocomplete=off but form can be filled; notified observers");
|
||||
}
|
||||
|
||||
this._notifyFoundLogins(didntFillReason, usernameField, passwordField,
|
||||
foundLogins, selectedLogin);
|
||||
|
||||
return didFillForm;
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* _getPasswordOrigin
|
||||
*
|
||||
* Get the parts of the URL we want for identification.
|
||||
*/
|
||||
_getPasswordOrigin : function (uriString, allowJS) {
|
||||
var realm = "";
|
||||
try {
|
||||
var uri = Services.io.newURI(uriString, null, null);
|
||||
|
||||
if (allowJS && uri.scheme == "javascript")
|
||||
return "javascript:"
|
||||
|
||||
realm = uri.scheme + "://" + uri.host;
|
||||
|
||||
// If the URI explicitly specified a port, only include it when
|
||||
// it's not the default. (We never want "http://foo.com:80")
|
||||
var port = uri.port;
|
||||
if (port != -1) {
|
||||
var handler = Services.io.getProtocolHandler(uri.scheme);
|
||||
if (port != handler.defaultPort)
|
||||
realm += ":" + port;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
// bug 159484 - disallow url types that don't support a hostPort.
|
||||
// (although we handle "javascript:..." as a special case above.)
|
||||
this.log("Couldn't parse origin for " + uriString);
|
||||
realm = null;
|
||||
}
|
||||
|
||||
return realm;
|
||||
},
|
||||
|
||||
|
||||
_getActionOrigin : function (form) {
|
||||
var uriString = form.action;
|
||||
|
||||
// A blank or mission action submits to where it came from.
|
||||
if (uriString == "")
|
||||
uriString = form.baseURI; // ala bug 297761
|
||||
|
||||
return this._getPasswordOrigin(uriString, true);
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* _isAutoCompleteDisabled
|
||||
*
|
||||
* Returns true if the page requests autocomplete be disabled for the
|
||||
* specified form input.
|
||||
*/
|
||||
_isAutocompleteDisabled : function (element) {
|
||||
if (element && element.hasAttribute("autocomplete") &&
|
||||
element.getAttribute("autocomplete").toLowerCase() == "off")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* _getFormFields
|
||||
*
|
||||
* Returns the username and password fields found in the form.
|
||||
* Can handle complex forms by trying to figure out what the
|
||||
* relevant fields are.
|
||||
*
|
||||
* Returns: [usernameField, newPasswordField, oldPasswordField]
|
||||
*
|
||||
* usernameField may be null.
|
||||
* newPasswordField will always be non-null.
|
||||
* oldPasswordField may be null. If null, newPasswordField is just
|
||||
* "theLoginField". If not null, the form is apparently a
|
||||
* change-password field, with oldPasswordField containing the password
|
||||
* that is being changed.
|
||||
*/
|
||||
_getFormFields : function (form, isSubmission) {
|
||||
var usernameField = null;
|
||||
|
||||
// Locate the password field(s) in the form. Up to 3 supported.
|
||||
// If there's no password field, there's nothing for us to do.
|
||||
var pwFields = this._getPasswordFields(form, isSubmission);
|
||||
if (!pwFields)
|
||||
return [null, null, null];
|
||||
|
||||
|
||||
// Locate the username field in the form by searching backwards
|
||||
// from the first passwordfield, assume the first text field is the
|
||||
// username. We might not find a username field if the user is
|
||||
// already logged in to the site.
|
||||
for (var i = pwFields[0].index - 1; i >= 0; i--) {
|
||||
if (form.elements[i].type == "text") {
|
||||
usernameField = form.elements[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!usernameField)
|
||||
this.log("(form -- no username field found)");
|
||||
|
||||
|
||||
// If we're not submitting a form (it's a page load), there are no
|
||||
// password field values for us to use for identifying fields. So,
|
||||
// just assume the first password field is the one to be filled in.
|
||||
if (!isSubmission || pwFields.length == 1)
|
||||
return [usernameField, pwFields[0].element, null];
|
||||
|
||||
|
||||
// Try to figure out WTF is in the form based on the password values.
|
||||
var oldPasswordField, newPasswordField;
|
||||
var pw1 = pwFields[0].element.value;
|
||||
var pw2 = pwFields[1].element.value;
|
||||
var pw3 = (pwFields[2] ? pwFields[2].element.value : null);
|
||||
|
||||
if (pwFields.length == 3) {
|
||||
// Look for two identical passwords, that's the new password
|
||||
|
||||
if (pw1 == pw2 && pw2 == pw3) {
|
||||
// All 3 passwords the same? Weird! Treat as if 1 pw field.
|
||||
newPasswordField = pwFields[0].element;
|
||||
oldPasswordField = null;
|
||||
} else if (pw1 == pw2) {
|
||||
newPasswordField = pwFields[0].element;
|
||||
oldPasswordField = pwFields[2].element;
|
||||
} else if (pw2 == pw3) {
|
||||
oldPasswordField = pwFields[0].element;
|
||||
newPasswordField = pwFields[2].element;
|
||||
} else if (pw1 == pw3) {
|
||||
// A bit odd, but could make sense with the right page layout.
|
||||
newPasswordField = pwFields[0].element;
|
||||
oldPasswordField = pwFields[1].element;
|
||||
} else {
|
||||
// We can't tell which of the 3 passwords should be saved.
|
||||
this.log("(form ignored -- all 3 pw fields differ)");
|
||||
return [null, null, null];
|
||||
}
|
||||
} else { // pwFields.length == 2
|
||||
if (pw1 == pw2) {
|
||||
// Treat as if 1 pw field
|
||||
newPasswordField = pwFields[0].element;
|
||||
oldPasswordField = null;
|
||||
} else {
|
||||
// Just assume that the 2nd password is the new password
|
||||
oldPasswordField = pwFields[0].element;
|
||||
newPasswordField = pwFields[1].element;
|
||||
}
|
||||
}
|
||||
|
||||
return [usernameField, newPasswordField, oldPasswordField];
|
||||
},
|
||||
|
||||
|
||||
/* ---------- Private methods ---------- */
|
||||
|
||||
|
||||
/*
|
||||
* _getPasswordFields
|
||||
*
|
||||
* Returns an array of password field elements for the specified form.
|
||||
* If no pw fields are found, or if more than 3 are found, then null
|
||||
* is returned.
|
||||
*
|
||||
* skipEmptyFields can be set to ignore password fields with no value.
|
||||
*/
|
||||
_getPasswordFields : function (form, skipEmptyFields) {
|
||||
// Locate the password fields in the form.
|
||||
var pwFields = [];
|
||||
for (var i = 0; i < form.elements.length; i++) {
|
||||
var element = form.elements[i];
|
||||
if (!(element instanceof Ci.nsIDOMHTMLInputElement) ||
|
||||
element.type != "password")
|
||||
continue;
|
||||
|
||||
if (skipEmptyFields && !element.value)
|
||||
continue;
|
||||
|
||||
pwFields[pwFields.length] = {
|
||||
index : i,
|
||||
element : element
|
||||
};
|
||||
}
|
||||
|
||||
// If too few or too many fields, bail out.
|
||||
if (pwFields.length == 0) {
|
||||
this.log("(form ignored -- no password fields.)");
|
||||
return null;
|
||||
} else if (pwFields.length > 3) {
|
||||
this.log("(form ignored -- too many password fields. [got " +
|
||||
pwFields.length + "])");
|
||||
return null;
|
||||
}
|
||||
|
||||
return pwFields;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Notify observers about an attempt to fill a form that resulted in some
|
||||
* saved logins being found for the form.
|
||||
*
|
||||
* This does not get called if the login manager attempts to fill a form
|
||||
* but does not find any saved logins. It does, however, get called when
|
||||
* the login manager does find saved logins whether or not it actually
|
||||
* fills the form with one of them.
|
||||
*
|
||||
* @param didntFillReason {String}
|
||||
* the reason the login manager didn't fill the form, if any;
|
||||
* if the value of this parameter is null, then the form was filled;
|
||||
* otherwise, this parameter will be one of these values:
|
||||
* existingUsername: the username field already contains a username
|
||||
* that doesn't match any stored usernames
|
||||
* existingPassword: the password field already contains a password
|
||||
* autocompleteOff: autocomplete has been disabled for the form
|
||||
* or its username or password fields
|
||||
* multipleLogins: we have multiple logins for the form
|
||||
* noAutofillForms: the autofillForms pref is set to false
|
||||
*
|
||||
* @param usernameField {HTMLInputElement}
|
||||
* the username field detected by the login manager, if any;
|
||||
* otherwise null
|
||||
*
|
||||
* @param passwordField {HTMLInputElement}
|
||||
* the password field detected by the login manager
|
||||
*
|
||||
* @param foundLogins {Array}
|
||||
* an array of nsILoginInfos that can be used to fill the form
|
||||
*
|
||||
* @param selectedLogin {nsILoginInfo}
|
||||
* the nsILoginInfo that was/would be used to fill the form, if any;
|
||||
* otherwise null; whether or not it was actually used depends on
|
||||
* the value of the didntFillReason parameter
|
||||
*/
|
||||
_notifyFoundLogins : function (didntFillReason, usernameField,
|
||||
passwordField, foundLogins, selectedLogin) {
|
||||
// We need .setProperty(), which is a method on the original
|
||||
// nsIWritablePropertyBag. Strangley enough, nsIWritablePropertyBag2
|
||||
// doesn't inherit from that, so the additional QI is needed.
|
||||
let formInfo = Cc["@mozilla.org/hash-property-bag;1"].
|
||||
createInstance(Ci.nsIWritablePropertyBag2).
|
||||
QueryInterface(Ci.nsIWritablePropertyBag);
|
||||
|
||||
formInfo.setPropertyAsACString("didntFillReason", didntFillReason);
|
||||
formInfo.setPropertyAsInterface("usernameField", usernameField);
|
||||
formInfo.setPropertyAsInterface("passwordField", passwordField);
|
||||
formInfo.setProperty("foundLogins", foundLogins.concat());
|
||||
formInfo.setPropertyAsInterface("selectedLogin", selectedLogin);
|
||||
|
||||
Services.obs.notifyObservers(formInfo, "passwordmgr-found-logins", null);
|
||||
},
|
||||
|
||||
/*
|
||||
* _attachToInput
|
||||
*
|
||||
* Hooks up autocomplete support to a username field, to allow
|
||||
* a user editing the field to select an existing login and have
|
||||
* the password field filled in.
|
||||
*/
|
||||
_attachToInput : function (element) {
|
||||
this.log("attaching autocomplete stuff");
|
||||
element.addEventListener("blur",
|
||||
this._domEventListener, false);
|
||||
element.addEventListener("DOMAutoComplete",
|
||||
this._domEventListener, false);
|
||||
this._formFillService.markAsLoginManagerField(element);
|
||||
},
|
||||
|
||||
/*
|
||||
* _fillDocument
|
||||
*
|
||||
* Called when a page has loaded. For each form in the document,
|
||||
* we ask the parent process to see if it can be filled with a stored login
|
||||
* and fill them in with the results
|
||||
*/
|
||||
_fillDocument : function (doc) {
|
||||
var forms = doc.forms;
|
||||
if (!forms || forms.length == 0)
|
||||
return;
|
||||
|
||||
this.log("_fillDocument processing " + forms.length +
|
||||
" forms on " + doc.documentURI);
|
||||
|
||||
var autofillForm = !this._inPrivateBrowsing &&
|
||||
Services.prefs.getBoolPref("signon.autofillForms");
|
||||
|
||||
// actionOrigins is a list of each form's action origins for this
|
||||
// document. The parent process needs this to find the passwords
|
||||
// for each action origin.
|
||||
var actionOrigins = [];
|
||||
|
||||
for (var i = 0; i < forms.length; i++) {
|
||||
var form = forms[i];
|
||||
let [, passwordField, ] = this._getFormFields(form, false);
|
||||
if (passwordField) {
|
||||
var actionOrigin = this._getActionOrigin(form);
|
||||
actionOrigins.push(actionOrigin);
|
||||
}
|
||||
} // foreach form
|
||||
|
||||
if (!actionOrigins.length)
|
||||
return;
|
||||
|
||||
var formOrigin = this._getPasswordOrigin(doc.documentURI);
|
||||
var foundLogins = this._getPasswords(actionOrigins, formOrigin);
|
||||
|
||||
for (var i = 0; i < forms.length; i++) {
|
||||
var form = forms[i];
|
||||
var actionOrigin = this._getActionOrigin(form);
|
||||
if (foundLogins[actionOrigin]) {
|
||||
this.log("_fillDocument processing form[" + i + "]");
|
||||
this._fillForm(form, autofillForm, false, false,
|
||||
foundLogins[actionOrigin]);
|
||||
}
|
||||
} // foreach form
|
||||
},
|
||||
|
||||
/*
|
||||
* _getPasswords
|
||||
*
|
||||
* Retrieve passwords from parent process and prepare logins to be passed to
|
||||
* _fillForm. Returns map from action origins to passwords.
|
||||
*/
|
||||
_getPasswords: function(actionOrigins, formOrigin) {
|
||||
// foundLogins will be a map from action origins to passwords.
|
||||
var message = sendSyncMessage("PasswordMgr:GetPasswords", {
|
||||
actionOrigins: actionOrigins,
|
||||
formOrigin: formOrigin
|
||||
})[0];
|
||||
|
||||
// XXX need to somehow respond to the UI being busy
|
||||
// not needed for Fennec yet
|
||||
|
||||
var foundLogins = message.foundLogins;
|
||||
|
||||
// Each password will be a JSON-unserialized object, but they need to be
|
||||
// nsILoginInfo's.
|
||||
for (var key in foundLogins) {
|
||||
var logins = foundLogins[key];
|
||||
for (var i = 0; i < logins.length; i++) {
|
||||
var obj = logins[i];
|
||||
logins[i] = new this._nsLoginInfo();
|
||||
logins[i].init(obj.hostname, obj.formSubmitURL, obj.httpRealm,
|
||||
obj.username, obj.password,
|
||||
obj.usernameField, obj.passwordField);
|
||||
}
|
||||
}
|
||||
|
||||
return foundLogins;
|
||||
},
|
||||
|
||||
/*
|
||||
* _onFormSubmit
|
||||
*
|
||||
* Called by the our observer when notified of a form submission.
|
||||
* [Note that this happens before any DOM onsubmit handlers are invoked.]
|
||||
* Looks for a password change in the submitted form, so we can update
|
||||
* our stored password.
|
||||
*/
|
||||
_onFormSubmit : function (form) {
|
||||
if (this._inPrivateBrowsing) {
|
||||
// We won't do anything in private browsing mode anyway,
|
||||
// so there's no need to perform further checks.
|
||||
this.log("(form submission ignored in private browsing mode)");
|
||||
return;
|
||||
}
|
||||
|
||||
var doc = form.ownerDocument;
|
||||
|
||||
// If password saving is disabled (globally or for host), bail out now.
|
||||
if (!this._remember)
|
||||
return;
|
||||
|
||||
var hostname = this._getPasswordOrigin(doc.documentURI);
|
||||
var formSubmitURL = this._getActionOrigin(form);
|
||||
|
||||
|
||||
// Get the appropriate fields from the form.
|
||||
var [usernameField, newPasswordField, oldPasswordField] =
|
||||
this._getFormFields(form, true);
|
||||
|
||||
// Need at least 1 valid password field to do anything.
|
||||
if (newPasswordField == null)
|
||||
return;
|
||||
|
||||
// Check for autocomplete=off attribute. We don't use it to prevent
|
||||
// autofilling (for existing logins), but won't save logins when it's
|
||||
// present.
|
||||
// XXX spin out a bug that we don't update timeLastUsed in this case?
|
||||
if (this._isAutocompleteDisabled(form) ||
|
||||
this._isAutocompleteDisabled(usernameField) ||
|
||||
this._isAutocompleteDisabled(newPasswordField) ||
|
||||
this._isAutocompleteDisabled(oldPasswordField)) {
|
||||
this.log("(form submission ignored -- autocomplete=off found)");
|
||||
return;
|
||||
}
|
||||
|
||||
sendSyncMessage("PasswordMgr:FormSubmitted", {
|
||||
hostname: hostname,
|
||||
formSubmitURL: formSubmitURL,
|
||||
usernameField: usernameField ? usernameField.name : "",
|
||||
usernameValue: usernameField ? usernameField.value : "",
|
||||
passwordField: newPasswordField.name,
|
||||
passwordValue: newPasswordField.value,
|
||||
hasOldPasswordField: !!oldPasswordField
|
||||
});
|
||||
},
|
||||
|
||||
/* ---------- Utility objects ---------- */
|
||||
|
||||
/*
|
||||
* _observer object
|
||||
*
|
||||
* Internal utility object, implements the nsIObserver interface.
|
||||
* Used to receive notification for: form submission, preference changes.
|
||||
*/
|
||||
_observer : {
|
||||
_pwmgr : null,
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
|
||||
Ci.nsIFormSubmitObserver,
|
||||
Ci.nsISupportsWeakReference]),
|
||||
|
||||
|
||||
// nsFormSubmitObserver
|
||||
notify : function (formElement, aWindow, actionURI) {
|
||||
// Counterintuitively, form submit observers fire for content that
|
||||
// may not be the content in this context.
|
||||
if (aWindow.top != content)
|
||||
return true;
|
||||
|
||||
this._pwmgr.log("observer notified for form submission.");
|
||||
|
||||
// We're invoked before the content's |onsubmit| handlers, so we
|
||||
// can grab form data before it might be modified (see bug 257781).
|
||||
|
||||
try {
|
||||
this._pwmgr._onFormSubmit(formElement);
|
||||
} catch (e) {
|
||||
this._pwmgr.log("Caught error in onFormSubmit: " + e);
|
||||
}
|
||||
|
||||
return true; // Always return true, or form submit will be canceled.
|
||||
},
|
||||
|
||||
observe : function (aSubject, aTopic, aData) {
|
||||
this._pwmgr._debug = Services.prefs.getBoolPref("signon.debug");
|
||||
this._pwmgr._remember = Services.prefs.getBoolPref("signon.rememberSignons");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* _domEventListener object
|
||||
*
|
||||
* Internal utility object, implements nsIDOMEventListener
|
||||
* Used to catch certain DOM events needed to properly implement form fill.
|
||||
*/
|
||||
_domEventListener : {
|
||||
_pwmgr : null,
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIDOMEventListener,
|
||||
Ci.nsISupportsWeakReference]),
|
||||
|
||||
|
||||
handleEvent : function (event) {
|
||||
if (!event.isTrusted)
|
||||
return;
|
||||
|
||||
this._pwmgr.log("domEventListener: got event " + event.type);
|
||||
|
||||
switch (event.type) {
|
||||
case "DOMAutoComplete":
|
||||
case "blur":
|
||||
var acInputField = event.target;
|
||||
var acForm = acInputField.form;
|
||||
|
||||
// If the username is blank, bail out now -- we don't want
|
||||
// _fillForm() to try filling in a login without a username
|
||||
// to filter on (bug 471906).
|
||||
if (!acInputField.value)
|
||||
return;
|
||||
|
||||
// Make sure the username field _fillForm will use is the
|
||||
// same field as the autocomplete was activated on. If
|
||||
// not, the DOM has been altered and we'll just give up.
|
||||
var [usernameField, passwordField, ignored] =
|
||||
this._pwmgr._getFormFields(acForm, false);
|
||||
if (usernameField == acInputField && passwordField) {
|
||||
var actionOrigin = this._pwmgr._getActionOrigin(acForm);
|
||||
var formOrigin = this._pwmgr._getPasswordOrigin(acForm.ownerDocument.documentURI);
|
||||
var foundLogins = this._pwmgr._getPasswords([actionOrigin], formOrigin);
|
||||
this._pwmgr._fillForm(acForm, true, true, true, foundLogins[actionOrigin]);
|
||||
} else {
|
||||
this._pwmgr.log("Oops, form changed before AC invoked");
|
||||
}
|
||||
return;
|
||||
|
||||
case "pageshow":
|
||||
// Only process when we need to
|
||||
if (this._pwmgr._remember && event.target instanceof Ci.nsIDOMHTMLDocument)
|
||||
this._pwmgr._fillDocument(event.target);
|
||||
break;
|
||||
|
||||
case "unload":
|
||||
Services.prefs.removeObserver("signon.", this._pwmgr._observer);
|
||||
Services.obs.removeObserver(this._pwmgr._observer, "earlyformsubmit");
|
||||
break;
|
||||
|
||||
default:
|
||||
this._pwmgr.log("Oops! This event unexpected.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
loginManager.init();
|
|
@ -0,0 +1,95 @@
|
|||
var MenuListHelperUI = {
|
||||
get _container() {
|
||||
delete this._container;
|
||||
return this._container = document.getElementById("menulist-container");
|
||||
},
|
||||
|
||||
get _popup() {
|
||||
delete this._popup;
|
||||
return this._popup = document.getElementById("menulist-popup");
|
||||
},
|
||||
|
||||
get _title() {
|
||||
delete this._title;
|
||||
return this._title = document.getElementById("menulist-title");
|
||||
},
|
||||
|
||||
_firePopupEvent: function firePopupEvent(aEventName) {
|
||||
let menupopup = this._currentList.menupopup;
|
||||
if (menupopup.hasAttribute(aEventName)) {
|
||||
let func = new Function("event", menupopup.getAttribute(aEventName));
|
||||
func.call(this);
|
||||
}
|
||||
},
|
||||
|
||||
_currentList: null,
|
||||
show: function mn_show(aMenulist) {
|
||||
this._currentList = aMenulist;
|
||||
this._container.setAttribute("for", aMenulist.id);
|
||||
this._title.value = aMenulist.title || "";
|
||||
this._firePopupEvent("onpopupshowing");
|
||||
|
||||
let container = this._container;
|
||||
let listbox = this._popup.lastChild;
|
||||
while (listbox.firstChild)
|
||||
listbox.removeChild(listbox.firstChild);
|
||||
|
||||
let children = this._currentList.menupopup.children;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
let child = children[i];
|
||||
let item = document.createElement("richlistitem");
|
||||
if (child.disabled)
|
||||
item.setAttribute("disabled", "true");
|
||||
if (child.hidden)
|
||||
item.setAttribute("hidden", "true");
|
||||
|
||||
// Add selected as a class name instead of an attribute to not being overidden
|
||||
// by the richlistbox behavior (it sets the "current" and "selected" attribute
|
||||
item.setAttribute("class", "option-command prompt-button" + (child.selected ? " selected" : ""));
|
||||
|
||||
let image = document.createElement("image");
|
||||
image.setAttribute("src", child.image || "");
|
||||
item.appendChild(image);
|
||||
|
||||
let label = document.createElement("label");
|
||||
label.setAttribute("value", child.label);
|
||||
item.appendChild(label);
|
||||
|
||||
listbox.appendChild(item);
|
||||
}
|
||||
|
||||
window.addEventListener("resize", this, true);
|
||||
container.hidden = false;
|
||||
this.sizeToContent();
|
||||
BrowserUI.pushPopup(this, [this._popup]);
|
||||
},
|
||||
|
||||
hide: function mn_hide() {
|
||||
this._currentList = null;
|
||||
this._container.removeAttribute("for");
|
||||
this._container.hidden = true;
|
||||
window.removeEventListener("resize", this, true);
|
||||
BrowserUI.popPopup(this);
|
||||
},
|
||||
|
||||
selectByIndex: function mn_selectByIndex(aIndex) {
|
||||
this._currentList.selectedIndex = aIndex;
|
||||
|
||||
// Dispatch a xul command event to the attached menulist
|
||||
if (this._currentList.dispatchEvent) {
|
||||
let evt = document.createEvent("XULCommandEvent");
|
||||
evt.initCommandEvent("command", true, true, window, 0, false, false, false, false, null);
|
||||
this._currentList.dispatchEvent(evt);
|
||||
}
|
||||
|
||||
this.hide();
|
||||
},
|
||||
|
||||
sizeToContent: function sizeToContent() {
|
||||
this._popup.maxWidth = window.innerWidth * 0.75;
|
||||
},
|
||||
|
||||
handleEvent: function handleEvent(aEvent) {
|
||||
this.sizeToContent();
|
||||
}
|
||||
};
|