Merge places to mozilla-central.

This commit is contained in:
Shawn Wilsher 2009-07-27 08:50:26 -07:00
commit 3e9850b9ff
314 changed files with 5067 additions and 3377 deletions

View File

@ -119,7 +119,7 @@ interface nsIAccessibleRelation : nsISupports
/**
* This object is a transient component related to the target object. When
* this object is activated the target object doesn't loose focus.
* this object is activated the target object doesn't lose focus.
*/
const unsigned long RELATION_POPUP_FOR = 0x0c;

View File

@ -45,7 +45,7 @@
#include "nsIDOMXULSelectCntrlEl.h"
/*
* The basic implemetation of nsIAccessibleSelectable.
* The basic implementation of nsIAccessibleSelectable.
*/
class nsXULSelectableAccessible : public nsAccessibleWrap
{

View File

@ -54,9 +54,6 @@ include $(topsrcdir)/config/rules.mk
ifeq ($(OS_ARCH),WINNT)
ifdef MOZ_INSTALLER
ifdef MOZ_BRANDING_DIRECTORY
DEFINES += -DOFFICIAL_BRANDING=1
endif
# For Windows build the uninstaller during the application build since the
# uninstaller is included with the application for mar file generation.

View File

@ -51,9 +51,6 @@ PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
$(srcdir)/profile/channel-prefs.js \
$(NULL)
ifndef MOZ_BRANDING_DIRECTORY
PREF_JS_EXPORTS += $(srcdir)/firefox-branding.js
endif
# hardcode en-US for the moment
AB_CD = en-US
@ -226,7 +223,7 @@ endif
ifdef DEBUG
RCFLAGS += -DDEBUG
endif
RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox-os2.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document-os2.ico\"
endif
include $(topsrcdir)/config/rules.mk
@ -299,58 +296,23 @@ endif
endif # LIBXUL_SDK
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
ICON_FILES = \
$(DIST)/branding/mozicon128.png \
$(DIST)/branding/document.png \
$(NULL)
libs:: $(ICON_FILES)
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
install::
$(SYSINSTALL) $(IFLAGS1) $(ICON_FILES) $(DESTDIR)$(mozappdir)/icons
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
libs::
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(DIST)/bin/icons
$(INSTALL) $(IFLAGS1) $(DIST)/branding/document.png $(DIST)/bin/icons
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default
endif
export::
ifndef MOZ_BRANDING_DIRECTORY
$(NSINSTALL) -D $(DIST)/branding
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
cp $(srcdir)/firefox.ico $(DIST)/branding/firefox.ico
cp $(srcdir)/firefox.ico $(DIST)/branding/app.ico
cp $(srcdir)/document.ico $(DIST)/branding/document.ico
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/macbuild/firefox.icns $(DIST)/branding/firefox.icns
cp $(srcdir)/macbuild/document.icns $(DIST)/branding/document.icns
cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
endif
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/mozicon128.png $(DIST)/branding/mozicon128.png
cp $(srcdir)/document.png $(DIST)/branding/document.png
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(srcdir)/default16.png $(DIST)/branding/default16.png
cp $(srcdir)/default32.png $(DIST)/branding/default32.png
cp $(srcdir)/default48.png $(DIST)/branding/default48.png
endif
ifeq ($(OS_ARCH),OS2)
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/firefox.ico
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/app.ico
cp $(srcdir)/document-os2.ico $(DIST)/branding/document.ico
ifdef MOZ_SPLASHSCREEN
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
libs::
$(INSTALL) $(IFLAGS1) $(DIST)/branding/splash.bmp $(DIST)/bin
endif
endif
libs::
touch $(DIST)/bin/.autoreg

View File

@ -64,10 +64,6 @@ DEFINES += \
-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
$(NULL)
ifndef MOZ_BRANDING_DIRECTORY
DEFINES += -DMOZ_USE_GENERIC_BRANDING
endif
ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DHAVE_SHELL_SERVICE=1
endif
@ -76,16 +72,6 @@ ifdef MOZ_UPDATER
DEFINES += -DMOZ_UPDATER=1
endif
ifndef MOZ_BRANDING_DIRECTORY
libs locale::
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/browserconfig.properties $(DIST)/bin
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/old-homepage-default.properties $(DIST)/bin
install::
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/browserconfig.properties $(DESTDIR)$(mozappdir)
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/content/old-homepage-default.properties $(DESTDIR)$(mozappdir)
endif
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
ifneq ($(OS_ARCH),WINCE)
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1

View File

@ -379,7 +379,7 @@ var ctrlTab = {
this._timer = setTimeout(function (self) {
self._timer = null;
self._openPanel();
}, 100, this);
}, 200, this);
},
_openPanel: function ctrlTab_openPanel() {
@ -801,9 +801,7 @@ var allTabs = {
{
let innerWidth = Math.ceil(previewWidth / REL_PREVIEW_THUMBNAIL);
let innerHeight = Math.ceil(previewHeight / REL_PREVIEW_THUMBNAIL);
let verticalPadding = innerHeight * (REL_PREVIEW_THUMBNAIL - 1);
var canvasStyle = "margin-bottom:" + (verticalPadding * .3) + "px;" +
"max-width:" + innerWidth + "px;" +
var canvasStyle = "max-width:" + innerWidth + "px;" +
"min-width:" + innerWidth + "px;" +
"max-height:" + innerHeight + "px;" +
"min-height:" + innerHeight + "px;";

View File

@ -45,6 +45,10 @@ toolbarpaletteitem[place="palette"] > toolbaritem > hbox[type="places"] {
display: none;
}
#feed-menu[chromedir="rtl"] > menuitem {
direction: rtl;
}
#urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) ,
#urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button ,
#urlbar[isempty="true"] > #urlbar-icons > #go-button {
@ -139,7 +143,11 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
.ctrlTab-favicon-container,
.allTabs-favicon-container {
-moz-box-align: start;
%ifdef XP_MACOSX
-moz-box-pack: end;
%else
-moz-box-pack: start;
%endif
}
.ctrlTab-favicon,

View File

@ -424,6 +424,8 @@
tooltiptext="&feedButton.tooltip;"
onclick="return FeedHandler.onFeedButtonClick(event);">
<menupopup position="after_end"
id="feed-menu"
chromedir="&locale.dir;"
onpopupshowing="return FeedHandler.buildFeedList(this);"
oncommand="return FeedHandler.subscribeToFeed(null, event);"
onclick="checkForMiddleClick(this, event);"/>

View File

@ -1,2 +0,0 @@
# Do NOT localize or otherwise change these values
browser.startup.homepage=http://www.mozilla.org/projects/bonecho/

View File

@ -596,11 +596,14 @@ function addImage(url, type, alt, elem, isBg)
function grabAll(elem)
{
// check for background images, any node may have one
var ComputedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, "");
var url = ComputedStyle && ComputedStyle.getPropertyCSSValue("background-image");
if (url && url.primitiveType == CSSPrimitiveValue.CSS_URI)
addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
// check for background images, any node may have multiple
var computedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, "");
if (computedStyle) {
Array.forEach(computedStyle.getPropertyCSSValue("background-image"), function (url) {
if (url.primitiveType == CSSPrimitiveValue.CSS_URI)
addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
});
}
// one swi^H^H^Hif-else to rule them all
if (elem instanceof HTMLImageElement)

View File

@ -87,11 +87,9 @@
<preferences id="sanitizePreferences">
<preference id="privacy.cpd.history" name="privacy.cpd.history" type="bool"/>
<preference id="privacy.cpd.formdata" name="privacy.cpd.formdata" type="bool"/>
<preference id="privacy.cpd.passwords" name="privacy.cpd.passwords" type="bool"/>
<preference id="privacy.cpd.downloads" name="privacy.cpd.downloads" type="bool" disabled="true"/>
<preference id="privacy.cpd.cookies" name="privacy.cpd.cookies" type="bool"/>
<preference id="privacy.cpd.cache" name="privacy.cpd.cache" type="bool"/>
<preference id="privacy.cpd.offlineApps" name="privacy.cpd.offlineApps" type="bool"/>
<preference id="privacy.cpd.sessions" name="privacy.cpd.sessions" type="bool"/>
<preference id="privacy.cpd.siteSettings" name="privacy.cpd.siteSettings" type="bool"/>
</preferences>

View File

@ -1,12 +1,8 @@
// Bug 356571 - loadOneOrMoreURIs gives up if one of the URLs has an unknown protocol
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cm = Components.manager;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
// Set to true when docShell alerts for unknown protocol error
var didFail = false;

View File

@ -35,8 +35,6 @@
*
* ***** END LICENSE BLOCK ***** */
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
/*
* Test the fix for bug 441778 to ensure site-specific page zoom doesn't get
* modified by sub-document loads of content from a different domain.
@ -53,9 +51,8 @@ function test() {
let zoomLevel;
// Prepare the test tab
let testTab = gBrowser.addTab();
gBrowser.selectedTab = testTab;
let testBrowser = gBrowser.getBrowserForTab(testTab);
gBrowser.selectedTab = gBrowser.addTab();
let testBrowser = gBrowser.selectedBrowser;
let finishTest = function() {
testBrowser.removeProgressListener(progressListener);

View File

@ -1,4 +1,16 @@
function test() {
waitForExplicitFinish();
if (Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager).activeWindow !=
window) {
window.addEventListener("focus", function () {
window.removeEventListener("focus", arguments.callee, false);
test();
}, false);
window.focus();
return;
}
gPrefService.setBoolPref("browser.ctrlTab.previews", true);
gBrowser.addTab();
@ -77,6 +89,8 @@ function test() {
// cleanup
gPrefService.clearUserPref("browser.ctrlTab.previews");
finish();
/* private utility functions */
function pressCtrlTab(aShiftKey)

View File

@ -1,11 +1,7 @@
function url(spec) {
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
return ios.newURI(spec, null, null);
}
var gTestPage = null;
var gBrowserHandler;
var browser;
function doc() browser.contentDocument;
function setHandlerFunc(aResultFunc) {
DOMLinkHandler.handleEvent = function (event) {
@ -19,10 +15,14 @@ function test() {
ok(gBrowserHandler, "found browser handler");
waitForExplicitFinish();
var activeWin = Application.activeWindow;
gTestPage = activeWin.open(url("chrome://mochikit/content/browser/browser/base/content/test/discovery.html"));
gTestPage.focus();
setTimeout(iconDiscovery, 1000);
gBrowser.selectedTab = gBrowser.addTab();
browser = gBrowser.selectedBrowser;
browser.addEventListener("load", function (event) {
event.currentTarget.removeEventListener("load", arguments.callee, true);
iconDiscovery();
}, true);
content.location = "chrome://mochikit/content/browser/browser/base/content/test/discovery.html";
}
var iconDiscoveryTests = [
@ -38,7 +38,7 @@ var iconDiscoveryTests = [
function runIconDiscoveryTest() {
var test = iconDiscoveryTests[0];
var head = gTestPage.document.getElementById("linkparent");
var head = doc().getElementById("linkparent");
var hasSrc = gProxyFavIcon.hasAttribute("src");
if (test.pass)
ok(hasSrc, test.text);
@ -56,8 +56,8 @@ function iconDiscovery() {
gProxyFavIcon.removeAttribute("src");
var test = iconDiscoveryTests[0];
var head = gTestPage.document.getElementById("linkparent");
var link = gTestPage.document.createElement("link");
var head = doc().getElementById("linkparent");
var link = doc().createElement("link");
var rel = test.rel || "icon";
var href = test.href || "chrome://mochikit/content/browser/browser/base/content/test/moz.png";
@ -91,7 +91,6 @@ var searchDiscoveryTests = [
];
function runSearchDiscoveryTest() {
var browser = gBrowser.getBrowserForDocument(gTestPage.document);
var test = searchDiscoveryTests[0];
var title = test.title || searchDiscoveryTests.length;
if (browser.engines) {
@ -116,12 +115,11 @@ function runMultipleEnginesTestAndFinalize() {
ranOnce = true;
return;
}
var browser = gBrowser.getBrowserForDocument(gTestPage.document);
ok(browser.engines, "has engines");
is(browser.engines.length, 1, "only one engine");
is(browser.engines[0].uri, "http://first.mozilla.com/search.xml", "first engine wins");
gTestPage.close();
gBrowser.removeCurrentTab();
// Reset the default link handler
DOMLinkHandler.handleEvent = gBrowserHandler;
@ -130,13 +128,12 @@ function runMultipleEnginesTestAndFinalize() {
}
function searchDiscovery() {
var head = gTestPage.document.getElementById("linkparent");
var browser = gBrowser.getBrowserForDocument(gTestPage.document);
var head = doc().getElementById("linkparent");
if (searchDiscoveryTests.length) {
setHandlerFunc(runSearchDiscoveryTest);
var test = searchDiscoveryTests[0];
var link = gTestPage.document.createElement("link");
var link = doc().createElement("link");
var rel = test.rel || "search";
var href = test.href || "http://so.not.here.mozilla.com/search.xml";
@ -153,7 +150,7 @@ function searchDiscovery() {
} else {
setHandlerFunc(runMultipleEnginesTestAndFinalize);
// Test multiple engines with the same title
var link = gTestPage.document.createElement("link");
var link = doc().createElement("link");
link.rel = "search";
link.href = "http://first.mozilla.com/search.xml";
link.type = "application/opensearchdescription+xml";

View File

@ -60,14 +60,6 @@ browser.jar:
* content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul)
#endif
* content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul)
#ifdef MOZ_USE_GENERIC_BRANDING
% content branding %content/branding/ xpcnativewrappers=yes
content/branding/about.png (branding/about.png)
content/branding/aboutCredits.png (branding/aboutCredits.png)
content/branding/aboutFooter.png (branding/aboutFooter.png)
content/branding/icon48.png (branding/icon48.png)
content/branding/icon64.png (branding/icon64.png)
#endif
# the following files are browser-specific overrides
* content/browser/license.html (/toolkit/content/license.html)
% override chrome://global/content/license.html chrome://browser/content/license.html

View File

@ -0,0 +1,101 @@
# ***** 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)
PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
include $(topsrcdir)/config/rules.mk
WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
$(NULL)
ifdef MOZ_SPLASHSCREEN
WINDOWS_BRANDING_FILES += splash.bmp
endif
OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)
LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
document.png \
mozicon128.png \
$(NULL)
OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)
export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
browser/branding/nightly/configure.sh Executable file → Normal file
View File

View File

@ -0,0 +1,11 @@
# Branding Makefile
# - jars chrome artwork
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 B

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1,7 @@
browser.jar:
% content branding %content/branding/ xpcnativewrappers=yes
content/branding/about.png (about.png)
content/branding/aboutCredits.png (aboutCredits.png)
content/branding/aboutFooter.png (aboutFooter.png)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)

View File

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 722 B

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -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 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 = browser/branding/nightly/locales
include $(DEPTH)/config/autoconf.mk
DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
include $(topsrcdir)/config/rules.mk
libs::
@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
$(srcdir)/browserconfig.properties > $(FINAL_TARGET)/browserconfig.properties
install::
@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
$(srcdir)/browserconfig.properties > $(DESTDIR)$(mozappdir)/browserconfig.properties

View File

@ -0,0 +1,6 @@
#filter substitution
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
locale/branding/brand.dtd (%brand.dtd)
* locale/branding/brand.properties (%brand.properties)

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -1,7 +1,38 @@
# Branding Makefile
# - jars chrome artwork
# - copies artwork to appropriate places in objdir for bundling into app
# resources
# ***** 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@
@ -19,40 +50,52 @@ PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
include $(topsrcdir)/config/rules.mk
BROWSER_APP_FILES = \
WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
$(NULL)
ifdef MOZ_SPLASHSCREEN
WINDOWS_BRANDING_FILES += splash.bmp
endif
OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)
LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
document.png \
mozicon128.png \
firefox.ico \
document.ico \
$(NULL)
OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)
export::
$(NSINSTALL) -D $(DIST)/branding
cp $(addprefix $(srcdir)/, $(BROWSER_APP_FILES)) $(DIST)/branding/
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/document.png $(DIST)/branding/document.png
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
cp $(srcdir)/firefox.icns $(DIST)/branding/firefox.icns
cp $(srcdir)/document.icns $(DIST)/branding/document.icns
cp $(srcdir)/dsstore $(DIST)/branding/dsstore
cp $(srcdir)/background.png $(DIST)/branding/background.png
cp $(srcdir)/disk.icns $(DIST)/branding/disk.icns
endif
ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
cp $(srcdir)/firefox.ico $(DIST)/branding/app.ico
endif
ifeq ($(OS_ARCH),WINNT)
cp $(srcdir)/branding.nsi $(DIST)/branding/branding.nsi
cp $(srcdir)/wizHeader.bmp $(DIST)/branding/wizHeader.bmp
cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp
cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/wizWatermark.bmp
endif
ifeq ($(OS_ARCH),OS2)
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/firefox.ico
cp $(srcdir)/firefox-os2.ico $(DIST)/branding/app.ico
cp $(srcdir)/document-os2.ico $(DIST)/branding/document.ico
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif

0
browser/branding/unofficial/configure.sh Executable file → Normal file
View File

0
browser/branding/unofficial/dsstore Executable file → Normal file
View File

View File

@ -2,6 +2,5 @@
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
# Unofficial branding only exists in en-US
locale/branding/brand.dtd (en-US/brand.dtd)
* locale/branding/brand.properties (en-US/brand.properties)
locale/branding/brand.dtd (%brand.dtd)
* locale/branding/brand.properties (%brand.properties)

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

View File

@ -45,9 +45,7 @@ ifdef MOZ_EXTENSIONS
tier_app_dirs += extensions
endif
ifdef MOZ_BRANDING_DIRECTORY
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
endif
tier_app_dirs += browser

View File

@ -845,8 +845,6 @@ FeedWriter.prototype = {
// nsIDomEventListener
handleEvent: function(event) {
// see comments in init()
event = new XPCNativeWrapper(event);
if (event.target.ownerDocument != this._document) {
LOG("FeedWriter.handleEvent: Someone passed the feed writer as a listener to the events of another document!");
return;
@ -1152,10 +1150,7 @@ FeedWriter.prototype = {
// nsIFeedWriter
init: function FW_init(aWindow) {
// Explicitly wrap |window| in an XPCNativeWrapper to make sure
// it's a real native object! This will throw an exception if we
// get a non-native object.
var window = new XPCNativeWrapper(aWindow);
var window = aWindow;
this._feedURI = this._getOriginalURI(window);
if (!this._feedURI)
return;
@ -1332,9 +1327,6 @@ FeedWriter.prototype = {
// nsIObserver
observe: function FW_observe(subject, topic, data) {
// see init()
subject = new XPCNativeWrapper(subject);
if (!this._window) {
// this._window is null unless this.init was called with a trusted
// window object.
@ -1401,9 +1393,6 @@ FeedWriter.prototype = {
// nsINavHistoryService
onPageChanged: function FW_onPageChanged(aURI, aWhat, aValue) {
// see init()
aURI = new XPCNativeWrapper(aURI);
if (aWhat == Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON) {
// Go through the readers menu and look for the corresponding
// reader menu-item for the page if any.

View File

@ -1477,8 +1477,15 @@ SessionStoreService.prototype = {
if (!node)
return null;
const MAX_GENERATED_XPATHS = 100;
let generatedCount = 0;
let data = {};
do {
// Only generate a limited number of XPath expressions for perf reasons (cf. bug 477564)
if (!node.id && ++generatedCount > MAX_GENERATED_XPATHS)
continue;
let id = node.id ? "#" + node.id : XPathHelper.generate(node);
if (node instanceof Ci.nsIDOMHTMLInputElement) {
if (node.type != "file")

View File

@ -19,7 +19,6 @@ bin/@PREF_DIR@/firefox-l10n.js
bin/defaults/existing-profile-defaults.js
; If you add a new directory you must explicitly call addDirectory in ab-CD.jst
bin/browserconfig.properties
bin/old-homepage-default.properties
bin/searchplugins/*
bin/defaults/profile/bookmarks.html
bin/defaults/profile/localstore.rdf

View File

@ -155,12 +155,3 @@ endif
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk
export::
ifndef MOZ_BRANDING_DIRECTORY
$(NSINSTALL) -D $(DIST)/branding
cp $(srcdir)/nsis/branding.nsi $(DIST)/branding/branding.nsi
cp $(srcdir)/wizHeader.bmp $(DIST)/branding/wizHeader.bmp
cp $(srcdir)/wizHeaderRTL.bmp $(DIST)/branding/wizHeaderRTL.bmp
cp $(srcdir)/wizWatermark.bmp $(DIST)/branding/wizWatermark.bmp
endif

View File

@ -18,7 +18,6 @@ bin\chrome\@AB_CD@.manifest
bin\defaults\pref\firefox-l10n.js
bin\defaults\existing-profile-defaults.js
bin\browserconfig.properties
bin\old-homepage-default.properties
bin\searchplugins\*
bin\defaults\profile\bookmarks.html
bin\defaults\profile\localstore.rdf

View File

@ -64,12 +64,10 @@ vpath book%.inc @srcdir@/en-US/profile
endif
ifdef MOZ_BRANDING_DIRECTORY
SUBMAKEFILES += \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
$(NULL)
endif
# This makefile uses variable overrides from the libs-% target to
# build non-default locales to non-default dist/ locations. Be aware!
@ -87,10 +85,6 @@ WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
MOZ_LANGPACK_EID=langpack-$(AB_CD)@firefox.mozilla.org
ifndef MOZ_BRANDING_DIRECTORY
DEFINES += -DMOZ_USE_GENERIC_BRANDING
endif
ifeq (,$(filter-out pref,$(MOZ_EXTENSIONS)))
DEFINES += -DEXTENSION_PREF
endif
@ -188,9 +182,7 @@ libs-%:
@$(MAKE) -C ../../extensions/reporter/locales libs AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
ifdef MOZ_BRANDING_DIRECTORY
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
endif
@$(MAKE) tests AB_CD=$*
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
@ -204,11 +196,7 @@ endif
repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
ifdef MOZ_BRANDING_DIRECTORY
$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
else
$(MAKE) -C ../installer/windows export
endif
if test ! -d $(_ABS_DIST)/$(PKG_INST_PATH); then \
$(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH); \
fi

View File

@ -167,7 +167,9 @@ editBookmarkPanel.editBookmarkTitle=Edit This Bookmark
# LOCALIZATION NOTE (editBookmark.removeBookmarks.label)
# Semi-colon list of plural forms. Replacement for #1 is
# the number of bookmarks to be removed.
editBookmark.removeBookmarks.label=Remove Bookmark;Remove Bookmarks (#1)
# If this causes problems with localization you can also do "Remove Bookmarks (#1)"
# instead of "Remove #1 Bookmarks".
editBookmark.removeBookmarks.label=Remove Bookmark;Remove #1 Bookmarks
# Geolocation UI

View File

@ -75,8 +75,3 @@
% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
% override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
#ifdef MOZ_USE_GENERIC_BRANDING
% locale branding @AB_CD@ %locale/branding/
locale/branding/brand.dtd (%chrome/branding/brand.dtd)
locale/branding/brand.properties (%chrome/branding/brand.properties)
#endif

View File

@ -82,16 +82,11 @@ browser/themes/pinstripe/Makefile
browser/themes/winstripe/browser/Makefile
browser/themes/winstripe/communicator/Makefile
browser/themes/winstripe/Makefile
$MOZ_BRANDING_DIRECTORY/Makefile
$MOZ_BRANDING_DIRECTORY/content/Makefile
$MOZ_BRANDING_DIRECTORY/locales/Makefile
"
if test -n "$MOZ_BRANDING_DIRECTORY"; then
add_makefiles "
$MOZ_BRANDING_DIRECTORY/Makefile
$MOZ_BRANDING_DIRECTORY/content/Makefile
$MOZ_BRANDING_DIRECTORY/locales/Makefile
"
fi
if [ "$ENABLE_TESTS" ]; then
add_makefiles "
browser/base/content/test/Makefile

View File

@ -1463,5 +1463,5 @@ toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-text {
}
.allTabs-preview-label {
-moz-transform: translate(0, -1px);
-moz-transform: translate(0, 2px);
}

View File

@ -2130,13 +2130,12 @@ tabpanels.plain {
-moz-appearance: none;
background: rgba(27%,27%,27%,.9) url(KUI-background.png) repeat-x;
color: white;
border: 1px solid rgba(100%,100%,100%,.15);
border-style: none;
-moz-border-radius: 20px;
}
.KUI-panel[level="top"] {
background-color: rgba(27%,27%,27%,.65);
border-style: none;
-moz-window-shadow: none;
}
@ -2163,11 +2162,6 @@ tabpanels.plain {
-moz-box-shadow: 1px 1px 3px rgb(12%,12%,12%);
}
.ctrlTab-favicon-container,
.allTabs-favicon-container {
-moz-box-pack: end;
}
.ctrlTab-favicon[src],
.allTabs-favicon[src] {
background-color: white;
@ -2180,43 +2174,39 @@ tabpanels.plain {
/* Ctrl-Tab */
#ctrlTab-panel {
padding: 20px 10px 15px;
padding: 20px 10px 10px;
text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 3px rgb(27%,27%,27%);
}
.ctrlTab-preview:not(#ctrlTab-showAll) .ctrlTab-preview-inner {
padding-bottom: 2px;
}
.ctrlTab-preview:not(#ctrlTab-showAll) .tabPreview-canvas {
margin-bottom: 2px;
}
.ctrlTab-preview:focus:not(#ctrlTab-showAll) .ctrlTab-preview-inner {
background-color: #ccc;
color: black;
text-shadow: 0 0 1px white;
-moz-box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 5px 1px -moz-mac-focusring, 0 0 8px white;
padding: 2px;
margin: -2px -2px 0;
.ctrlTab-preview .ctrlTab-preview-inner {
padding-bottom: 10px;
}
.ctrlTab-preview:focus .tabPreview-canvas {
-moz-box-shadow: none;
#ctrlTab-showAll .ctrlTab-preview-inner {
padding: 10px;
background-color: rgba(255,255,255,.2);
-moz-border-radius: .5em;
}
.ctrlTab-preview:focus .ctrlTab-preview-inner,
#ctrlTab-showAll:focus .ctrlTab-preview-inner {
background-color: rgba(0,0,0,.6);
text-shadow: none;
padding: 8px;
border: 2px solid white;
-moz-border-radius: .5em;
}
.ctrlTab-preview:not(#ctrlTab-showAll):focus .ctrlTab-preview-inner {
margin: -10px -10px 0;
}
#ctrlTab-showAll {
-moz-appearance: button;
color: ButtonText;
text-shadow: none;
padding: 0 3px;
margin-top: 15px;
font-size: 1.2em;
}
#ctrlTab-showAll:focus {
-moz-box-shadow: 0 0 8px white;
-moz-border-radius: 100%;
margin-top: .5em;
}
/* All Tabs */
@ -2251,17 +2241,17 @@ tabpanels.plain {
margin: 0;
}
.allTabs-preview:focus,
.allTabs-preview:hover,
.allTabs-preview[closebuttonhover] {
background-color: rgba(100%,100%,100%,.15);
-moz-border-radius: 6px;
background-color: rgba(0,0,0,.4);
-moz-border-radius: .5em;
}
.allTabs-preview:focus {
background-color: rgba(100%,100%,100%,.3);
-moz-border-radius: 6px;
border: 2px solid white;
}
.allTabs-preview-label {
-moz-transform: translate(0, -1px);
-moz-transform: translate(0, 1px);
}

View File

@ -75,17 +75,6 @@
text-shadow: white -1px -1px .5em, white -1px 1px .5em, white 1px 1px .5em, white 1px -1px .5em;
}
/*XXX Bug 473152 - Aero Glass clips panel content
.allTabs-preview:hover:-moz-system-metric(windows-compositor),
.allTabs-preview[closebuttonhover]:-moz-system-metric(windows-compositor) {
background: rgba(0,0,0,.15) url(KUI-background.png) repeat-x;
}
.allTabs-preview:focus:-moz-system-metric(windows-compositor) {
background: rgba(0,0,0,.3) url(KUI-background.png) repeat-x;
}
*/
/* ::::: fullscreen window controls ::::: */
#window-controls {

View File

@ -2027,13 +2027,12 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
-moz-appearance: none;
background: rgba(27%,27%,27%,.9) url(KUI-background.png) repeat-x;
color: white;
border: 1px solid rgba(100%,100%,100%,.15);
border-style: none;
-moz-border-radius: 20px;
}
.KUI-panel[level="top"] {
background-color: rgba(27%,27%,27%,.65);
border-style: none;
}
.KUI-panel-closebutton {
@ -2071,44 +2070,41 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
/* Ctrl-Tab */
#ctrlTab-panel {
padding: 20px 10px 15px;
padding: 20px 10px 10px;
font-weight: bold;
text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 3px rgb(27%,27%,27%);
}
.ctrlTab-preview:not(#ctrlTab-showAll) .ctrlTab-preview-inner {
padding-bottom: 2px;
}
.ctrlTab-preview:not(#ctrlTab-showAll) .tabPreview-canvas {
margin-bottom: 2px;
}
.ctrlTab-preview:focus:not(#ctrlTab-showAll) .ctrlTab-preview-inner {
background-color: #ccc;
color: black;
text-shadow: 0 0 1px white;
-moz-box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 5px 1px Highlight, 0 0 8px white;
padding: 2px;
margin: -2px -2px 0;
.ctrlTab-preview .ctrlTab-preview-inner {
padding-bottom: 10px;
}
.ctrlTab-preview:focus .tabPreview-canvas {
-moz-box-shadow: none;
#ctrlTab-showAll .ctrlTab-preview-inner {
padding: 10px;
background-color: rgba(255,255,255,.2);
-moz-border-radius: .5em;
}
.ctrlTab-preview:focus .ctrlTab-preview-inner,
#ctrlTab-showAll:focus .ctrlTab-preview-inner {
color: white;
background-color: rgba(0,0,0,.6);
text-shadow: none;
padding: 8px;
border: 2px solid white;
-moz-border-radius: .5em;
}
.ctrlTab-preview:not(#ctrlTab-showAll):focus .ctrlTab-preview-inner {
margin: -10px -10px 0;
}
#ctrlTab-showAll {
-moz-appearance: button;
color: ButtonText;
font-weight: normal;
text-shadow: none;
padding: 3px 5px;
margin-top: 15px;
}
#ctrlTab-showAll:focus {
-moz-box-shadow: 0 0 8px white;
-moz-border-radius: 3px;
margin-top: .5em;
}
/* All Tabs */
@ -2143,17 +2139,18 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
margin: 0;
}
.allTabs-preview:focus,
.allTabs-preview:hover,
.allTabs-preview[closebuttonhover] {
background-color: rgba(100%,100%,100%,.15);
-moz-border-radius: 4px;
color: white;
background-color: rgba(0,0,0,.4);
-moz-border-radius: .5em;
}
.allTabs-preview:focus {
background-color: rgba(100%,100%,100%,.3);
-moz-border-radius: 4px;
border: 2px solid white;
}
.allTabs-preview-label {
-moz-transform: translate(0, -1px);
-moz-transform: translate(0, 1px);
}

View File

@ -173,7 +173,7 @@ classic.jar:
skin/classic/aero/browser/preferences/saveFile.png (preferences/saveFile-aero.png)
skin/classic/aero/browser/preferences/preferences.css (preferences/preferences.css)
skin/classic/aero/browser/preferences/applications.css (preferences/applications.css)
skin/classic/aero/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png)
skin/classic/aero/browser/tabbrowser/alltabs.png (tabbrowser/alltabs-aero.png)
skin/classic/aero/browser/tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-end-bkgnd-animate.png)
skin/classic/aero/browser/tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png (tabbrowser/alltabs-box-overflow-start-bkgnd-animate.png)
skin/classic/aero/browser/tabbrowser/newtab.png (tabbrowser/newtab-aero.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

View File

@ -139,8 +139,7 @@ PRUint32 nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin;
static
nsresult
GetPrincipalDomainOrigin(nsIPrincipal* aPrincipal,
nsACString& aOrigin)
GetOriginFromURI(nsIURI* aURI, nsACString& aOrigin)
{
if (nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin > 1) {
// Allow a single recursive call to GetPrincipalDomainOrigin, since that
@ -151,16 +150,8 @@ GetPrincipalDomainOrigin(nsIPrincipal* aPrincipal,
}
nsAutoInPrincipalDomainOriginSetter autoSetter;
aOrigin.Truncate();
nsCOMPtr<nsIURI> uri;
aPrincipal->GetDomain(getter_AddRefs(uri));
if (!uri) {
aPrincipal->GetURI(getter_AddRefs(uri));
}
NS_ENSURE_TRUE(uri, NS_ERROR_UNEXPECTED);
uri = NS_GetInnermostURI(uri);
nsCOMPtr<nsIURI> uri = NS_GetInnermostURI(aURI);
NS_ENSURE_TRUE(uri, NS_ERROR_UNEXPECTED);
nsCAutoString hostPort;
@ -182,6 +173,22 @@ GetPrincipalDomainOrigin(nsIPrincipal* aPrincipal,
return NS_OK;
}
static
nsresult
GetPrincipalDomainOrigin(nsIPrincipal* aPrincipal,
nsACString& aOrigin)
{
nsCOMPtr<nsIURI> uri;
aPrincipal->GetDomain(getter_AddRefs(uri));
if (!uri) {
aPrincipal->GetURI(getter_AddRefs(uri));
}
NS_ENSURE_TRUE(uri, NS_ERROR_UNEXPECTED);
return GetOriginFromURI(uri, aOrigin);
}
// Inline copy of JS_GetPrivate() for better inlining and optimization
// possibilities. Also doesn't take a cx argument as it's not
// needed. We access the private data only on objects whose private
@ -831,35 +838,81 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
NS_ConvertUTF8toUTF16 className(classInfoData.GetName());
nsCAutoString subjectOrigin;
nsCAutoString subjectDomain;
if (!nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin) {
GetPrincipalDomainOrigin(subjectPrincipal, subjectOrigin);
nsCOMPtr<nsIURI> uri, domain;
subjectPrincipal->GetURI(getter_AddRefs(uri));
// Subject can't be system if we failed the security
// check, so |uri| is non-null.
NS_ASSERTION(uri, "How did that happen?");
GetOriginFromURI(uri, subjectOrigin);
subjectPrincipal->GetDomain(getter_AddRefs(domain));
if (domain) {
GetOriginFromURI(domain, subjectDomain);
}
} else {
subjectOrigin.AssignLiteral("the security manager");
}
NS_ConvertUTF8toUTF16 subjectOriginUnicode(subjectOrigin);
NS_ConvertUTF8toUTF16 subjectDomainUnicode(subjectDomain);
nsCAutoString objectOrigin;
nsCAutoString objectDomain;
if (!nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin &&
objectPrincipal) {
GetPrincipalDomainOrigin(objectPrincipal, objectOrigin);
nsCOMPtr<nsIURI> uri, domain;
objectPrincipal->GetURI(getter_AddRefs(uri));
if (uri) { // Object principal might be system
GetOriginFromURI(uri, objectOrigin);
}
objectPrincipal->GetDomain(getter_AddRefs(domain));
if (domain) {
GetOriginFromURI(domain, objectDomain);
}
}
NS_ConvertUTF8toUTF16 objectOriginUnicode(objectOrigin);
NS_ConvertUTF8toUTF16 objectDomainUnicode(objectDomain);
nsXPIDLString errorMsg;
const PRUnichar *formatStrings[] =
{
subjectOriginUnicode.get(),
className.get(),
JSValIDToString(cx, aProperty),
objectOriginUnicode.get()
objectOriginUnicode.get(),
subjectDomainUnicode.get(),
objectDomainUnicode.get()
};
PRUint32 length = NS_ARRAY_LENGTH(formatStrings);
// XXXbz Our localization system is stupid and can't handle not showing
// some strings that get passed in. Which means that we have to get
// our length precisely right: it has to be exactly the number of
// strings our format string wants. This means we'll have to move
// strings in the array as needed, sadly...
if (nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin ||
!objectPrincipal) {
stringName.AppendLiteral("OnlySubject");
--length;
length -= 3;
} else {
// default to a length that doesn't include the domains, then
// increase it as needed.
length -= 2;
if (!subjectDomainUnicode.IsEmpty()) {
stringName.AppendLiteral("SubjectDomain");
length += 1;
}
if (!objectDomainUnicode.IsEmpty()) {
stringName.AppendLiteral("ObjectDomain");
length += 1;
if (length != NS_ARRAY_LENGTH(formatStrings)) {
// We have an object domain but not a subject domain.
// Scoot our string over one slot. See the XXX comment
// above for why we need to do this.
formatStrings[length-1] = formatStrings[length];
}
}
}
// We need to keep our existing failure rv and not override it

View File

@ -102,12 +102,7 @@ else
MAKE_JARS_TARGET = $(FINAL_TARGET)
endif
#
# The VERSION_NUMBER is suffixed onto the end of the DLLs we ship.
# Since the longest of these is 5 characters without the suffix,
# be sure to not set VERSION_NUMBER to anything longer than 3
# characters for Win16's sake.
#
VERSION_NUMBER = 50
ifeq ($(HOST_OS_ARCH),WINNT)

View File

@ -5082,6 +5082,14 @@ MOZ_ARG_WITH_STRING(branding,
[ --with-branding=dir Use branding from the specified directory.],
MOZ_BRANDING_DIRECTORY=$withval)
dnl For Firefox, we always want MOZ_BRANDING_DIRECTORY to point somewhere, so
dnl if it's not set make it point to the default branding location now. Other
dnl products need MOZ_BRANDING_DIRECTORY to NOT be set, in order to use their
dnl default branding (ie, only set it when using non-default branding).
if test "$MOZ_BUILD_APP" = "browser" -a -z "$MOZ_BRANDING_DIRECTORY"; then
MOZ_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
fi
REAL_BRANDING_DIRECTORY="${MOZ_BRANDING_DIRECTORY}"
if test -z "$REAL_BRANDING_DIRECTORY"; then
REAL_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
@ -6283,21 +6291,6 @@ MOZ_ARG_DISABLE_BOOL(zipwriter,
MOZ_ZIPWRITER=1 )
AC_SUBST(MOZ_ZIPWRITER)
dnl ========================================================
dnl = Enable Ultrasparc specific optimizations for JS
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(js-ultrasparc,
[ --enable-js-ultrasparc Use UltraSPARC optimizations in JS],
JS_ULTRASPARC_OPTS=1,
JS_ULTRASPARC_OPTS= )
dnl only enable option for ultrasparcs
if test `echo "$target_os" | grep -c \^solaris 2>/dev/null` = 0 -o \
"$OS_TEST" != "sun4u"; then
JS_ULTRASPARC_OPTS=
fi
AC_SUBST(JS_ULTRASPARC_OPTS)
dnl ========================================================
dnl = Hildon and OSSO checks
dnl ========================================================
@ -7960,6 +7953,9 @@ if test "$NECKO_WIFI"; then
NECKO_WIFI=1
elif test "$OS_ARCH" = "WINCE"; then
NECKO_WIFI=1
elif test "$OS_ARCH" = "OS2"; then
dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
NECKO_WIFI=
else
AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
fi

View File

@ -130,17 +130,6 @@ nsBaseContentList::GetNodeAt(PRUint32 aIndex)
return mElements.SafeObjectAt(aIndex);
}
void
nsBaseContentList::AppendElement(nsIContent *aContent)
{
mElements.AppendObject(aContent);
}
void
nsBaseContentList::RemoveElement(nsIContent *aContent)
{
mElements.RemoveObject(aContent);
}
PRInt32
nsBaseContentList::IndexOf(nsIContent *aContent, PRBool aDoFlush)
@ -154,20 +143,27 @@ nsBaseContentList::IndexOf(nsIContent* aContent)
return IndexOf(aContent, PR_TRUE);
}
void
nsBaseContentList::Reset()
void nsBaseContentList::AppendElement(nsIContent *aContent)
{
mElements.Clear();
mElements.AppendObject(aContent);
}
// static
void
nsBaseContentList::Shutdown()
void nsBaseContentList::RemoveElement(nsIContent *aContent)
{
mElements.RemoveObject(aContent);
}
void nsBaseContentList::InsertElementAt(nsIContent* aContent, PRInt32 aIndex)
{
NS_ASSERTION(aContent, "Element to insert must not be null");
mElements.InsertObjectAt(aContent, aIndex);
}
//static
void nsBaseContentList::Shutdown() {
NS_IF_RELEASE(gCachedContentList);
}
// nsFormContentList
nsFormContentList::nsFormContentList(nsIDOMHTMLFormElement *aForm,

View File

@ -89,12 +89,30 @@ public:
virtual nsIContent* GetNodeAt(PRUint32 aIndex);
virtual PRInt32 IndexOf(nsIContent* aContent);
PRUint32 Length() const {
return mElements.Count();
}
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsBaseContentList, nsINodeList)
void AppendElement(nsIContent *aContent);
void RemoveElement(nsIContent *aContent);
/**
* Insert the element at a given index, shifting the objects at
* the given index and later to make space.
* @param aContent Element to insert, must not be null
* @param aIndex Index to insert the element at.
*/
void InsertElementAt(nsIContent* aContent, PRInt32 aIndex);
void RemoveElement(nsIContent *aContent);
void Reset() {
mElements.Clear();
}
virtual PRInt32 IndexOf(nsIContent *aContent, PRBool aDoFlush);
void Reset();
static void Shutdown();

View File

@ -6251,7 +6251,7 @@ nsDocument::FlushPendingNotifications(mozFlushType aType)
}
// If we have a parent we must flush the parent too to ensure that our
// container is reflown if its size was changed. But if it's not safe to
// container is reflowed if its size was changed. But if it's not safe to
// flush ourselves, then don't flush the parent, since that can cause things
// like resizes of our frame's widget, which we can't handle while flushing
// is unsafe.

View File

@ -43,15 +43,7 @@
#ifndef nsGenericDOMDataNode_h___
#define nsGenericDOMDataNode_h___
// This bit is set to indicate that if the text node changes to
// non-whitespace, we may need to create a frame for it. This bit must
// not be set on nodes that already have a frame.
#define NS_CREATE_FRAME_IF_NON_WHITESPACE (1 << NODE_TYPE_SPECIFIC_BITS_OFFSET)
// This bit is set to indicate that if the text node changes to
// whitespace, we may need to reframe it (or its ancestors).
#define NS_REFRAME_IF_WHITESPACE (1 << (NODE_TYPE_SPECIFIC_BITS_OFFSET + 1))
#include "nsIContent.h"
#include "nsIDOMCharacterData.h"
#include "nsIDOMEventTarget.h"
#include "nsIDOM3Text.h"
@ -66,6 +58,18 @@
#include "nsISMILAttr.h"
#endif // MOZ_SMIL
// This bit is set to indicate that if the text node changes to
// non-whitespace, we may need to create a frame for it. This bit must
// not be set on nodes that already have a frame.
#define NS_CREATE_FRAME_IF_NON_WHITESPACE (1 << NODE_TYPE_SPECIFIC_BITS_OFFSET)
// This bit is set to indicate that if the text node changes to
// whitespace, we may need to reframe it (or its ancestors).
#define NS_REFRAME_IF_WHITESPACE (1 << (NODE_TYPE_SPECIFIC_BITS_OFFSET + 1))
// This bit is set to indicate that the text may be part of a selection.
#define NS_TEXT_IN_SELECTION (1 << (NODE_TYPE_SPECIFIC_BITS_OFFSET + 2))
class nsIDOMAttr;
class nsIDOMEventListener;
class nsIDOMNodeList;

View File

@ -760,7 +760,7 @@ nsObjectLoadingContent::EnsureInstantiation(nsIPluginInstance** aInstance)
if (nsiframe->GetStateBits() & NS_FRAME_FIRST_REFLOW) {
// A frame for this plugin element already exists now, but it has
// not been reflown yet. Force a reflow now so that we don't end
// not been reflowed yet. Force a reflow now so that we don't end
// up initializing a plugin before knowing its size. Also re-fetch
// the frame, as flushing can cause the frame to be deleted.
frame = GetExistingFrame(eFlushLayout);
@ -1706,7 +1706,7 @@ nsObjectLoadingContent::TryInstantiate(const nsACString& aMIMEType,
if (!instance) {
// The frame has no plugin instance yet. If the frame hasn't been
// reflown yet, do nothing as once the reflow happens we'll end up
// reflowed yet, do nothing as once the reflow happens we'll end up
// instantiating the plugin with the correct size n' all (which
// isn't known until we've done the first reflow). But if the
// frame does have a plugin instance already, be sure to
@ -1714,7 +1714,7 @@ nsObjectLoadingContent::TryInstantiate(const nsACString& aMIMEType,
// chanced since it was instantiated.
nsIFrame* iframe = do_QueryFrame(frame);
if (iframe->GetStateBits() & NS_FRAME_FIRST_REFLOW) {
LOG(("OBJLC [%p]: Frame hasn't been reflown yet\n", this));
LOG(("OBJLC [%p]: Frame hasn't been reflowed yet\n", this));
return NS_OK; // Not a failure to have no frame
}
}

View File

@ -317,8 +317,10 @@ nsRange::ContentRemoved(nsIDocument* aDocument,
nsINode* container = NODE_FROM(aContainer, aDocument);
// Adjust position if a sibling was removed...
if (container == mStartParent && aIndexInContainer < mStartOffset) {
--mStartOffset;
if (container == mStartParent) {
if (aIndexInContainer < mStartOffset) {
--mStartOffset;
}
}
// ...or gravitate if an ancestor was removed.
else if (nsContentUtils::ContentIsDescendantOf(mStartParent, aChild)) {
@ -327,8 +329,10 @@ nsRange::ContentRemoved(nsIDocument* aDocument,
}
// Do same thing for end boundry.
if (container == mEndParent && aIndexInContainer < mEndOffset) {
--mEndOffset;
if (container == mEndParent) {
if (aIndexInContainer < mEndOffset) {
--mEndOffset;
}
}
else if (nsContentUtils::ContentIsDescendantOf(mEndParent, aChild)) {
mEndParent = container;

View File

@ -45,6 +45,8 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
_TEST_FILES = \
test_bug226361.xhtml \
bug226361_iframe.xhtml \
test_bug238987.html \
test_bug288392.html \
test_bug299673.html \

View File

@ -0,0 +1,47 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=226361
-->
<head>
<title>Test for Bug 226361</title>
</head>
<body id="body">
<p id="display">
<a id="a1" tabindex="3" href="http://home.mozilla.org">This is the 1st
link but the 3rd tabindex</a><br />
<br />
<a id="a2" tabindex="4" href="http://home.mozilla.org">This is the 2nd
link but the 4th tabindex</a><br />
<br />
<a id="a3" tabindex="1" href="http://home.mozilla.org">This is the 3rd
link but the 1st tabindex</a><br />
<br />
<a id="a4" tabindex="5" href="http://home.mozilla.org">This is the 4th
link but the 5th tabindex</a><br />
<br />
<a id="a5" tabindex="2" href="http://home.mozilla.org">This is the 5th
link but the 2nd tabindex</a>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>

View File

@ -0,0 +1,103 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=226361
-->
<head>
<title>Test for Bug 226361</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body id="body1">
<p id="display">
<a id="b1" tabindex="1" href="http://home.mozilla.org">start</a><br />
<br />
<iframe id="iframe" tabindex="2" src="bug226361_iframe.xhtml"></iframe>
<a id="b2" tabindex="3" href="http://home.mozilla.org">end</a>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
<![CDATA[
/** Test for Bug 226361 **/
// accessibility.tabfocus must be set to value 7 before running test also
// on a mac.
function setOrRestoreTabFocus(newValue) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const prefSvcContractID = "@mozilla.org/preferences-service;1";
const prefSvcIID = Components.interfaces.nsIPrefService;
var prefs = Components.classes[prefSvcContractID].getService(prefSvcIID)
.getBranch("accessibility.");
if (!newValue) {
prefs.clearUserPref("tabfocus");
} else {
prefs.setIntPref("tabfocus", newValue);
}
}
// =================================
var doc = document;
function tab_to(id) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var wu = doc.defaultView.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindowUtils);
wu.sendKeyEvent('keypress', 9, 0, 0);
is(doc.activeElement.id, id, "element with id=" + id + " should have focus");
}
function tab_iframe() {
doc = document;
tab_to('iframe');
// inside iframe
doc = document.getElementById('iframe').contentDocument
tab_to('a3');tab_to('a5');tab_to('a1');tab_to('a2');tab_to('a4');
}
function doTest() {
setOrRestoreTabFocus(7);
try {
window.getSelection().removeAllRanges();
document.getElementById('body1').focus();
is(document.activeElement.id, document.body.id, "body element should be focused");
doc = document;
tab_to('b1');
tab_iframe();
doc=document
document.getElementById('iframe').focus()
tab_to('b2');
// Change tabindex so the next TAB goes back to the IFRAME
document.getElementById('iframe').setAttribute('tabindex','4');
tab_iframe();
} finally {
setOrRestoreTabFocus(0);
}
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doTest);
]]>
</script>
</pre>
</body>
</html>

View File

@ -207,12 +207,10 @@ public:
// Returns true if we can handle this MIME type.
// If it returns true, then it also returns a null-terminated list
// of supported codecs in *aSupportedCodecs, and a null-terminated list
// of codecs that *may* be supported in *aMaybeSupportedCodecs. These
// lists should not be freed, they area static data.
// of supported codecs in *aSupportedCodecs. This
// list should not be freed, it is static data.
static PRBool CanHandleMediaType(const char* aMIMEType,
const char*** aSupportedCodecs,
const char*** aMaybeSupportedCodecs);
const char*** aSupportedCodecs);
// Returns true if we should handle this MIME type when it appears
// as an <object> or as a toplevel page. If, in practice, our support

View File

@ -117,8 +117,15 @@ NS_IMETHODIMP
nsHTMLAudioElement::Initialize(nsISupports* aOwner, JSContext* aContext,
JSObject *aObj, PRUint32 argc, jsval *argv)
{
// Audio elements created using "new Audio(...)" should have
// 'autobuffer' set (since the script must intend to play the audio)
nsresult rv = SetAttr(kNameSpaceID_None, nsGkAtoms::autobuffer,
NS_LITERAL_STRING("autobuffer"), PR_TRUE);
if (NS_FAILED(rv))
return rv;
if (argc <= 0) {
// Nothing to do here if we don't get any arguments.
// Nothing more to do here if we don't get any arguments.
return NS_OK;
}

View File

@ -2253,10 +2253,14 @@ nsFormControlList::AddElementToTable(nsIFormControl* aChild,
nsBaseContentList *list = new nsBaseContentList();
NS_ENSURE_TRUE(list, NS_ERROR_OUT_OF_MEMORY);
list->AppendElement(content);
NS_ASSERTION(content->GetParent(), "Item in list without parent");
// Determine the ordering between the new and old element.
PRBool newFirst = nsContentUtils::PositionIsBefore(newChild, content);
list->AppendElement(newFirst ? newChild : content);
list->AppendElement(newFirst ? content : newChild);
// Add the new child too
list->AppendElement(newChild);
nsCOMPtr<nsISupports> listSupports =
do_QueryInterface(static_cast<nsIDOMNodeList*>(list));
@ -2273,12 +2277,31 @@ nsFormControlList::AddElementToTable(nsIFormControl* aChild,
nsBaseContentList *list = static_cast<nsBaseContentList *>
((nsIDOMNodeList *)nodeList.get());
PRInt32 oldIndex = list->IndexOf(newChild, PR_FALSE);
NS_ASSERTION(list->Length() > 1,
"List should have been converted back to a single element");
// Add the new child only if it's not in our list already
if (oldIndex < 0) {
list->AppendElement(newChild);
if(nsContentUtils::PositionIsBefore(list->GetNodeAt(list->Length() - 1), newChild)) {
list->AppendElement(newChild);
return NS_OK;
}
// first is the first possible insertion index, last is the last possible
// insertion index
PRUint32 first = 0;
PRUint32 last = list->Length() - 1;
PRUint32 mid;
//Stop when there is only one index in our range
while (last != first) {
mid = (first + last) / 2;
if (nsContentUtils::PositionIsBefore(newChild, list->GetNodeAt(mid)))
last = mid;
else
first = mid + 1;
}
list->InsertElementAt(newChild, first);
}
}

View File

@ -985,10 +985,6 @@ static const char* gOggCodecs[] = {
nsnull
};
static const char* gOggMaybeCodecs[] = {
nsnull
};
static PRBool IsOggEnabled()
{
return nsContentUtils::GetBoolPref("media.ogg.enabled");
@ -1022,11 +1018,6 @@ static const char* gWaveCodecs[] = {
nsnull
};
static const char* gWaveMaybeCodecs[] = {
"0", // Microsoft Unknown Wave Format
nsnull
};
static PRBool IsWaveEnabled()
{
return nsContentUtils::GetBoolPref("media.wave.enabled");
@ -1046,20 +1037,17 @@ static PRBool IsWaveType(const nsACString& aType)
/* static */
PRBool nsHTMLMediaElement::CanHandleMediaType(const char* aMIMEType,
const char*** aCodecList,
const char*** aMaybeCodecList)
const char*** aCodecList)
{
#ifdef MOZ_OGG
if (IsOggType(nsDependentCString(aMIMEType))) {
*aCodecList = gOggCodecs;
*aMaybeCodecList = gOggMaybeCodecs;
return PR_TRUE;
}
#endif
#ifdef MOZ_WAVE
if (IsWaveType(nsDependentCString(aMIMEType))) {
*aCodecList = gWaveCodecs;
*aMaybeCodecList = gWaveMaybeCodecs;
return PR_TRUE;
}
#endif
@ -1107,9 +1095,8 @@ static CanPlayStatus GetCanPlay(const nsAString& aType)
NS_ConvertUTF16toUTF8 mimeTypeUTF8(mimeType);
const char** supportedCodecs;
const char** maybeSupportedCodecs;
if (!nsHTMLMediaElement::CanHandleMediaType(mimeTypeUTF8.get(),
&supportedCodecs, &maybeSupportedCodecs))
&supportedCodecs))
return CANPLAY_NO;
nsAutoString codecs;
@ -1126,9 +1113,7 @@ static CanPlayStatus GetCanPlay(const nsAString& aType)
while (tokenizer.hasMoreTokens()) {
const nsSubstring& token = tokenizer.nextToken();
if (CodecListContains(maybeSupportedCodecs, token)) {
result = CANPLAY_MAYBE;
} else if (!CodecListContains(supportedCodecs, token)) {
if (!CodecListContains(supportedCodecs, token)) {
// Totally unsupported codec
return CANPLAY_NO;
}

View File

@ -83,6 +83,7 @@ _TEST_FILES = test_bug589.html \
test_bug332893-4.html \
test_bug332893-5.html \
test_bug332893-6.html \
test_bug332893-7.html \
bug340800_iframe.txt \
test_bug340800.html \
test_bug353415-1.html \

View File

@ -18,13 +18,13 @@
form1.insertBefore(input2, input1);
is(form1.elements["input"].length, "3", "Form 1 'input' has the correct length");
todo(form1.elements["input"][0].value == "2", "Form 1 element 1 is correct");
todo(form1.elements["input"][1].value == "1", "Form 1 element 2 is correct");
todo(form1.elements["input"][2].value == "3", "Form 1 element 3 is correct");
is(form1.elements["input"][0].value, "2", "Form 1 element 1 is correct");
is(form1.elements["input"][1].value, "1", "Form 1 element 2 is correct");
is(form1.elements["input"][2].value, "3", "Form 1 element 3 is correct");
todo(form1.elements["input"][0].id == "input2", "Form 1 element 1 id is correct");
todo(form1.elements["input"][1].id == "input1", "Form 1 element 2 id is correct");
todo(form1.elements["input"][2].id == "input3", "Form 1 element 3 id is correct");
is(form1.elements["input"][0].id, "input2", "Form 1 element 1 id is correct");
is(form1.elements["input"][1].id, "input1", "Form 1 element 2 id is correct");
is(form1.elements["input"][2].id, "input3", "Form 1 element 3 id is correct");
</script>
</body>
</html>

View File

@ -18,13 +18,13 @@
form1.insertBefore(input2, input1);
is(form1.elements["input"].length, "3", "Form 1 'input' has the correct length");
todo(form1.elements["input"][0].value == "2", "Form 1 element 1 is correct");
todo(form1.elements["input"][1].value == "1", "Form 1 element 2 is correct");
todo(form1.elements["input"][2].value == "3", "Form 1 element 3 is correct");
is(form1.elements["input"][0].value, "2", "Form 1 element 1 is correct");
is(form1.elements["input"][1].value, "1", "Form 1 element 2 is correct");
is(form1.elements["input"][2].value, "3", "Form 1 element 3 is correct");
todo(form1.elements["input"][0].id == "input", "Form 1 element 1 id is correct");
todo(form1.elements["input"][1].id == "input1", "Form 1 element 2 id is correct");
todo(form1.elements["input"][2].id == "input3", "Form 1 element 3 id is correct");
is(form1.elements["input"][0].id, "input", "Form 1 element 1 id is correct");
is(form1.elements["input"][1].id, "input1", "Form 1 element 2 id is correct");
is(form1.elements["input"][2].id, "input3", "Form 1 element 3 id is correct");
</script>
</body>
</html>

View File

@ -18,11 +18,11 @@
form1.insertBefore(input2, input1);
is(form1.elements["input"].length, "3", "Form 1 'input' has the correct length");
todo(form1.elements["input"][0].value == "2", "Form 1 element 1 is correct");
todo(form1.elements["input"][1].value == "1", "Form 1 element 2 is correct");
is(form1.elements["input"][0].value, "2", "Form 1 element 1 is correct");
is(form1.elements["input"][1].value, "1", "Form 1 element 2 is correct");
todo(form1.elements["input"][0].id == "input", "Form 1 element 1 id is correct");
todo(form1.elements["input"][1].id == "input1", "Form 1 element 2 id is correct");
is(form1.elements["input"][0].id, "input", "Form 1 element 1 id is correct");
is(form1.elements["input"][1].id, "input1", "Form 1 element 2 id is correct");
</script>
</body>
</html>

View File

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<form id="form1">
<input id="input1" type="input" name="input" value="1"/>
<input id="input2" type="input" name="input" value="2"/>
<input id="input3" type="input" name="input" value="3"/>
<input id="input4" type="input" name="input" value="4"/>
<input id="input5" type="input" name="input" value="5"/>
<input id="input6" type="input" name="input" value="6"/>
<input id="input7" type="input" name="input" value="7"/>
<input id="input8" type="input" name="input" value="8"/>
<input id="input9" type="input" name="input" value="9"/>
<input id="input10" type="input" name="input" value="10"/>
</form>
<script>
var input1 = document.getElementById("input1");
var input2 = document.getElementById("input2");
var input3 = document.getElementById("input3");
var input4 = document.getElementById("input4");
var input5 = document.getElementById("input5");
var input6 = document.getElementById("input6");
var input7 = document.getElementById("input7");
var input8 = document.getElementById("input8");
var input9 = document.getElementById("input9");
var input10 = document.getElementById("input10");
var form1 = document.getElementById("form1");
form1.insertBefore(input2, input1);
form1.insertBefore(input10, input6);
form1.insertBefore(input8, input4);
form1.insertBefore(input9, input2);
is(form1.elements["input"].length, "10", "Form 1 'input' has the correct length");
is(form1.elements["input"][0].value, "9", "Form 1 element 1 is correct");
is(form1.elements["input"][1].value, "2", "Form 1 element 2 is correct");
is(form1.elements["input"][2].value, "1", "Form 1 element 3 is correct");
is(form1.elements["input"][3].value, "3", "Form 1 element 4 is correct");
is(form1.elements["input"][4].value, "8", "Form 1 element 5 is correct");
is(form1.elements["input"][5].value, "4", "Form 1 element 6 is correct");
is(form1.elements["input"][6].value, "5", "Form 1 element 7 is correct");
is(form1.elements["input"][7].value, "10", "Form 1 element 8 is correct");
is(form1.elements["input"][8].value, "6", "Form 1 element 9 is correct");
is(form1.elements["input"][9].value, "7", "Form 1 element 10 is correct");
is(form1.elements["input"][0].id, "input9", "Form 1 element 1 id is correct");
is(form1.elements["input"][1].id, "input2", "Form 1 element 2 id is correct");
is(form1.elements["input"][2].id, "input1", "Form 1 element 3 id is correct");
is(form1.elements["input"][3].id, "input3", "Form 1 element 4 id is correct");
is(form1.elements["input"][4].id, "input8", "Form 1 element 5 id is correct");
is(form1.elements["input"][5].id, "input4", "Form 1 element 6 id is correct");
is(form1.elements["input"][6].id, "input5", "Form 1 element 7 id is correct");
is(form1.elements["input"][7].id, "input10", "Form 1 element 8 id is correct");
is(form1.elements["input"][8].id, "input6", "Form 1 element 9 id is correct");
is(form1.elements["input"][9].id, "input7", "Form 1 element 10 id is correct");
</script>
</body>
</html>

View File

@ -15,14 +15,11 @@ function check_wave(v, enabled) {
check("audio/wave; codecs=", "probably");
check("audio/wave; codecs=\"\"", "probably");
// Maybe-supported Wave codecs
check("audio/wave; codecs=0", "maybe");
check("audio/wave; codecs=\"0, 1\"", "maybe");
// Unsupported Wave codecs
check("audio/wave; codecs=0", "");
check("audio/wave; codecs=2", "");
check("audio/wave; codecs=xyz,0", "");
check("audio/wave; codecs=0,xyz", "");
check("audio/wave; codecs=xyz,1", "");
check("audio/wave; codecs=1,xyz", "");
check("audio/wave; codecs=\"xyz, 1\"", "");
// empty codec names
check("audio/wave; codecs=,", "");

View File

@ -19,7 +19,7 @@ for (var i = 0; i < gAudioTests.length; ++i) {
if (!a1.canPlayType(test.type))
continue;
a1.setAttribute("autobuffer", "");
is(a1.getAttribute("autobuffer"), "autobuffer", "Autobuffer automatically set");
a1.addEventListener('load', function(event) {
is(event.target.networkState, HTMLMediaElement.NETWORK_LOADED,
"Audio " + event.target.currentSrc + " loaded");

View File

@ -20,7 +20,7 @@ for (var i = 0; i < gAudioTests.length; ++i) {
continue;
var a1 = new Audio(test.name);
a1.setAttribute("autobuffer", "");
is(a1.getAttribute("autobuffer"), "autobuffer", "Autobuffer automatically set");
a1.addEventListener('load', function(event) {
is(event.target.networkState, HTMLMediaElement.NETWORK_LOADED,
"Audio " + event.target.currentSrc + " loaded");

View File

@ -549,6 +549,19 @@ BoxBlur(const PRUint8 *aInput, PRUint8 *aOutput,
}
}
static PRUint32
GetBlurBoxSize(double aStdDev)
{
NS_ASSERTION(aStdDev >= 0, "Negative standard deviations not allowed");
double size = aStdDev*3*sqrt(2*M_PI)/4;
// Doing super-large blurs accurately isn't very important.
PRUint32 max = 1024;
if (size > max)
return max;
return PRUint32(floor(size + 0.5));
}
nsresult
nsSVGFEGaussianBlurElement::GetDXY(PRUint32 *aDX, PRUint32 *aDY,
const nsSVGFilterInstance& aInstance)
@ -569,8 +582,11 @@ nsSVGFEGaussianBlurElement::GetDXY(PRUint32 *aDX, PRUint32 *aDY,
if (stdX == 0 || stdY == 0)
return NS_ERROR_UNEXPECTED;
*aDX = PRUint32(floor(stdX * 3*sqrt(2*M_PI)/4 + 0.5));
*aDY = PRUint32(floor(stdY * 3*sqrt(2*M_PI)/4 + 0.5));
// If the box size is greater than twice the temporary surface size
// in an axis, then each pixel will be set to the average of all the
// other pixel values.
*aDX = GetBlurBoxSize(stdX);
*aDY = GetBlurBoxSize(stdY);
return NS_OK;
}

View File

@ -21,7 +21,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=378518
</bindings>
<!-- test resuls are displayed in the html:body -->
<!-- test results are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml">
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=378518"
target="_blank">Mozilla Bug 378518</a>

View File

@ -480,7 +480,7 @@ txMozillaXMLOutput::startElement(nsIAtom* aPrefix,
lname = do_GetAtom(aLocalName);
}
// No biggie if we loose the prefix due to OOM
// No biggie if we lose the prefix due to OOM
NS_ENSURE_TRUE(lname, NS_ERROR_OUT_OF_MEMORY);
// Check that it's a valid name

View File

@ -1457,7 +1457,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIMdbStore, NS_IMDBSTORE_IID)
**| current seed value (which implies the iteration is less than total) in
**| between to cursor calls that actually access collection content. By
**| default, a cursor should assume this attribute is false until specified,
**| so that iterations quietly try to re-sync when they loose coherence.
**| so that iterations quietly try to re-sync when they lose coherence.
|*/
#define NS_IMDBCURSOR_IID_STR "a0c37337-6ebc-474c-90db-e65ea0b850aa"

View File

@ -135,6 +135,7 @@ EXPORTS
sqlite3_result_double
sqlite3_result_error
sqlite3_result_error16
sqlite3_result_error_nomem
sqlite3_result_int
sqlite3_result_int64
sqlite3_result_null

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