mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Merge the last PGO-green changeset to m-c.
This commit is contained in:
commit
5116d5a930
@ -60,7 +60,7 @@ FocusManager::IsFocused(const Accessible* aAccessible) const
|
||||
DocAccessible* doc =
|
||||
GetAccService()->GetDocAccessible(focusedNode->OwnerDoc());
|
||||
return aAccessible ==
|
||||
(doc ? doc->GetAccessibleOrContainer(focusedNode) : nullptr);
|
||||
(doc ? doc->GetAccessibleOrContainer(focusedNode) : nullptr);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -2846,7 +2846,21 @@ Accessible::IsWidget() const
|
||||
bool
|
||||
Accessible::IsActiveWidget() const
|
||||
{
|
||||
return FocusMgr()->IsFocused(this);
|
||||
if (FocusMgr()->HasDOMFocus(mContent))
|
||||
return true;
|
||||
|
||||
// If text entry of combobox widget has a focus then the combobox widget is
|
||||
// active.
|
||||
if (mRoleMapEntry && mRoleMapEntry->Is(nsGkAtoms::combobox)) {
|
||||
PRUint32 childCount = ChildCount();
|
||||
for (PRUint32 idx = 0; idx < childCount; idx++) {
|
||||
Accessible* child = mChildren.ElementAt(idx);
|
||||
if (child->Role() == roles::ENTRY)
|
||||
return FocusMgr()->HasDOMFocus(child->GetContent());
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -1221,11 +1221,11 @@ DocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
|
||||
void
|
||||
DocAccessible::ARIAActiveDescendantChanged(nsIContent* aElm)
|
||||
{
|
||||
if (FocusMgr()->HasDOMFocus(aElm)) {
|
||||
Accessible* widget = GetAccessible(aElm);
|
||||
if (widget && widget->IsActiveWidget()) {
|
||||
nsAutoString id;
|
||||
if (aElm->GetAttr(kNameSpaceID_None, nsGkAtoms::aria_activedescendant, id)) {
|
||||
nsIDocument* DOMDoc = aElm->OwnerDoc();
|
||||
dom::Element* activeDescendantElm = DOMDoc->GetElementById(id);
|
||||
dom::Element* activeDescendantElm = aElm->OwnerDoc()->GetElementById(id);
|
||||
if (activeDescendantElm) {
|
||||
Accessible* activeDescendant = GetAccessible(activeDescendantElm);
|
||||
if (activeDescendant) {
|
||||
|
@ -70,6 +70,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429547
|
||||
|
||||
gQueue.push(new synthFocus("container", new focusChecker("item1")));
|
||||
gQueue.push(new changeARIAActiveDescendant("container", "item2"));
|
||||
|
||||
gQueue.push(new synthFocus("combobox_entry", new focusChecker("combobox_entry")));
|
||||
gQueue.push(new changeARIAActiveDescendant("combobox", "combobox_option2"));
|
||||
|
||||
todo(false, "No focus for inserted element, bug 687011");
|
||||
//gQueue.push(new insertItemNFocus("container", "item3"));
|
||||
|
||||
@ -87,6 +91,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429547
|
||||
title="Support aria-activedescendant usage in nsIAccesible::TakeFocus()">
|
||||
Mozilla Bug 429547
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=761102"
|
||||
title="Focus may be missed when ARIA active-descendant is changed on active composite widget">
|
||||
Mozilla Bug 761102
|
||||
</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
@ -96,5 +105,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=429547
|
||||
<div role="listitem" id="item1">item1</div>
|
||||
<div role="listitem" id="item2">item2</div>
|
||||
</div>
|
||||
|
||||
<div role="combobox" id="combobox">
|
||||
<input id="combobox_entry">
|
||||
<ul>
|
||||
<li role="option" id="combobox_option1">option1</li>
|
||||
<li role="option" id="combobox_option2">option2</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -44,9 +44,9 @@ 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-persistent-connections-per-server", 4);
|
||||
pref("network.http.max-persistent-connections-per-proxy", 4);
|
||||
pref("network.http.max-connections", 20);
|
||||
pref("network.http.max-persistent-connections-per-server", 6);
|
||||
pref("network.http.max-persistent-connections-per-proxy", 20);
|
||||
|
||||
// See bug 545869 for details on why these are set the way they are
|
||||
pref("network.buffer.cache.count", 24);
|
||||
@ -507,7 +507,7 @@ pref("dom.ipc.processPriorityManager.enabled", true);
|
||||
pref("dom.ipc.processPriorityManager.gracePeriodMS", 1000);
|
||||
pref("hal.processPriorityManager.gonk.masterOomAdjust", 0);
|
||||
pref("hal.processPriorityManager.gonk.foregroundOomAdjust", 1);
|
||||
pref("hal.processPriorityManager.gonk.backgroundOomAdjust", 2);
|
||||
pref("hal.processPriorityManager.gonk.backgroundOomAdjust", 6);
|
||||
pref("hal.processPriorityManager.gonk.masterNice", -1);
|
||||
pref("hal.processPriorityManager.gonk.foregroundNice", 0);
|
||||
pref("hal.processPriorityManager.gonk.backgroundNice", 10);
|
||||
|
@ -118,13 +118,28 @@ let FormAssistant = {
|
||||
|
||||
case "Forms:Select:Choice":
|
||||
let options = target.options;
|
||||
let valueChanged = false;
|
||||
if ("index" in json) {
|
||||
options.item(json.index).selected = true;
|
||||
if (options.selectedIndex != json.index) {
|
||||
options.selectedIndex = json.index;
|
||||
valueChanged = true;
|
||||
}
|
||||
} else if ("indexes" in json) {
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
options.item(i).selected = (json.indexes.indexOf(i) != -1);
|
||||
let newValue = (json.indexes.indexOf(i) != -1);
|
||||
if (options.item(i).selected != newValue) {
|
||||
options.item(i).selected = newValue;
|
||||
valueChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// only fire onchange event if any selected option is changed
|
||||
if (valueChanged) {
|
||||
let event = content.document.createEvent('HTMLEvents');
|
||||
event.initEvent('change', true, true);
|
||||
target.dispatchEvent(event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -509,6 +509,9 @@ var CustomEventManager = {
|
||||
case 'select-choicechange':
|
||||
FormsHelper.handleEvent(detail);
|
||||
break;
|
||||
case 'system-message-listener-ready':
|
||||
Services.obs.notifyObservers(null, 'system-message-listener-ready', null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
7
b2g/config/mozconfigs/common
Normal file
7
b2g/config/mozconfigs/common
Normal file
@ -0,0 +1,7 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This file is included at the top of all b2g mozconfigs
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common"
|
7
b2g/config/mozconfigs/common.override
Normal file
7
b2g/config/mozconfigs/common.override
Normal file
@ -0,0 +1,7 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This file is included at the bottom of all b2g mozconfigs
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common"
|
||||
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-b2g
|
||||
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j8"
|
||||
@ -15,3 +17,5 @@ ENABLE_MARIONETTE=1
|
||||
|
||||
# Enable dump() from JS.
|
||||
export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common"
|
||||
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-b2g
|
||||
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j8"
|
||||
@ -15,3 +17,5 @@ ENABLE_MARIONETTE=1
|
||||
|
||||
# Enable dump() from JS.
|
||||
export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -18,3 +18,5 @@ ENABLE_MARIONETTE=1
|
||||
|
||||
# Enable dump() from JS.
|
||||
export CXXFLAGS="-DMOZ_ENABLE_JS_DUMP -include $topsrcdir/gonk-toolchain/gonk-misc/Unicode.h -include $topsrcdir/gonk-toolchain/system/vold/ResponseCode.h"
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common"
|
||||
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-b2g
|
||||
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j8"
|
||||
@ -18,3 +20,5 @@ ENABLE_MARIONETTE=1
|
||||
|
||||
# Enable dump() from JS.
|
||||
export CXXFLAGS="-DMOZ_ENABLE_JS_DUMP -include $topsrcdir/gonk-toolchain/gonk-misc/Unicode.h -include $topsrcdir/gonk-toolchain/system/vold/ResponseCode.h"
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --enable-codesighs
|
||||
@ -36,3 +38,5 @@ ac_add_options --enable-application=b2g
|
||||
ENABLE_MARIONETTE=1
|
||||
ac_add_options --disable-elf-hack
|
||||
export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -38,3 +38,5 @@ ac_add_options --enable-application=b2g
|
||||
ENABLE_MARIONETTE=1
|
||||
ac_add_options --disable-elf-hack
|
||||
export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -1,4 +1,4 @@
|
||||
. $topsrcdir/build/macosx/common
|
||||
. $topsrcdir/build/macosx/mozconfig.common
|
||||
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
@ -26,3 +26,5 @@ ac_add_options --with-ccache
|
||||
ENABLE_MARIONETTE=1
|
||||
|
||||
export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common"
|
||||
|
||||
# for pgo
|
||||
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
|
||||
|
||||
@ -27,3 +29,5 @@ ac_add_options --enable-application=b2g
|
||||
ENABLE_MARIONETTE=1
|
||||
|
||||
export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP
|
||||
|
||||
. "$topsrcdir/b2g/config/mozconfigs/common.override"
|
||||
|
@ -126,7 +126,7 @@ ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
|
||||
libs::
|
||||
cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
|
||||
|
||||
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, firefox.js)
|
||||
GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js)
|
||||
|
||||
endif
|
||||
|
||||
@ -134,24 +134,24 @@ endif #} LIBXUL_SDK
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
libs::
|
||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.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
|
||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/mozicon128.png $(FINAL_TARGET)/icons
|
||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(FINAL_TARGET)/chrome/icons/default
|
||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(FINAL_TARGET)/chrome/icons/default
|
||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(FINAL_TARGET)/chrome/icons/default
|
||||
endif
|
||||
|
||||
libs:: $(srcdir)/profile/prefs.js
|
||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
|
||||
$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
# channel-prefs.js is handled separate from other prefs due to bug 756325
|
||||
libs:: $(srcdir)/profile/channel-prefs.js
|
||||
$(NSINSTALL) -D $(DIST)/bin/defaults/pref
|
||||
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(ACDEFINES) $^ > $(DIST)/bin/defaults/pref/channel-prefs.js
|
||||
$(NSINSTALL) -D $(FINAL_TARGET)/defaults/pref
|
||||
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(ACDEFINES) $^ > $(FINAL_TARGET)/defaults/pref/channel-prefs.js
|
||||
endif
|
||||
|
||||
libs:: $(srcdir)/blocklist.xml
|
||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
|
||||
$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
||||
|
@ -8,7 +8,7 @@ topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
DISTROEXT = $(call core_abspath,$(DIST))/bin/distribution/extensions
|
||||
DISTROEXT = $(call core_abspath,$(FINAL_TARGET))/distribution/extensions
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
|
@ -17,9 +17,6 @@ FILES := \
|
||||
|
||||
libs::
|
||||
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf.in > install.rdf
|
||||
$(INSTALL) $(FILES) $(DIST)/bin/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
||||
$(INSTALL) $(FILES) $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
||||
|
||||
install::
|
||||
$(SYSINSTALL) $(IFLAGS1) $(FILES) $(DESTDIR)$(mozappdir)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
|
||||
|
||||
GARBAGE += $(FILES)
|
||||
|
@ -146,14 +146,14 @@ XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs",
|
||||
#ifdef MOZ_SAFE_BROWSING
|
||||
XPCOMUtils.defineLazyGetter(this, "SafeBrowsing", function() {
|
||||
let tmp = {};
|
||||
Cu.import("resource://gre/modules/SafeBrowsing.jsm", tmp);
|
||||
Cu.import("resource:///modules/SafeBrowsing.jsm", tmp);
|
||||
return tmp.SafeBrowsing;
|
||||
});
|
||||
#endif
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "gBrowserNewTabPreloader", function () {
|
||||
let tmp = {};
|
||||
Cu.import("resource://gre/modules/BrowserNewTabPreloader.jsm", tmp);
|
||||
Cu.import("resource:///modules/BrowserNewTabPreloader.jsm", tmp);
|
||||
return new tmp.BrowserNewTabPreloader();
|
||||
});
|
||||
|
||||
|
@ -399,10 +399,6 @@
|
||||
</hbox>
|
||||
</panel>
|
||||
|
||||
<tooltip id="urlTooltip">
|
||||
<label crop="center" flex="1" class="tooltip-label"/>
|
||||
</tooltip>
|
||||
|
||||
<panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
|
||||
<hbox>
|
||||
<button class="ctrlTab-preview" flex="1"/>
|
||||
|
@ -53,3 +53,13 @@ tabpanels {
|
||||
.tabbrowser-tabs:not(:hover) > .tabbrowser-arrowscrollbox > .closing-tabs-spacer {
|
||||
transition: width .15s ease-out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Optimization for tabs that are restored lazily. We can save a good amount of
|
||||
* memory that to-be-restored tabs would otherwise consume simply by setting
|
||||
* their browsers to 'display: none' as that will prevent them from having to
|
||||
* create a presentation and the like.
|
||||
*/
|
||||
browser[pending] {
|
||||
display: none;
|
||||
}
|
||||
|
@ -58,8 +58,6 @@
|
||||
this._formattingEnabled = this._prefs.getBoolPref("formatting.enabled");
|
||||
this._mayTrimURLs = this._prefs.getBoolPref("trimURLs");
|
||||
|
||||
this._urlTooltip = document.getElementById("urlTooltip");
|
||||
|
||||
this.inputField.controllers.insertControllerAt(0, this._copyCutController);
|
||||
this.inputField.addEventListener("mousedown", this, false);
|
||||
this.inputField.addEventListener("mousemove", this, false);
|
||||
@ -410,26 +408,13 @@
|
||||
<body><![CDATA[
|
||||
if (this.focused || !this._contentIsCropped)
|
||||
return;
|
||||
if (this._tooltipTimer)
|
||||
clearTimeout(this._tooltipTimer);
|
||||
this._tooltipTimer = setTimeout(function (self) {
|
||||
self._tooltipTimer = 0;
|
||||
var label = self._urlTooltip.firstChild;
|
||||
label.value = self.value;
|
||||
var bO = self.boxObject;
|
||||
self._urlTooltip.maxWidth = bO.width;
|
||||
self._urlTooltip.showPopup(self, bO.screenX, bO.screenY + bO.height, "tooltip");
|
||||
}, 700, this);
|
||||
this.inputField.setAttribute("tooltiptext", this.value);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_hideURLTooltip">
|
||||
<body><![CDATA[
|
||||
if (this._tooltipTimer) {
|
||||
clearTimeout(this._tooltipTimer);
|
||||
this._tooltipTimer = 0;
|
||||
}
|
||||
this._urlTooltip.hidePopup();
|
||||
this.inputField.removeAttribute("tooltiptext");
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
DEPTH = ../../..
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
@ -3,11 +3,11 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DEPTH = ../../../../..
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = browser/components/safebrowsing/content/test
|
||||
relativesrcdir = @relativesrcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -2987,6 +2987,7 @@ let SessionStoreInternal = {
|
||||
// a tab gets closed before it's been properly restored
|
||||
browser.__SS_data = tabData;
|
||||
browser.__SS_restoreState = TAB_STATE_NEEDS_RESTORE;
|
||||
browser.setAttribute("pending", "true");
|
||||
tab.setAttribute("pending", "true");
|
||||
|
||||
// Make sure that set/getTabValue will set/read the correct data by
|
||||
@ -3171,6 +3172,7 @@ let SessionStoreInternal = {
|
||||
|
||||
// Set this tab's state to restoring
|
||||
browser.__SS_restoreState = TAB_STATE_RESTORING;
|
||||
browser.removeAttribute("pending");
|
||||
aTab.removeAttribute("pending");
|
||||
|
||||
// Remove the history listener, since we no longer need it once we start restoring
|
||||
@ -4335,6 +4337,9 @@ let SessionStoreInternal = {
|
||||
// The browser is no longer in any sort of restoring state.
|
||||
delete browser.__SS_restoreState;
|
||||
|
||||
aTab.removeAttribute("pending");
|
||||
browser.removeAttribute("pending");
|
||||
|
||||
// We want to decrement window.__SS_tabsToRestore here so that we always
|
||||
// decrement it AFTER a tab is done restoring or when a tab gets "reset".
|
||||
window.__SS_tabsToRestore--;
|
||||
|
7
browser/config/mozconfigs/common
Normal file
7
browser/config/mozconfigs/common
Normal file
@ -0,0 +1,7 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This file is included by all browser mozconfigs
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common"
|
@ -22,3 +22,5 @@ ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -16,3 +16,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -5,3 +5,5 @@ ac_add_options --enable-update-packaging
|
||||
|
||||
. $topsrcdir/build/unix/mozconfig.linux
|
||||
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -36,3 +36,5 @@ ac_add_options --with-ccache=/usr/bin/ccache
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -18,3 +18,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -26,3 +26,5 @@ ac_add_options --disable-crashreporter
|
||||
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -24,3 +24,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -29,3 +29,5 @@ ac_add_options --with-ccache=/usr/bin/ccache
|
||||
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -22,3 +22,5 @@ ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -16,3 +16,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -5,3 +5,5 @@ ac_add_options --enable-update-packaging
|
||||
|
||||
. $topsrcdir/build/unix/mozconfig.linux
|
||||
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -36,3 +36,5 @@ ac_add_options --with-ccache=/usr/bin/ccache
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -18,3 +18,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -24,3 +24,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -29,3 +29,5 @@ ac_add_options --with-ccache=/usr/bin/ccache
|
||||
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -26,3 +26,5 @@ ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -20,3 +20,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -24,3 +24,5 @@ export MOZ_PKG_SPECIAL="shark"
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
ac_add_options --with-ccache
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,4 +1,5 @@
|
||||
. $topsrcdir/build/macosx/mozconfig.leopard
|
||||
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-trace-malloc
|
||||
ac_add_options --enable-signmar
|
||||
@ -14,3 +15,5 @@ ac_add_options --with-macbundlename-prefix=Firefox
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,4 +1,4 @@
|
||||
. $topsrcdir/build/macosx/common
|
||||
. $topsrcdir/build/macosx/mozconfig.common
|
||||
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-trace-malloc
|
||||
@ -19,3 +19,5 @@ ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -12,3 +12,5 @@ mk_add_options MOZ_MAKE_FLAGS="-j12"
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
ac_add_options --with-macbundlename-prefix=Firefox
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,5 +1,9 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --with-l10n-base=../../l10n-central
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --with-ccache
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-trace-malloc
|
||||
ac_add_options --enable-signmar
|
||||
@ -20,3 +22,5 @@ fi
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --enable-official-branding
|
||||
@ -8,3 +10,5 @@ if test "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD6
|
||||
else
|
||||
. $topsrcdir/build/win32/mozconfig.vs2010
|
||||
fi
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
# for pgo
|
||||
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
|
||||
|
||||
@ -29,3 +31,5 @@ fi
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -1,3 +1,5 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
# for pgo
|
||||
mk_add_options MOZ_PGO=1
|
||||
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
|
||||
@ -26,3 +28,5 @@ fi
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -15,3 +15,5 @@ mk_add_options MOZ_MAKE_FLAGS=-j1
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. $topsrcdir/build/win64/mozconfig.vs2010
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -24,3 +24,5 @@ mk_add_options MOZ_MAKE_FLAGS=-j1
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. $topsrcdir/build/win64/mozconfig.vs2010
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -18,7 +18,7 @@ XPCOMUtils.defineLazyGetter(this, "prefBranch", function() {
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
||||
"resource:///modules/devtools/Console.jsm");
|
||||
"resource://gre/modules/devtools/Console.jsm");
|
||||
|
||||
const PREF_DIR = "devtools.commands.dir";
|
||||
|
||||
|
@ -10,7 +10,7 @@ Cu.import("resource:///modules/devtools/gcli.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
||||
"resource:///modules/devtools/Console.jsm");
|
||||
"resource://gre/modules/devtools/Console.jsm");
|
||||
|
||||
// We should really be using nsICookieManager so we can read more than just the
|
||||
// key/value of cookies. The difficulty is filtering the cookies that are
|
||||
|
@ -7,7 +7,7 @@ topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
CHROMEDIR = $(call core_abspath,$(DIST))/bin/chrome
|
||||
CHROMEDIR = $(call core_abspath,$(FINAL_TARGET))/chrome
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
@ -23,13 +23,13 @@ exclude_files = \
|
||||
icon64.png \
|
||||
$(NULL)
|
||||
|
||||
$(DIST)/bin/chrome/pdfjs.manifest: $(GLOBAL_DEPS)
|
||||
$(FINAL_TARGET)/chrome/pdfjs.manifest: $(GLOBAL_DEPS)
|
||||
printf "manifest pdfjs/chrome.manifest" > $@
|
||||
|
||||
libs:: $(DIST)/bin/chrome/pdfjs.manifest
|
||||
libs:: $(FINAL_TARGET)/chrome/pdfjs.manifest
|
||||
$(PYTHON) $(topsrcdir)/config/nsinstall.py \
|
||||
$(srcdir)/pdfjs \
|
||||
$(foreach exclude,$(exclude_files), -X $(srcdir)/pdfjs/$(exclude)) \
|
||||
$(DIST)/bin/chrome
|
||||
$(FINAL_TARGET)/chrome
|
||||
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py \
|
||||
$(DIST)/bin/chrome.manifest "manifest chrome/pdfjs.manifest"
|
||||
$(FINAL_TARGET)/chrome.manifest "manifest chrome/pdfjs.manifest"
|
||||
|
@ -198,17 +198,19 @@ installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-%
|
||||
@echo "repackaging done"
|
||||
|
||||
ifdef MOZ_UPDATER
|
||||
# Note that we want updater.ini to be in the top directory, not the browser/
|
||||
# subdirectory, because that's where the updater is installed and runs.
|
||||
libs:: $(call MERGE_FILE,updater/updater.ini)
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \
|
||||
sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \
|
||||
sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \
|
||||
$(FINAL_TARGET)/updater.ini
|
||||
$(DIST)/bin/updater.ini
|
||||
else
|
||||
cat $< | \
|
||||
sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \
|
||||
sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \
|
||||
$(FINAL_TARGET)/updater.ini
|
||||
$(DIST)/bin/updater.ini
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
if [ -d "$topsrcdir/clang" ]; then
|
||||
# mozilla-central based build
|
||||
export CC=$topsrcdir/clang/bin/clang
|
@ -1,6 +1,6 @@
|
||||
. $topsrcdir/build/macosx/common
|
||||
. $topsrcdir/build/macosx/mozconfig.common
|
||||
|
||||
# Mac builds don't nomally have to be handled as cross
|
||||
# Mac builds don't normally have to be handled as cross
|
||||
# compilation, but some of the libraries on the bots
|
||||
# (IDL for example) are built only for one arch.
|
||||
|
||||
|
@ -12,7 +12,7 @@ ac_add_app_options x86_64 --target=x86_64-apple-darwin10
|
||||
|
||||
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk
|
||||
|
||||
. $topsrcdir/build/macosx/common
|
||||
. $topsrcdir/build/macosx/mozconfig.common
|
||||
|
||||
# $MOZ_BUILD_APP is only defined when sourced by configure. That's not a
|
||||
# problem, because the variables it affects only need to be set for
|
||||
|
11
build/mozconfig.common
Normal file
11
build/mozconfig.common
Normal file
@ -0,0 +1,11 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Common mozconfig for all users
|
||||
#
|
||||
# Add options to this file that will be inherited by all in-tree mozconfigs.
|
||||
# This is useful for eg try builds with nondefault options that apply to all
|
||||
# architectures, though note that if you want to override options set in
|
||||
# another mozconfig file, you'll need to use mozconfig.common.override instead
|
||||
# of this file.
|
11
build/mozconfig.common.override
Normal file
11
build/mozconfig.common.override
Normal file
@ -0,0 +1,11 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Common mozconfig for all users
|
||||
#
|
||||
# Add options to this file that will be inherited by all in-tree mozconfigs.
|
||||
# This file is included at the *end* of the mozconfigs, and so may be used
|
||||
# to override anything done previously.
|
||||
#
|
||||
# The common expected usage is for try builds with nondefault options.
|
@ -771,9 +771,8 @@ class ShellFunction(Function):
|
||||
cline = self._arguments[0].resolvestr(makefile, variables, setting)
|
||||
|
||||
log.debug("%s: running shell command '%s'" % (self.loc, cline))
|
||||
if msys:
|
||||
cline = [shell, "-c", cline]
|
||||
p = subprocess.Popen(cline, env=makefile.env, shell=not msys,
|
||||
cline = [shell, "-c", cline]
|
||||
p = subprocess.Popen(cline, env=makefile.env, shell=False,
|
||||
stdout=subprocess.PIPE, cwd=makefile.workdir)
|
||||
stdout, stderr = p.communicate()
|
||||
|
||||
|
@ -88,8 +88,8 @@ def call(cline, env, cwd, loc, cb, context, echo, justprint=False):
|
||||
if msys:
|
||||
if len(cline) > 3 and cline[1] == ':' and cline[2] == '/':
|
||||
cline = '/' + cline[0] + cline[2:]
|
||||
cline = [shell, "-c", cline]
|
||||
context.call(cline, shell=not msys, env=env, cwd=cwd, cb=cb, echo=echo,
|
||||
cline = [shell, "-c", cline]
|
||||
context.call(cline, shell=False, env=env, cwd=cwd, cb=cb, echo=echo,
|
||||
justprint=justprint)
|
||||
return
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
CC=/tools/gcc-4.5-0moz3/bin/gcc
|
||||
CXX=/tools/gcc-4.5-0moz3/bin/g++
|
||||
|
@ -20,15 +20,13 @@ VISIBILITY_FLAGS =
|
||||
STDCXX_COMPAT =
|
||||
|
||||
ifneq (WINNT,$(HOST_OS_ARCH))
|
||||
HOST_PROGRAM = nsinstall$(HOST_BIN_SUFFIX)
|
||||
HOST_PROGRAM = nsinstall_real$(HOST_BIN_SUFFIX)
|
||||
HOST_CSRCS = nsinstall.c pathsub.c
|
||||
endif
|
||||
|
||||
TARGETS = $(HOST_PROGRAM) $(SIMPLE_PROGRAMS)
|
||||
|
||||
ifndef CROSS_COMPILE
|
||||
ifdef USE_ELF_DYNSTR_GC
|
||||
TARGETS += elf-dynstr-gc
|
||||
export:: elf-dynstr-gc
|
||||
# Compiling the above will create dependency files.
|
||||
NEED_MDDEPDIR = 1
|
||||
endif
|
||||
@ -49,6 +47,26 @@ include $(topsrcdir)/config/config.mk
|
||||
# Do not install util programs
|
||||
NO_INSTALL=1
|
||||
|
||||
ifneq (WINNT,$(HOST_OS_ARCH))
|
||||
# Ensure nsinstall is atomically created
|
||||
nsinstall$(HOST_BIN_SUFFIX): $(HOST_PROGRAM)
|
||||
cp $^ $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
NSINSTALL_FILES := nsinstall$(HOST_BIN_SUFFIX)
|
||||
NSINSTALL_DEST := $(DIST)/bin
|
||||
NSINSTALL_TARGET := export
|
||||
INSTALL_TARGETS += NSINSTALL
|
||||
endif
|
||||
|
||||
HEADERS_FILES = \
|
||||
$(DEPTH)/mozilla-config.h \
|
||||
$(srcdir)/nsStaticComponents.h \
|
||||
$(NULL)
|
||||
HEADERS_DEST := $(DIST)/include
|
||||
HEADERS_TARGET := export
|
||||
INSTALL_TARGETS += HEADERS
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
HOST_CFLAGS += -DUNICODE -D_UNICODE
|
||||
@ -57,17 +75,8 @@ ifeq ($(OS_CONFIG),SunOS4.1)
|
||||
NSPR_CFLAGS += -I$(srcdir)/../nsprpub/pr/include/md
|
||||
endif
|
||||
|
||||
HEADERS = \
|
||||
$(DEPTH)/mozilla-config.h \
|
||||
$(srcdir)/nsStaticComponents.h \
|
||||
$(NULL)
|
||||
|
||||
export:: $(TARGETS) $(HEADERS)
|
||||
$(INSTALL) $(IFLAGS1) $(HEADERS) $(DIST)/include
|
||||
export::
|
||||
-$(RM) $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES)
|
||||
ifdef HOST_PROGRAM
|
||||
$(INSTALL) $(HOST_PROGRAM) $(DIST)/bin
|
||||
endif
|
||||
|
||||
# Generate a new buildid every time we "export" in config... that's only
|
||||
# supposed to be once per-build!
|
||||
|
@ -27,7 +27,7 @@ $(PARALLEL_DIRS_export): %_export: %/Makefile
|
||||
+@$(call SUBMAKE,export,$*)
|
||||
endif
|
||||
|
||||
export:: $(SUBMAKEFILES) $(MAKE_DIRS) $(if $(XPIDLSRCS),$(IDL_DIR))
|
||||
export:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
||||
$(LOOP_OVER_DIRS)
|
||||
$(LOOP_OVER_TOOL_DIRS)
|
||||
|
||||
|
@ -20,13 +20,11 @@ check-arglist = $(dir-ts)/arglist.ts
|
||||
check-autotargets = $(dir-ts)/autotargets_mk.ts
|
||||
check-export-targets = $(dir-ts)/export-targets-mk.ts
|
||||
check-XinY = $(dir-ts)/check_XinY_mk.ts
|
||||
check-xpidl = $(dir-ts)/xpidl-mk.ts
|
||||
check-tests =\
|
||||
$(check-arglist) \
|
||||
$(check-autotargets) \
|
||||
$(check-export-targets) \
|
||||
$(check-XinY) \
|
||||
$(check-xpidl) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
@ -37,7 +35,6 @@ all::
|
||||
|
||||
clean:
|
||||
$(RM) $(check-tests)
|
||||
@$(MAKE) --no-print-directory -f $(srcdir)/check-xpidl.mk clean-xpidl topsrcdir=$(topsrcdir)
|
||||
|
||||
###########################################################################
|
||||
## Logic processed at compile time so be selective about when to test
|
||||
@ -124,23 +121,4 @@ $(check-export-targets): $(check-export-targets-preqs)
|
||||
@$(TOUCH) $@
|
||||
# </CHECK: export-targets.mk>
|
||||
|
||||
###########################################################################
|
||||
##{ <CHECK: xpidl.mk>
|
||||
check-xpidl-preqs=\
|
||||
$(call mkdir_deps,$(dir-ts)) \
|
||||
$(topsrcdir)/config/config.mk \
|
||||
$(topsrcdir)/config/makefiles/makeutils.mk \
|
||||
$(topsrcdir)/config/makefiles/xpidl.mk \
|
||||
$(srcdir)/check-xpidl.mk \
|
||||
$(NULL)
|
||||
|
||||
check-xpidl-args =\
|
||||
"topsrcdir=$(topsrcdir)" \
|
||||
"srcdir=$(srcdir)" \
|
||||
$(NULL)
|
||||
$(check-xpidl): $(check-xpidl-preqs)
|
||||
$(MAKE) -f $(srcdir)/check-xpidl.mk check-xpidl $(check-xpidl-args)
|
||||
@$(TOUCH) $@
|
||||
#} </check-xpidl.mk>
|
||||
|
||||
endif #} findstring MAKECMDGOAL
|
||||
|
@ -1,43 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
ifdef VERBOSE
|
||||
$(warning loading test)
|
||||
endif
|
||||
|
||||
# Limit scope, we only need install_cmd= for testing
|
||||
INCLUDED_AUTOCONF_MK = 1
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
USE_AUTOTARGETS_MK = 1
|
||||
include $(topsrcdir)/config/makefiles/makeutils.mk
|
||||
|
||||
basedir = blah
|
||||
DIST = $(basedir)/dist
|
||||
DI = $(DIST)/include
|
||||
IDL_DIR = $(basedir)/idl
|
||||
INSTALL := cp
|
||||
|
||||
XPIDLSRCS = $(srcdir)/check-xpidl.mk
|
||||
|
||||
include $(topsrcdir)/config/makefiles/xpidl.mk
|
||||
|
||||
|
||||
$(call requiredfunction,topsrcdir)
|
||||
$(call requiredfunction,XPIDL_GEN_DIR)
|
||||
|
||||
HIDE=@
|
||||
check-xpidl: xpidl-install-src xpidl-install-headers
|
||||
$(HIDE)test -d $(DIST) || exit 90
|
||||
$(HIDE)test -f $(DI)/check-xpidl.mk || exit 91
|
||||
$(HIDE)test -f $(IDL_DIR)/check-xpidl.mk || exit 92
|
||||
|
||||
# Declare targets to avoid including rules.mk
|
||||
$(DI) $(IDL_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
clean-xpidl:
|
||||
$(RM) -r $(basedir)
|
@ -1,60 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
# Always declared, general use by:
|
||||
# js/xpconnect/tests/idl/Makefile.in:libs
|
||||
# toolkit/crashreporter/test/Makefile.in
|
||||
XPIDL_GEN_DIR ?= _xpidlgen
|
||||
GARBAGE_DIRS += $(XPIDL_GEN_DIR)
|
||||
|
||||
|
||||
###########################################################################
|
||||
## Conditional logic
|
||||
###########################################################################
|
||||
ifndef INCLUDED_XPIDL_MK #{
|
||||
INCLUDED_XPIDL_MK = 1
|
||||
|
||||
ifneq (,$(XPIDLSRCS)) #{
|
||||
|
||||
ifndef NO_DIST_INSTALL #{
|
||||
_xpidl-todo_ += xpidl-install-src
|
||||
_xpidl-todo_ += xpidl-install-headers
|
||||
endif #}
|
||||
|
||||
endif #} XPIDLSRCS
|
||||
|
||||
export:: $(_xpidl-todo_)
|
||||
|
||||
$(call requiredfunction,mkdir_deps)
|
||||
endif #} INCLUDED_XPIDL_MK
|
||||
|
||||
|
||||
###########################################################################
|
||||
## processing targets
|
||||
###########################################################################
|
||||
ifdef _xpidl-todo_ #{
|
||||
|
||||
$(call requiredfunction,install_cmd)
|
||||
|
||||
## Logic batch #1
|
||||
xpidl-install-src-preqs=\
|
||||
$(XPIDLSRCS) \
|
||||
$(call mkdir_deps,$(IDL_DIR)) \
|
||||
$(NULL)
|
||||
|
||||
xpidl-install-src: $(xpidl-install-src-preqs)
|
||||
$(call install_cmd,$(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))))
|
||||
|
||||
xpidl-install-headers-preqs =\
|
||||
$(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) \
|
||||
$(call mkdir_deps,$(DIST)/include) \
|
||||
$(NULL)
|
||||
xpidl-install-headers: $(xpidl-install-headers-preqs)
|
||||
$(call install_cmd,$(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))))
|
||||
|
||||
endif #} _xpidl-todo_
|
132
config/rules.mk
132
config/rules.mk
@ -26,10 +26,12 @@ USE_AUTOTARGETS_MK = 1
|
||||
include $(topsrcdir)/config/makefiles/makeutils.mk
|
||||
|
||||
ifdef SDK_XPIDLSRCS
|
||||
XPIDLSRCS += $(SDK_XPIDLSRCS)
|
||||
_EXTRA_XPIDLSRCS := $(filter-out $(XPIDLSRCS),$(SDK_XPIDLSRCS))
|
||||
XPIDLSRCS += $(_EXTRA_XPIDLSRCS)
|
||||
endif
|
||||
ifdef SDK_HEADERS
|
||||
EXPORTS += $(SDK_HEADERS)
|
||||
_EXTRA_EXPORTS := $(filter-out $(EXPORTS),$(SDK_HEADERS))
|
||||
EXPORTS += $(_EXTRA_EXPORTS)
|
||||
endif
|
||||
|
||||
REPORT_BUILD = $(info $(notdir $<))
|
||||
@ -1159,15 +1161,19 @@ endif
|
||||
|
||||
ifndef NO_DIST_INSTALL
|
||||
ifneq (,$(EXPORTS))
|
||||
export:: $(EXPORTS)
|
||||
$(call install_cmd,$(IFLAGS1) $^ $(DIST)/include)
|
||||
EXPORTS_FILES := $(EXPORTS)
|
||||
EXPORTS_DEST := $(DIST)/include
|
||||
EXPORTS_TARGET := export
|
||||
INSTALL_TARGETS += EXPORTS
|
||||
endif
|
||||
endif # NO_DIST_INSTALL
|
||||
|
||||
define EXPORT_NAMESPACE_RULE
|
||||
ifndef NO_DIST_INSTALL
|
||||
export:: $(EXPORTS_$(namespace))
|
||||
$(call install_cmd,$(IFLAGS1) $$^ $(DIST)/include/$(namespace))
|
||||
EXPORTS_$(namespace)_FILES := $$(EXPORTS_$(namespace))
|
||||
EXPORTS_$(namespace)_DEST := $$(DIST)/include/$(namespace)
|
||||
EXPORTS_$(namespace)_TARGET := export
|
||||
INSTALL_TARGETS += EXPORTS_$(namespace)
|
||||
endif # NO_DIST_INSTALL
|
||||
endef
|
||||
|
||||
@ -1203,14 +1209,12 @@ endif
|
||||
# Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
|
||||
|
||||
ifneq ($(AUTOCFG_JS_EXPORTS),)
|
||||
$(FINAL_TARGET)/defaults/autoconfig::
|
||||
$(NSINSTALL) -D $@
|
||||
|
||||
ifndef NO_DIST_INSTALL
|
||||
export:: $(AUTOCFG_JS_EXPORTS) $(FINAL_TARGET)/defaults/autoconfig
|
||||
$(call install_cmd,$(IFLAGS1) $^)
|
||||
AUTOCFG_JS_EXPORTS_FILES := $(AUTOCFG_JS_EXPORTS)
|
||||
AUTOCFG_JS_EXPORTS_DEST := $(FINAL_TARGET)/defaults/autoconfig
|
||||
AUTOCFG_JS_EXPORTS_TARGET := export
|
||||
INSTALL_TARGETS += AUTOCFG_JS_EXPORTS
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
@ -1271,9 +1275,11 @@ $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(
|
||||
$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS))
|
||||
endif # XPIDL_MODULE.xpt != XPIDLSRCS
|
||||
|
||||
libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
|
||||
ifndef NO_DIST_INSTALL
|
||||
$(call install_cmd,$(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(FINAL_TARGET)/components)
|
||||
XPIDL_MODULE_FILES := $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
|
||||
XPIDL_MODULE_DEST := $(FINAL_TARGET)/components
|
||||
INSTALL_TARGETS += XPIDL_MODULE
|
||||
|
||||
ifndef NO_INTERFACES_MANIFEST
|
||||
libs:: $(call mkdir_deps,$(FINAL_TARGET)/components)
|
||||
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt"
|
||||
@ -1283,26 +1289,22 @@ endif
|
||||
|
||||
GARBAGE_DIRS += $(XPIDL_GEN_DIR)
|
||||
|
||||
ifndef NO_DIST_INSTALL
|
||||
XPIDL_HEADERS_FILES := $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
|
||||
XPIDL_HEADERS_DEST := $(DIST)/include
|
||||
XPIDL_HEADERS_TARGET := export
|
||||
INSTALL_TARGETS += XPIDL_HEADERS
|
||||
|
||||
XPIDLSRCS_FILES := $(XPIDLSRCS)
|
||||
XPIDLSRCS_DEST := $(IDL_DIR)
|
||||
XPIDLSRCS_TARGET := export-idl
|
||||
INSTALL_TARGETS += XPIDLSRCS
|
||||
|
||||
export:: export-idl
|
||||
endif
|
||||
endif #} XPIDLSRCS
|
||||
|
||||
|
||||
ifndef INCLUDED_XPIDL_MK
|
||||
include $(topsrcdir)/config/makefiles/xpidl.mk
|
||||
endif
|
||||
|
||||
|
||||
# General rules for exporting idl files.
|
||||
$(IDL_DIR):
|
||||
$(NSINSTALL) -D $@
|
||||
|
||||
export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
||||
|
||||
ifneq ($(XPIDLSRCS),)
|
||||
ifndef NO_DIST_INSTALL
|
||||
export-idl:: $(XPIDLSRCS) $(IDL_DIR)
|
||||
$(call install_cmd,$(IFLAGS1) $^)
|
||||
endif
|
||||
endif
|
||||
$(LOOP_OVER_PARALLEL_DIRS)
|
||||
$(LOOP_OVER_DIRS)
|
||||
$(LOOP_OVER_TOOL_DIRS)
|
||||
@ -1320,7 +1322,9 @@ endif
|
||||
ifdef EXTRA_COMPONENTS
|
||||
libs:: $(EXTRA_COMPONENTS)
|
||||
ifndef NO_DIST_INSTALL
|
||||
$(call install_cmd,$(IFLAGS1) $^ $(FINAL_TARGET)/components)
|
||||
EXTRA_COMPONENTS_FILES := $(EXTRA_COMPONENTS)
|
||||
EXTRA_COMPONENTS_DEST := $(FINAL_TARGET)/components
|
||||
INSTALL_TARGETS += EXTRA_COMPONENTS
|
||||
endif
|
||||
|
||||
endif
|
||||
@ -1344,11 +1348,11 @@ endif
|
||||
JS_MODULES_PATH ?= $(FINAL_TARGET)/modules
|
||||
|
||||
ifdef EXTRA_JS_MODULES
|
||||
libs:: $(EXTRA_JS_MODULES)
|
||||
ifndef NO_DIST_INSTALL
|
||||
$(call install_cmd,$(IFLAGS1) $^ $(JS_MODULES_PATH))
|
||||
EXTRA_JS_MODULES_FILES := $(EXTRA_JS_MODULES)
|
||||
EXTRA_JS_MODULES_DEST := $(JS_MODULES_PATH)
|
||||
INSTALL_TARGETS += EXTRA_JS_MODULES
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifdef EXTRA_PP_JS_MODULES
|
||||
@ -1370,9 +1374,10 @@ testmodulesdir = $(DEPTH)/_tests/modules/$(TESTING_JS_MODULE_DIR)
|
||||
|
||||
GENERATED_DIRS += $(testmodulesdir)
|
||||
|
||||
libs:: $(TESTING_JS_MODULES)
|
||||
ifndef NO_DIST_INSTALL
|
||||
$(call install_cmd,$(IFLAGS) $^ $(testmodulesdir))
|
||||
TESTING_JS_MODULES_FILES := $(TESTING_JS_MODULES)
|
||||
TESTING_JS_MODULES_DEST := $(testmodulesdir)
|
||||
INSTALL_TARGETS += TESTING_JS_MODULES
|
||||
endif
|
||||
|
||||
endif
|
||||
@ -1381,25 +1386,19 @@ endif
|
||||
# SDK
|
||||
|
||||
ifneq (,$(SDK_LIBRARY))
|
||||
$(SDK_LIB_DIR)::
|
||||
$(NSINSTALL) -D $@
|
||||
|
||||
ifndef NO_DIST_INSTALL
|
||||
libs:: $(SDK_LIBRARY) $(SDK_LIB_DIR)
|
||||
$(call install_cmd,$(IFLAGS2) $^)
|
||||
SDK_LIBRARY_FILES := $(SDK_LIBRARY)
|
||||
SDK_LIBRARY_DEST := $(SDK_LIB_DIR)
|
||||
INSTALL_TARGETS += SDK_LIBRARY
|
||||
endif
|
||||
|
||||
endif # SDK_LIBRARY
|
||||
|
||||
ifneq (,$(strip $(SDK_BINARY)))
|
||||
$(SDK_BIN_DIR)::
|
||||
$(NSINSTALL) -D $@
|
||||
|
||||
ifndef NO_DIST_INSTALL
|
||||
libs:: $(SDK_BINARY) $(SDK_BIN_DIR)
|
||||
$(call install_cmd,$(IFLAGS2) $^)
|
||||
SDK_BINARY_FILES := $(SDK_BINARY)
|
||||
SDK_BINARY_DEST := $(SDK_BIN_DIR)
|
||||
INSTALL_TARGETS += SDK_BINARY
|
||||
endif
|
||||
|
||||
endif # SDK_BINARY
|
||||
|
||||
################################################################################
|
||||
@ -1535,25 +1534,39 @@ endif
|
||||
# Install/copy rules
|
||||
#
|
||||
# The INSTALL_TARGETS variable contains a list of all install target
|
||||
# categories. Each category defines a list of files, an install destination,
|
||||
# and whether the files are executables or not.
|
||||
# categories. Each category defines a list of files and executables, and an
|
||||
# install destination,
|
||||
#
|
||||
# FOO_FILES := foo bar
|
||||
# FOO_EXECUTABLES := baz
|
||||
# FOO_DEST := target_path
|
||||
# INSTALL_TARGETS += FOO
|
||||
#
|
||||
# Additionally, a FOO_TARGET variable may be added to indicate the target for
|
||||
# which the files and executables are installed. Default is "libs".
|
||||
|
||||
# If we're using binary nsinstall and it's not built yet, fallback to python nsinstall.
|
||||
ifneq (,$(filter $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX),$(install_cmd)))
|
||||
nsinstall_is_usable = $(if $(wildcard $(CONFIG_TOOLS)/nsinstall$(HOST_BIN_SUFFIX)),$(eval nsinstall_is_usable := yes)yes)
|
||||
|
||||
define install_cmd_override
|
||||
$(1): install_cmd = $$(if $$(nsinstall_is_usable),$$(INSTALL),$$(NSINSTALL_PY)) $$(1)
|
||||
endef
|
||||
endif
|
||||
|
||||
define install_file_template
|
||||
libs:: $(2)/$(notdir $(1))
|
||||
$(or $(3),libs):: $(2)/$(notdir $(1))
|
||||
$(call install_cmd_override,$(2)/$(notdir $(1)))
|
||||
$(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2))
|
||||
$(INSTALL) $(3) $$< $${@D}
|
||||
$$(call install_cmd,$(4) $$< $${@D})
|
||||
endef
|
||||
$(foreach category,$(INSTALL_TARGETS),\
|
||||
$(if $($(category)_DEST),,$(error Missing $(category)_DEST))\
|
||||
$(foreach file,$($(category)_FILES),\
|
||||
$(eval $(call install_file_template,$(file),$($(category)_DEST),$(IFLAGS1)))\
|
||||
$(eval $(call install_file_template,$(file),$($(category)_DEST),$($(category)_TARGET),$(IFLAGS1)))\
|
||||
)\
|
||||
$(foreach file,$($(category)_EXECUTABLES),\
|
||||
$(eval $(call install_file_template,$(file),$($(category)_DEST),$(IFLAGS2)))\
|
||||
$(eval $(call install_file_template,$(file),$($(category)_DEST),$($(category)_TARGET),$(IFLAGS2)))\
|
||||
)\
|
||||
)
|
||||
|
||||
@ -1567,19 +1580,22 @@ $(foreach category,$(INSTALL_TARGETS),\
|
||||
# FOO_PATH := target_path
|
||||
# FOO_FLAGS := -Dsome_flag
|
||||
# PP_TARGETS += FOO
|
||||
#
|
||||
# Additionally, a FOO_TARGET variable may be added to indicate the target for
|
||||
# which the files and executables are installed. Default is "libs".
|
||||
|
||||
# preprocess_file_template defines preprocessing rules.
|
||||
# $(call preprocess_file_template, source_file, target_path, extra_flags)
|
||||
define preprocess_file_template
|
||||
$(2)/$(notdir $(1)): $(1) $$(call mkdir_deps,$(2)) $$(GLOBAL_DEPS)
|
||||
$$(RM) $$@
|
||||
$$(PYTHON) $$(topsrcdir)/config/Preprocessor.py $(3) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) $$< > $$@
|
||||
libs:: $(2)/$(notdir $(1))
|
||||
$$(PYTHON) $$(topsrcdir)/config/Preprocessor.py $(4) $$(DEFINES) $$(ACDEFINES) $$(XULPPFLAGS) $$< > $$@
|
||||
$(or $(3),libs):: $(2)/$(notdir $(1))
|
||||
endef
|
||||
|
||||
$(foreach category,$(PP_TARGETS),\
|
||||
$(foreach file,$($(category)),\
|
||||
$(eval $(call preprocess_file_template,$(file),$($(category)_PATH),$($(category)_FLAGS)))\
|
||||
$(eval $(call preprocess_file_template,$(file),$($(category)_PATH),$($(category)_TARGET),$($(category)_FLAGS)))\
|
||||
)\
|
||||
)
|
||||
|
||||
|
15
configure.in
15
configure.in
@ -3854,7 +3854,7 @@ fi
|
||||
dnl system libevent Support
|
||||
dnl ========================================================
|
||||
MOZ_ARG_WITH_STRING(system-libevent,
|
||||
[ --with-system-libevent=[PFX]
|
||||
[ --with-system-libevent[=PFX]
|
||||
Use system libevent [installed at prefix PFX]],
|
||||
LIBEVENT_DIR=$withval)
|
||||
|
||||
@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS
|
||||
_SAVE_LIBS=$LIBS
|
||||
if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then
|
||||
MOZ_NATIVE_LIBEVENT=
|
||||
elif test "$LIBEVENT_DIR" = yes; then
|
||||
PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent,
|
||||
MOZ_NATIVE_LIBEVENT=1,
|
||||
AC_MSG_ERROR([--with-system-libevent requested but libevent package not found]))
|
||||
else
|
||||
if test "${LIBEVENT_DIR}" = "yes"; then
|
||||
LIBEVENT_DIR=/usr
|
||||
fi
|
||||
CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS"
|
||||
LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS"
|
||||
MOZ_CHECK_HEADER(event.h,
|
||||
@ -3876,16 +3877,16 @@ else
|
||||
AC_MSG_ERROR([--with-system-libevent requested but event.h not found]))
|
||||
AC_CHECK_LIB(event, event_init,
|
||||
[MOZ_NATIVE_LIBEVENT=1
|
||||
MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include"
|
||||
MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include"
|
||||
MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"],
|
||||
[MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=])
|
||||
[MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
|
||||
fi
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
LIBS=$_SAVE_LIBS
|
||||
|
||||
AC_SUBST(MOZ_NATIVE_LIBEVENT)
|
||||
AC_SUBST(MOZ_LIBEVENT_INCLUDES)
|
||||
AC_SUBST(MOZ_LIBEVENT_CFLAGS)
|
||||
AC_SUBST(MOZ_LIBEVENT_LIBS)
|
||||
|
||||
dnl ========================================================
|
||||
|
@ -3598,21 +3598,39 @@ nsContentUtils::ConvertStringFromCharset(const nsACString& aCharset,
|
||||
return rv;
|
||||
|
||||
nsPromiseFlatCString flatInput(aInput);
|
||||
int32_t srcLen = flatInput.Length();
|
||||
int32_t dstLen;
|
||||
rv = decoder->GetMaxLength(flatInput.get(), srcLen, &dstLen);
|
||||
int32_t length = flatInput.Length();
|
||||
int32_t outLen;
|
||||
rv = decoder->GetMaxLength(flatInput.get(), length, &outLen);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
PRUnichar *ustr = (PRUnichar *)nsMemory::Alloc((dstLen + 1) *
|
||||
PRUnichar *ustr = (PRUnichar *)nsMemory::Alloc((outLen + 1) *
|
||||
sizeof(PRUnichar));
|
||||
if (!ustr)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
rv = decoder->Convert(flatInput.get(), &srcLen, ustr, &dstLen);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
const char* data = flatInput.get();
|
||||
aOutput.Truncate();
|
||||
for (;;) {
|
||||
int32_t srcLen = length;
|
||||
int32_t dstLen = outLen;
|
||||
rv = decoder->Convert(data, &srcLen, ustr, &dstLen);
|
||||
// Convert will convert the input partially even if the status
|
||||
// indicates a failure.
|
||||
ustr[dstLen] = 0;
|
||||
aOutput.Assign(ustr, dstLen);
|
||||
aOutput.Append(ustr, dstLen);
|
||||
if (rv != NS_ERROR_ILLEGAL_INPUT) {
|
||||
break;
|
||||
}
|
||||
// Emit a decode error manually because some decoders
|
||||
// do not support kOnError_Recover (bug 638379)
|
||||
if (srcLen == -1) {
|
||||
decoder->Reset();
|
||||
} else {
|
||||
data += srcLen + 1;
|
||||
length -= srcLen + 1;
|
||||
aOutput.Append(static_cast<PRUnichar>(0xFFFD));
|
||||
}
|
||||
}
|
||||
|
||||
nsMemory::Free(ustr);
|
||||
|
@ -91,6 +91,10 @@
|
||||
|
||||
#include "mozilla/dom/StructuredCloneUtils.h"
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsXULPopupManager.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::layers;
|
||||
@ -306,6 +310,7 @@ nsFrameLoader::nsFrameLoader(Element* aOwner, bool aNetworkCreated)
|
||||
, mClipSubdocument(true)
|
||||
, mClampScrollPosition(true)
|
||||
, mRemoteBrowserInitialized(false)
|
||||
, mObservingOwnerContent(false)
|
||||
, mCurrentRemoteFrame(nullptr)
|
||||
, mRemoteBrowser(nullptr)
|
||||
, mRenderMode(RENDER_MODE_DEFAULT)
|
||||
@ -657,29 +662,24 @@ SetTreeOwnerAndChromeEventHandlerOnDocshellTree(nsIDocShellTreeItem* aItem,
|
||||
/**
|
||||
* Set the type of the treeitem and hook it up to the treeowner.
|
||||
* @param aItem the treeitem we're working with
|
||||
* @param aOwningContent the content node that owns aItem
|
||||
* @param aTreeOwner the relevant treeowner; might be null
|
||||
* @param aParentType the nsIDocShellTreeItem::GetType of our parent docshell
|
||||
* @param aParentNode if non-null, the docshell we should be added as a child to
|
||||
*
|
||||
* @return whether aItem is top-level content
|
||||
*/
|
||||
static bool
|
||||
AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem, nsIContent* aOwningContent,
|
||||
nsIDocShellTreeOwner* aOwner, int32_t aParentType,
|
||||
nsIDocShellTreeNode* aParentNode)
|
||||
bool
|
||||
nsFrameLoader::AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem,
|
||||
nsIDocShellTreeOwner* aOwner,
|
||||
int32_t aParentType,
|
||||
nsIDocShellTreeNode* aParentNode)
|
||||
{
|
||||
NS_PRECONDITION(aItem, "Must have docshell treeitem");
|
||||
NS_PRECONDITION(aOwningContent, "Must have owning content");
|
||||
NS_PRECONDITION(mOwnerContent, "Must have owning content");
|
||||
|
||||
nsAutoString value;
|
||||
bool isContent = false;
|
||||
|
||||
if (aOwningContent->IsXUL()) {
|
||||
aOwningContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, value);
|
||||
} else {
|
||||
aOwningContent->GetAttr(kNameSpaceID_None, nsGkAtoms::mozframetype, value);
|
||||
}
|
||||
mOwnerContent->GetAttr(kNameSpaceID_None, TypeAttrName(), value);
|
||||
|
||||
// we accept "content" and "content-xxx" values.
|
||||
// at time of writing, we expect "xxx" to be "primary" or "targetable", but
|
||||
@ -692,7 +692,7 @@ AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem, nsIContent* aOwningContent,
|
||||
// Force mozbrowser frames to always be typeContent, even if the
|
||||
// mozbrowser interfaces are disabled.
|
||||
nsCOMPtr<nsIDOMMozBrowserFrame> mozbrowser =
|
||||
do_QueryInterface(aOwningContent);
|
||||
do_QueryInterface(mOwnerContent);
|
||||
if (mozbrowser) {
|
||||
bool isMozbrowser = false;
|
||||
mozbrowser->GetMozbrowser(&isMozbrowser);
|
||||
@ -725,6 +725,8 @@ AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem, nsIContent* aOwningContent,
|
||||
if (aOwner) {
|
||||
bool is_targetable = is_primary ||
|
||||
value.LowerCaseEqualsLiteral("content-targetable");
|
||||
mOwnerContent->AddMutationObserver(this);
|
||||
mObservingOwnerContent = true;
|
||||
aOwner->ContentShellAdded(aItem, is_primary, is_targetable, value);
|
||||
}
|
||||
}
|
||||
@ -1205,10 +1207,15 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
|
||||
SetTreeOwnerAndChromeEventHandlerOnDocshellTree(otherTreeItem, ourOwner,
|
||||
ourChromeEventHandler);
|
||||
|
||||
AddTreeItemToTreeOwner(ourTreeItem, otherContent, otherOwner,
|
||||
otherParentType, nullptr);
|
||||
AddTreeItemToTreeOwner(otherTreeItem, ourContent, ourOwner, ourParentType,
|
||||
nullptr);
|
||||
// Switch the owner content before we start calling AddTreeItemToTreeOwner.
|
||||
// Note that we rely on this to deal with setting mObservingOwnerContent to
|
||||
// false and calling RemoveMutationObserver as needed.
|
||||
SetOwnerContent(otherContent);
|
||||
aOther->SetOwnerContent(ourContent);
|
||||
|
||||
AddTreeItemToTreeOwner(ourTreeItem, otherOwner, otherParentType, nullptr);
|
||||
aOther->AddTreeItemToTreeOwner(otherTreeItem, ourOwner, ourParentType,
|
||||
nullptr);
|
||||
|
||||
// SetSubDocumentFor nulls out parent documents on the old child doc if a
|
||||
// new non-null document is passed in, so just go ahead and remove both
|
||||
@ -1222,9 +1229,6 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
|
||||
ourWindow->SetFrameElementInternal(otherFrameElement);
|
||||
otherWindow->SetFrameElementInternal(ourFrameElement);
|
||||
|
||||
SetOwnerContent(otherContent);
|
||||
aOther->SetOwnerContent(ourContent);
|
||||
|
||||
nsRefPtr<nsFrameMessageManager> ourMessageManager = mMessageManager;
|
||||
nsRefPtr<nsFrameMessageManager> otherMessageManager = aOther->mMessageManager;
|
||||
// Swap pointers in child message managers.
|
||||
@ -1383,6 +1387,10 @@ nsFrameLoader::GetDepthTooGreat(bool* aDepthTooGreat)
|
||||
void
|
||||
nsFrameLoader::SetOwnerContent(Element* aContent)
|
||||
{
|
||||
if (mObservingOwnerContent) {
|
||||
mObservingOwnerContent = false;
|
||||
mOwnerContent->RemoveMutationObserver(this);
|
||||
}
|
||||
mOwnerContent = aContent;
|
||||
if (RenderFrameParent* rfp = GetCurrentRemoteFrame()) {
|
||||
rfp->OwnerContentChanged(aContent);
|
||||
@ -1559,8 +1567,8 @@ nsFrameLoader::MaybeCreateDocShell()
|
||||
parentAsItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
|
||||
NS_ENSURE_STATE(parentTreeOwner);
|
||||
mIsTopLevelContent =
|
||||
AddTreeItemToTreeOwner(docShellAsItem, mOwnerContent, parentTreeOwner,
|
||||
parentType, parentAsNode);
|
||||
AddTreeItemToTreeOwner(docShellAsItem, parentTreeOwner, parentType,
|
||||
parentAsNode);
|
||||
|
||||
// Make sure all shells have links back to the content element
|
||||
// in the nearest enclosing chrome shell.
|
||||
@ -2404,3 +2412,78 @@ nsFrameLoader::GetDetachedSubdocView(nsIDocument** aContainerDoc) const
|
||||
return mDetachedSubdocViews;
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsFrameLoader::AttributeChanged(nsIDocument* aDocument,
|
||||
mozilla::dom::Element* aElement,
|
||||
int32_t aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
int32_t aModType)
|
||||
{
|
||||
MOZ_ASSERT(mObservingOwnerContent);
|
||||
// TODO: Implement ContentShellAdded for remote browsers (bug 658304)
|
||||
MOZ_ASSERT(!mRemoteBrowser);
|
||||
|
||||
if (aNameSpaceID != kNameSpaceID_None || aAttribute != TypeAttrName()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (aElement != mOwnerContent) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Note: This logic duplicates a lot of logic in
|
||||
// MaybeCreateDocshell. We should fix that.
|
||||
|
||||
// Notify our enclosing chrome that our type has changed. We only do this
|
||||
// if our parent is chrome, since in all other cases we're random content
|
||||
// subframes and the treeowner shouldn't worry about us.
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(mDocShell));
|
||||
if (!docShellAsItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentItem;
|
||||
docShellAsItem->GetParent(getter_AddRefs(parentItem));
|
||||
if (!parentItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t parentType;
|
||||
parentItem->GetItemType(&parentType);
|
||||
|
||||
if (parentType != nsIDocShellTreeItem::typeChrome) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeOwner> parentTreeOwner;
|
||||
parentItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));
|
||||
if (!parentTreeOwner) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsAutoString value;
|
||||
aElement->GetAttr(kNameSpaceID_None, TypeAttrName(), value);
|
||||
|
||||
bool is_primary = value.LowerCaseEqualsLiteral("content-primary");
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
// when a content panel is no longer primary, hide any open popups it may have
|
||||
if (!is_primary) {
|
||||
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
|
||||
if (pm)
|
||||
pm->HidePopupsInDocShell(docShellAsItem);
|
||||
}
|
||||
#endif
|
||||
|
||||
parentTreeOwner->ContentShellRemoved(docShellAsItem);
|
||||
if (value.LowerCaseEqualsLiteral("content") ||
|
||||
StringBeginsWith(value, NS_LITERAL_STRING("content-"),
|
||||
nsCaseInsensitiveStringComparator())) {
|
||||
bool is_targetable = is_primary ||
|
||||
value.LowerCaseEqualsLiteral("content-targetable");
|
||||
|
||||
parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary,
|
||||
is_targetable, value);
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "FrameMetrics.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
|
||||
class nsIURI;
|
||||
class nsSubDocumentFrame;
|
||||
@ -29,6 +30,9 @@ class nsIView;
|
||||
class nsIInProcessContentFrameMessageManager;
|
||||
class AutoResetInShow;
|
||||
class nsITabParent;
|
||||
class nsIDocShellTreeItem;
|
||||
class nsIDocShellTreeOwner;
|
||||
class nsIDocShellTreeNode;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -135,7 +139,8 @@ private:
|
||||
|
||||
|
||||
class nsFrameLoader MOZ_FINAL : public nsIFrameLoader,
|
||||
public nsIContentViewManager
|
||||
public nsIContentViewManager,
|
||||
public nsStubMutationObserver
|
||||
{
|
||||
friend class AutoResetInShow;
|
||||
typedef mozilla::dom::PBrowserParent PBrowserParent;
|
||||
@ -166,6 +171,7 @@ public:
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsFrameLoader, nsIFrameLoader)
|
||||
NS_DECL_NSIFRAMELOADER
|
||||
NS_DECL_NSICONTENTVIEWMANAGER
|
||||
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
|
||||
NS_HIDDEN_(nsresult) CheckForRecursiveLoad(nsIURI* aURI);
|
||||
nsresult ReallyStartLoading();
|
||||
void Finalize();
|
||||
@ -337,9 +343,19 @@ private:
|
||||
// Tell the remote browser that it's now "virtually visible"
|
||||
bool ShowRemoteFrame(const nsIntSize& size);
|
||||
|
||||
bool AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem,
|
||||
nsIDocShellTreeOwner* aOwner,
|
||||
int32_t aParentType,
|
||||
nsIDocShellTreeNode* aParentNode);
|
||||
|
||||
nsIAtom* TypeAttrName() const {
|
||||
return mOwnerContent->IsXUL() ? nsGkAtoms::type : nsGkAtoms::mozframetype;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShell> mDocShell;
|
||||
nsCOMPtr<nsIURI> mURIToLoad;
|
||||
mozilla::dom::Element* mOwnerContent; // WEAK
|
||||
|
||||
public:
|
||||
// public because a callback needs these.
|
||||
nsRefPtr<nsFrameMessageManager> mMessageManager;
|
||||
@ -373,6 +389,7 @@ private:
|
||||
bool mClipSubdocument : 1;
|
||||
bool mClampScrollPosition : 1;
|
||||
bool mRemoteBrowserInitialized : 1;
|
||||
bool mObservingOwnerContent : 1;
|
||||
|
||||
// XXX leaking
|
||||
nsCOMPtr<nsIObserver> mChildHost;
|
||||
|
@ -958,8 +958,7 @@ nsFrameScriptExecutor::InitTabChildGlobalInternal(nsISupports* aScope)
|
||||
|
||||
JSAutoRequest ar(cx);
|
||||
nsIXPConnect* xpc = nsContentUtils::XPConnect();
|
||||
const uint32_t flags = nsIXPConnect::INIT_JS_STANDARD_CLASSES |
|
||||
nsIXPConnect::FLAG_SYSTEM_GLOBAL_OBJECT;
|
||||
const uint32_t flags = nsIXPConnect::INIT_JS_STANDARD_CLASSES;
|
||||
|
||||
|
||||
JS_SetContextPrivate(cx, aScope);
|
||||
|
@ -687,21 +687,29 @@ nsObjectLoadingContent::~nsObjectLoadingContent()
|
||||
nsresult
|
||||
nsObjectLoadingContent::InstantiatePluginInstance()
|
||||
{
|
||||
if (mType != eType_Plugin || mIsLoading) {
|
||||
LOG(("OBJLC [%p]: Not instantiating loading or non-plugin object, type %u",
|
||||
this, mType));
|
||||
if (mInstanceOwner || mType != eType_Plugin || mIsLoading || mInstantiating) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> thisContent =
|
||||
do_QueryInterface(static_cast<nsIImageLoadingContent *>(this));
|
||||
|
||||
// Flush layout so that the frame is created if possible and the plugin is
|
||||
// initialized with the latest information.
|
||||
nsIDocument* doc = thisContent->GetCurrentDoc();
|
||||
|
||||
if (!doc || !InActiveDocument(thisContent)) {
|
||||
NS_ERROR("Shouldn't be calling "
|
||||
"InstantiatePluginInstance without an active document");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
doc->FlushPendingNotifications(Flush_Layout);
|
||||
|
||||
if (!thisContent->GetPrimaryFrame()) {
|
||||
LOG(("OBJLC [%p]: Not instantiating plugin with no frame", this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Don't do anything if we already have an active instance.
|
||||
if (mInstanceOwner) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Don't allow re-entry into initialization code.
|
||||
if (mInstantiating) {
|
||||
return NS_OK;
|
||||
}
|
||||
mInstantiating = true;
|
||||
AutoSetInstantiatingToFalse autoInstantiating(this);
|
||||
|
||||
@ -710,20 +718,6 @@ nsObjectLoadingContent::InstantiatePluginInstance()
|
||||
// of this method.
|
||||
nsCOMPtr<nsIObjectLoadingContent> kungFuDeathGrip = this;
|
||||
|
||||
nsCOMPtr<nsIContent> thisContent =
|
||||
do_QueryInterface(static_cast<nsIImageLoadingContent *>(this));
|
||||
// Flush layout so that the plugin is initialized with the latest information.
|
||||
nsIDocument* doc = thisContent->GetCurrentDoc();
|
||||
if (!doc) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
if (!InActiveDocument(thisContent)) {
|
||||
NS_ERROR("Shouldn't be calling "
|
||||
"InstantiatePluginInstance in an inactive document");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
doc->FlushPendingNotifications(Flush_Layout);
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
nsRefPtr<nsPluginHost> pluginHost =
|
||||
already_AddRefed<nsPluginHost>(nsPluginHost::GetInst());
|
||||
@ -1729,6 +1723,14 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
|
||||
oldType = mType;
|
||||
oldState = ObjectState();
|
||||
|
||||
if (!thisContent->GetPrimaryFrame()) {
|
||||
// We're un-rendered, and can't instantiate a plugin. HasNewFrame will
|
||||
// re-start us when we can proceed.
|
||||
LOG(("OBJLC [%p]: Aborting load - plugin-type, but no frame", this));
|
||||
CloseChannel();
|
||||
break;
|
||||
}
|
||||
|
||||
rv = pluginHost->NewEmbeddedPluginStreamListener(mURI, this, nullptr,
|
||||
getter_AddRefs(mFinalListener));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
17
content/canvas/crashtests/0px-size-font-shadow.html
Normal file
17
content/canvas/crashtests/0px-size-font-shadow.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE HTML>
|
||||
<body>
|
||||
<canvas id="canv" width="5" height="5"></canvas>
|
||||
<script>
|
||||
var canv = document.getElementById("canv");
|
||||
var ctx = canv.getContext("2d");
|
||||
|
||||
ctx.fillStyle = "red";
|
||||
// 0 size font shouldn't assert!
|
||||
ctx.font = "0px Arial";
|
||||
ctx.shadowColor = '#f00';
|
||||
ctx.shadowBlur = 4;
|
||||
ctx.fillText("A", 0, 0);
|
||||
document.documentElement.className = "";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -4,6 +4,7 @@ load 553938-1.html
|
||||
load 647480.html
|
||||
load 727547.html
|
||||
load 0px-size-font-667225.html
|
||||
load 0px-size-font-shadow.html
|
||||
load texImage2D.html
|
||||
load 729116.html
|
||||
load 745699-1.html
|
||||
|
@ -4321,6 +4321,9 @@ nsCanvasRenderingContext2D::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
// If we don't have anything to draw, don't bother.
|
||||
if (!mValid || !mSurface || mSurface->CairoStatus() || !mThebes ||
|
||||
!mSurfaceCreated) {
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -4337,6 +4340,9 @@ nsCanvasRenderingContext2D::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsRefPtr<CanvasLayer> canvasLayer = aManager->CreateCanvasLayer();
|
||||
if (!canvasLayer) {
|
||||
NS_WARNING("CreateCanvasLayer returned null!");
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
CanvasRenderingContext2DUserData *userData = nullptr;
|
||||
|
@ -3216,6 +3216,16 @@ nsCanvasRenderingContext2DAzure::DrawOrMeasureText(const nsAString& aRawText,
|
||||
isRTL = GET_BIDI_OPTION_DIRECTION(document->GetBidiOptions()) == IBMBIDI_TEXTDIRECTION_RTL;
|
||||
}
|
||||
|
||||
gfxFontGroup* currentFontStyle = GetCurrentFontStyle();
|
||||
NS_ASSERTION(currentFontStyle, "font group is null");
|
||||
|
||||
if (currentFontStyle->GetStyle()->size == 0.0F) {
|
||||
if (aWidth) {
|
||||
*aWidth = 0;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
const ContextState &state = CurrentState();
|
||||
|
||||
// This is only needed to know if we can know the drawing bounding box easily.
|
||||
@ -3234,11 +3244,8 @@ nsCanvasRenderingContext2DAzure::DrawOrMeasureText(const nsAString& aRawText,
|
||||
processor.mBoundingBox = gfxRect(0, 0, 0, 0);
|
||||
processor.mDoMeasureBoundingBox = doDrawShadow || !mIsEntireFrameInvalid;
|
||||
processor.mState = &CurrentState();
|
||||
processor.mFontgrp = currentFontStyle;
|
||||
|
||||
|
||||
processor.mFontgrp = GetCurrentFontStyle();
|
||||
NS_ASSERTION(processor.mFontgrp, "font group is null");
|
||||
|
||||
nscoord totalWidthCoord;
|
||||
|
||||
// calls bidi algo twice since it needs the full text width and the
|
||||
@ -4626,6 +4633,9 @@ nsCanvasRenderingContext2DAzure::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager *aManager)
|
||||
{
|
||||
if (!mValid) {
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -4646,6 +4656,9 @@ nsCanvasRenderingContext2DAzure::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsRefPtr<CanvasLayer> canvasLayer = aManager->CreateCanvasLayer();
|
||||
if (!canvasLayer) {
|
||||
NS_WARNING("CreateCanvasLayer returned null!");
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
MarkContextClean();
|
||||
return nullptr;
|
||||
}
|
||||
CanvasRenderingContext2DUserDataAzure *userData = nullptr;
|
||||
|
@ -312,6 +312,11 @@ public:
|
||||
static bool IsMediaPluginsType(const nsACString& aType);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get the mime type for this element.
|
||||
*/
|
||||
void GetMimeType(nsCString& aMimeType);
|
||||
|
||||
/**
|
||||
* Called when a child source element is added to this media element. This
|
||||
* may queue a task to run the select resource algorithm if appropriate.
|
||||
@ -872,6 +877,13 @@ protected:
|
||||
|
||||
// True if the media's channel's download has been suspended.
|
||||
bool mDownloadSuspendedByCache;
|
||||
|
||||
// The Content-Type for this media. When we are sniffing for the Content-Type,
|
||||
// and we are recreating a channel after the initial load, we need that
|
||||
// information to give it as a hint to the channel for it to bypass the
|
||||
// sniffing phase, that would fail because sniffing only works when applied to
|
||||
// the first bytes of the stream.
|
||||
nsCString mMimeType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1060,9 +1060,24 @@ nsHTMLInputElement::SetValue(const nsAString& aValue)
|
||||
}
|
||||
}
|
||||
else {
|
||||
SetValueInternal(aValue, false, true);
|
||||
if (IsSingleLineTextControl(false)) {
|
||||
GetValueInternal(mFocusedValue);
|
||||
// If the value has been set by a script, we basically want to keep the
|
||||
// current change event state. If the element is ready to fire a change
|
||||
// event, we should keep it that way. Otherwise, we should make sure the
|
||||
// element will not fire any event because of the script interaction.
|
||||
//
|
||||
// NOTE: this is currently quite expensive work (too much string
|
||||
// manipulation). We should probably optimize that.
|
||||
nsAutoString currentValue;
|
||||
GetValueInternal(currentValue);
|
||||
|
||||
SetValueInternal(aValue, false, true);
|
||||
|
||||
if (mFocusedValue.Equals(currentValue)) {
|
||||
GetValueInternal(mFocusedValue);
|
||||
}
|
||||
} else {
|
||||
SetValueInternal(aValue, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1034,6 +1034,11 @@ nsresult nsHTMLMediaElement::LoadResource()
|
||||
if (other) {
|
||||
// Clone it.
|
||||
nsresult rv = InitializeDecoderAsClone(other->mDecoder);
|
||||
// Get the mimetype from the element we clone, since we will not get it via
|
||||
// the channel, and we won't be able to sniff for it, because we will not
|
||||
// open a channel to get the beginning of the media (it is likely to already
|
||||
// be in the cache).
|
||||
mMimeType = other->mMimeType;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return rv;
|
||||
}
|
||||
@ -1072,7 +1077,8 @@ nsresult nsHTMLMediaElement::LoadResource()
|
||||
nullptr,
|
||||
loadGroup,
|
||||
nullptr,
|
||||
nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY,
|
||||
nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY |
|
||||
nsIChannel::LOAD_TREAT_APPLICATION_OCTET_STREAM_AS_UNKNOWN,
|
||||
channelPolicy);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
@ -2433,19 +2439,21 @@ nsresult nsHTMLMediaElement::InitializeDecoderForChannel(nsIChannel *aChannel,
|
||||
NS_ASSERTION(mDecoder == nullptr, "Shouldn't have a decoder");
|
||||
|
||||
nsAutoCString mimeType;
|
||||
aChannel->GetContentType(mimeType);
|
||||
|
||||
nsRefPtr<nsMediaDecoder> decoder = CreateDecoder(mimeType);
|
||||
aChannel->GetContentType(mMimeType);
|
||||
NS_ASSERTION(!mMimeType.IsEmpty(), "We should have the Content-Type.");
|
||||
|
||||
nsRefPtr<nsMediaDecoder> decoder = CreateDecoder(mMimeType);
|
||||
if (!decoder) {
|
||||
nsAutoString src;
|
||||
GetCurrentSrc(src);
|
||||
NS_ConvertUTF8toUTF16 mimeUTF16(mimeType);
|
||||
NS_ConvertUTF8toUTF16 mimeUTF16(mMimeType);
|
||||
const PRUnichar* params[] = { mimeUTF16.get(), src.get() };
|
||||
ReportLoadError("MediaLoadUnsupportedMimeType", params, ArrayLength(params));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
LOG(PR_LOG_DEBUG, ("%p Created decoder %p for type %s", this, decoder.get(), mimeType.get()));
|
||||
LOG(PR_LOG_DEBUG, ("%p Created decoder %p for type %s", this, decoder.get(), mMimeType.get()));
|
||||
|
||||
MediaResource* resource = MediaResource::Create(decoder, aChannel);
|
||||
if (!resource)
|
||||
@ -3528,6 +3536,11 @@ NS_IMETHODIMP nsHTMLMediaElement::GetMozFragmentEnd(double *aTime)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsHTMLMediaElement::GetMimeType(nsCString& aMimeType)
|
||||
{
|
||||
aMimeType = mMimeType;
|
||||
}
|
||||
|
||||
void nsHTMLMediaElement::NotifyAudioAvailableListener()
|
||||
{
|
||||
if (mDecoder) {
|
||||
|
@ -545,8 +545,22 @@ nsHTMLTextAreaElement::SetValueInternal(const nsAString& aValue,
|
||||
NS_IMETHODIMP
|
||||
nsHTMLTextAreaElement::SetValue(const nsAString& aValue)
|
||||
{
|
||||
// If the value has been set by a script, we basically want to keep the
|
||||
// current change event state. If the element is ready to fire a change
|
||||
// event, we should keep it that way. Otherwise, we should make sure the
|
||||
// element will not fire any event because of the script interaction.
|
||||
//
|
||||
// NOTE: this is currently quite expensive work (too much string
|
||||
// manipulation). We should probably optimize that.
|
||||
nsAutoString currentValue;
|
||||
GetValueInternal(currentValue, true);
|
||||
|
||||
SetValueInternal(aValue, false);
|
||||
GetValueInternal(mFocusedValue, true);
|
||||
|
||||
if (mFocusedValue.Equals(currentValue)) {
|
||||
GetValueInternal(mFocusedValue, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -106,6 +106,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=722599
|
||||
input.blur();
|
||||
is(textInputChange[0], 2, "text input element should have dispatched change event (2).");
|
||||
|
||||
// value being set while focused
|
||||
input.focus();
|
||||
input.value = 'foo';
|
||||
input.blur();
|
||||
is(textInputChange[0], 2, "text input element should not have dispatched change event (2).");
|
||||
|
||||
// value being set while focused after being modified manually
|
||||
input.focus();
|
||||
synthesizeKey("f", {});
|
||||
input.value = 'bar';
|
||||
input.blur();
|
||||
is(textInputChange[0], 3, "text input element should have dispatched change event (3).");
|
||||
|
||||
//focus and blur textarea
|
||||
var textarea = document.getElementById("textarea");
|
||||
textarea.focus();
|
||||
@ -113,6 +126,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=722599
|
||||
textarea.blur();
|
||||
is(textareaChange, 1, "Textarea element should have dispatched change event.");
|
||||
|
||||
// value being set while focused
|
||||
textarea.focus();
|
||||
textarea.value = 'foo';
|
||||
textarea.blur();
|
||||
is(textareaChange, 1, "textarea should not have dispatched change event (1).");
|
||||
|
||||
// value being set while focused after being modified manually
|
||||
textarea.focus();
|
||||
synthesizeKey("f", {});
|
||||
textarea.value = 'bar';
|
||||
textarea.blur();
|
||||
is(textareaChange, 2, "textearea should have dispatched change event (2).");
|
||||
|
||||
//Non-text input tests:
|
||||
for (var i = 0; i < NonTextInputTypes.length; ++i) {
|
||||
//button, submit, image and reset input type tests.
|
||||
|
@ -1246,7 +1246,10 @@ nsHTMLDocument::GetCookie(nsAString& aCookie)
|
||||
|
||||
nsXPIDLCString cookie;
|
||||
service->GetCookieString(codebaseURI, mChannel, getter_Copies(cookie));
|
||||
CopyASCIItoUTF16(cookie, aCookie);
|
||||
// CopyUTF8toUTF16 doesn't handle error
|
||||
// because it assumes that the input is valid.
|
||||
nsContentUtils::ConvertStringFromCharset(NS_LITERAL_CSTRING("utf-8"),
|
||||
cookie, aCookie);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -1285,7 +1288,7 @@ nsHTMLDocument::SetCookie(const nsAString& aCookie)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_LossyConvertUTF16toASCII cookie(aCookie);
|
||||
NS_ConvertUTF16toUTF8 cookie(aCookie);
|
||||
service->SetCookieString(codebaseURI, prompt, cookie.get(), mChannel);
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,8 @@ MOCHITEST_FILES = test_bug1682.html \
|
||||
test_bug677495.html \
|
||||
test_bug677495-1.html \
|
||||
test_bug741266.html \
|
||||
test_non-ascii-cookie.html \
|
||||
test_non-ascii-cookie.html^headers^ \
|
||||
$(NULL)
|
||||
|
||||
ifneq (mobile,$(MOZ_BUILD_APP))
|
||||
|
33
content/html/document/test/test_non-ascii-cookie.html
Normal file
33
content/html/document/test/test_non-ascii-cookie.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=784367
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for non-ASCII document.cookie</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=784367">Mozilla Bug 784367</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for non-ASCII document.cookie **/
|
||||
var c = document.cookie;
|
||||
is(document.cookie, 'abc=012©ABC\ufffdDEF', "document.cookie should be decoded as UTF-8");
|
||||
var newCookie = 'def=∼≩≭≧∯≳≲≣∽≸≸∺≸∠≯≮≥≲≲≯≲∽≡≬≥≲≴∨∱∩∾';
|
||||
document.cookie = newCookie;
|
||||
is(document.cookie, c + '; ' + newCookie, "document.cookie should be encoded as UTF-8");
|
||||
var date1 = new Date();
|
||||
date1.setTime(0);
|
||||
document.cookie = newCookie + 'def=;expires=' + date1.toGMTString();
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
Set-Cookie: abc=012©ABC©DEF
|
@ -704,12 +704,24 @@ ChannelMediaResource::RecreateChannel()
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = element->GetDocumentLoadGroup();
|
||||
NS_ENSURE_TRUE(loadGroup, NS_ERROR_NULL_POINTER);
|
||||
|
||||
return NS_NewChannel(getter_AddRefs(mChannel),
|
||||
mURI,
|
||||
nullptr,
|
||||
loadGroup,
|
||||
nullptr,
|
||||
loadFlags);
|
||||
nsresult rv = NS_NewChannel(getter_AddRefs(mChannel),
|
||||
mURI,
|
||||
nullptr,
|
||||
loadGroup,
|
||||
nullptr,
|
||||
loadFlags);
|
||||
|
||||
// We have cached the Content-Type, which should not change. Give a hint to
|
||||
// the channel to avoid a sniffing failure, which would be expected because we
|
||||
// are probably seeking in the middle of the bitstream, and sniffing relies
|
||||
// on the presence of a magic number at the beginning of the stream.
|
||||
nsAutoCString contentType;
|
||||
element->GetMimeType(contentType);
|
||||
NS_ASSERTION(!contentType.IsEmpty(),
|
||||
"When recreating a channel, we should know the Content-Type.");
|
||||
mChannel->SetContentType(contentType);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -127,6 +127,8 @@ MOCHITEST_FILES = \
|
||||
test_media_selection.html \
|
||||
test_playback.html \
|
||||
test_seekLies.html \
|
||||
test_media_sniffer.html \
|
||||
contentType.sjs \
|
||||
$(NULL)
|
||||
|
||||
$(warning test_error_in_video_document.html is disabled for intermittent failures. Bug 608634)
|
||||
@ -212,6 +214,9 @@ MOCHITEST_FILES += \
|
||||
video-overhang.ogg \
|
||||
file_a4_tone.ogg \
|
||||
detodos.opus \
|
||||
short.mp4 \
|
||||
notags.mp3 \
|
||||
id3tags.mp3 \
|
||||
$(NULL)
|
||||
|
||||
# Wave sample files
|
||||
|
77
content/media/test/contentType.sjs
Normal file
77
content/media/test/contentType.sjs
Normal file
@ -0,0 +1,77 @@
|
||||
// Parse the query string, and give us the value for a certain key, or false if
|
||||
// it does not exist.
|
||||
function parseQuery(request, key) {
|
||||
var params = request.queryString.split('?')[0].split('&');
|
||||
for (var j = 0; j < params.length; ++j) {
|
||||
var p = params[j];
|
||||
if (p == key)
|
||||
return true;
|
||||
if (p.indexOf(key + "=") == 0)
|
||||
return p.substring(key.length + 1);
|
||||
if (p.indexOf("=") < 0 && key == "")
|
||||
return p;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function handleRequest(request, response) {
|
||||
try {
|
||||
// Get the filename to send back.
|
||||
var filename = parseQuery(request, "file");
|
||||
|
||||
const CC = Components.Constructor;
|
||||
const BinaryOutputStream = CC("@mozilla.org/binaryoutputstream;1",
|
||||
"nsIBinaryOutputStream",
|
||||
"setOutputStream");
|
||||
var file = Components.classes["@mozilla.org/file/directory_service;1"].
|
||||
getService(Components.interfaces.nsIProperties).
|
||||
get("CurWorkD", Components.interfaces.nsILocalFile);
|
||||
var fis = Components.classes['@mozilla.org/network/file-input-stream;1'].
|
||||
createInstance(Components.interfaces.nsIFileInputStream);
|
||||
var bis = Components.classes["@mozilla.org/binaryinputstream;1"].
|
||||
createInstance(Components.interfaces.nsIBinaryInputStream);
|
||||
var paths = "tests/content/media/test/" + filename;
|
||||
dump(paths + '\n');
|
||||
var split = paths.split("/");
|
||||
for(var i = 0; i < split.length; ++i) {
|
||||
file.append(split[i]);
|
||||
}
|
||||
fis.init(file, -1, -1, false);
|
||||
|
||||
// handle range requests
|
||||
var partialstart = 0,
|
||||
partialend = file.fileSize - 1;
|
||||
if (request.hasHeader("Range")) {
|
||||
var range = request.getHeader("Range");
|
||||
var parts = range.replace(/bytes=/, "").split("-");
|
||||
var partialstart = parts[0];
|
||||
var partialend = parts[1];
|
||||
if (!partialend.length) {
|
||||
partialend = file.fileSize - 1;
|
||||
}
|
||||
response.setStatusLine(request.httpVersion, 206, "Partial Content");
|
||||
var contentRange = "bytes " + partialstart + "-" + partialend + "/" + file.fileSize;
|
||||
response.setHeader("Content-Range", contentRange);
|
||||
}
|
||||
|
||||
fis.seek(Components.interfaces.nsISeekableStream.NS_SEEK_SET, partialstart);
|
||||
bis.setInputStream(fis);
|
||||
|
||||
var sendContentType = parseQuery(request, "nomime");
|
||||
if (sendContentType == false) {
|
||||
var contentType = parseQuery(request, "type");
|
||||
if (contentType == false) {
|
||||
// This should not happen.
|
||||
dump("No type specified without having \'nomime\' in parameters.");
|
||||
return;
|
||||
}
|
||||
response.setHeader("Content-Type", contentType, false);
|
||||
}
|
||||
response.setHeader("Content-Length", ""+bis.available(), false);
|
||||
|
||||
var bytes = bis.readBytes(bis.available());
|
||||
response.write(bytes, bytes.length);
|
||||
} catch (e) {
|
||||
dump ("ERROR : " + e + "\n");
|
||||
}
|
||||
}
|
BIN
content/media/test/id3tags.mp3
Normal file
BIN
content/media/test/id3tags.mp3
Normal file
Binary file not shown.
@ -156,6 +156,19 @@ var gPlayTests = [
|
||||
{ name:"bogus.duh", type:"bogus/duh", duration:Number.NaN }
|
||||
];
|
||||
|
||||
// A file for each type we can support.
|
||||
var gSnifferTests = [
|
||||
{ name:"big.wav", type:"audio/x-wav", duration:9.278981, size:102444 },
|
||||
{ name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.233, size:28942 },
|
||||
{ name:"seek.webm", type:"video/webm", duration:3.966, size:215529 },
|
||||
{ name:"short.mp4", type:"video/mp4", duration:0.2, size:29435},
|
||||
// A mp3 file without id3 tags.
|
||||
{ name:"notags.mp3", type:"audio/mpeg", duration:0.28, size:2506},
|
||||
// A mp3 file with id3 tags.
|
||||
{ name:"id3tags.mp3", type:"audio/mpeg", duration:0.28, size:3530},
|
||||
{ name:"bogus.duh", type:"bogus/duh" }
|
||||
];
|
||||
|
||||
// Converts a path/filename to a file:// URI which we can load from disk.
|
||||
// Optionally checks whether the file actually exists on disk at the location
|
||||
// we've specified.
|
||||
|
BIN
content/media/test/notags.mp3
Normal file
BIN
content/media/test/notags.mp3
Normal file
Binary file not shown.
BIN
content/media/test/short.mp4
Normal file
BIN
content/media/test/short.mp4
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user