зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central into services-central
This commit is contained in:
Коммит
513366f6cd
|
@ -339,7 +339,7 @@ getSelectedColumnsCB(AtkTable *aTable, gint **aSelected)
|
|||
gint *atkColumns = g_new(gint, size);
|
||||
if (!atkColumns) {
|
||||
NS_WARNING("OUT OF MEMORY");
|
||||
return nsnull;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//copy
|
||||
|
@ -374,7 +374,7 @@ getSelectedRowsCB(AtkTable *aTable, gint **aSelected)
|
|||
gint *atkRows = g_new(gint, size);
|
||||
if (!atkRows) {
|
||||
NS_WARNING("OUT OF MEMORY");
|
||||
return nsnull;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//copy
|
||||
|
|
|
@ -349,12 +349,12 @@ getTextSelectionCountCB(AtkText *aText)
|
|||
{
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
|
||||
if (!accWrap)
|
||||
return nsnull;
|
||||
return 0;
|
||||
|
||||
nsCOMPtr<nsIAccessibleText> accText;
|
||||
accWrap->QueryInterface(NS_GET_IID(nsIAccessibleText),
|
||||
getter_AddRefs(accText));
|
||||
NS_ENSURE_TRUE(accText, nsnull);
|
||||
NS_ENSURE_TRUE(accText, 0);
|
||||
|
||||
PRInt32 selectionCount;
|
||||
nsresult rv = accText->GetSelectionCount(&selectionCount);
|
||||
|
|
|
@ -676,24 +676,29 @@ Accessible::NativeState()
|
|||
state |= VisibilityState();
|
||||
|
||||
nsIFrame *frame = GetFrame();
|
||||
if (frame && (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW))
|
||||
state |= states::FLOATING;
|
||||
if (frame) {
|
||||
if (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW)
|
||||
state |= states::FLOATING;
|
||||
|
||||
// Check if a XUL element has the popup attribute (an attached popup menu).
|
||||
if (mContent->IsXUL()) {
|
||||
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::popup))
|
||||
state |= states::HASPOPUP;
|
||||
|
||||
const nsStyleXUL *xulStyle = frame->GetStyleXUL();
|
||||
if (xulStyle && frame->IsBoxFrame()) {
|
||||
// In XUL all boxes are either vertical or horizontal
|
||||
if (xulStyle->mBoxOrient == NS_STYLE_BOX_ORIENT_VERTICAL)
|
||||
state |= states::VERTICAL;
|
||||
else
|
||||
state |= states::HORIZONTAL;
|
||||
// XXX we should look at layout for non XUL box frames, but need to decide
|
||||
// how that interacts with ARIA.
|
||||
if (mContent->IsXUL() && frame->IsBoxFrame()) {
|
||||
const nsStyleXUL* xulStyle = frame->GetStyleXUL();
|
||||
if (xulStyle && frame->IsBoxFrame()) {
|
||||
// In XUL all boxes are either vertical or horizontal
|
||||
if (xulStyle->mBoxOrient == NS_STYLE_BOX_ORIENT_VERTICAL)
|
||||
state |= states::VERTICAL;
|
||||
else
|
||||
state |= states::HORIZONTAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if a XUL element has the popup attribute (an attached popup menu).
|
||||
if (mContent->IsXUL() && mContent->HasAttr(kNameSpaceID_None,
|
||||
nsGkAtoms::popup))
|
||||
state |= states::HASPOPUP;
|
||||
|
||||
// Bypass the link states specialization for non links.
|
||||
if (!mRoleMapEntry || mRoleMapEntry->roleRule == kUseNativeRole ||
|
||||
mRoleMapEntry->role == roles::LINK)
|
||||
|
|
|
@ -38,12 +38,12 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsIAccessible
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument);
|
||||
NS_SCRIPTABLE NS_IMETHOD ScrollTo(PRUint32 aScrollType);
|
||||
NS_SCRIPTABLE NS_IMETHOD ScrollToPoint(PRUint32 aCoordinateType, PRInt32 aX, PRInt32 aY);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetLanguage(nsAString& aLanguage);
|
||||
NS_IMETHOD GetDOMNode(nsIDOMNode** aDOMNode);
|
||||
NS_IMETHOD GetDocument(nsIAccessibleDocument** aDocument);
|
||||
NS_IMETHOD GetRootDocument(nsIAccessibleDocument** aRootDocument);
|
||||
NS_IMETHOD ScrollTo(PRUint32 aScrollType);
|
||||
NS_IMETHOD ScrollToPoint(PRUint32 aCoordinateType, PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD GetLanguage(nsAString& aLanguage);
|
||||
NS_IMETHOD GetParent(nsIAccessible **aParent);
|
||||
NS_IMETHOD GetNextSibling(nsIAccessible **aNextSibling);
|
||||
NS_IMETHOD GetPreviousSibling(nsIAccessible **aPreviousSibling);
|
||||
|
|
|
@ -482,7 +482,7 @@ NS_IMETHODIMP
|
|||
HyperTextAccessible::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar* aCharacter)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCharacter);
|
||||
*aCharacter = nsnull;
|
||||
*aCharacter = L'\0';
|
||||
|
||||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -30,7 +30,6 @@ build/Makefile
|
|||
build/pgo/Makefile
|
||||
build/pgo/blueprint/Makefile
|
||||
build/pgo/js-input/Makefile
|
||||
build/virtualenv/Makefile
|
||||
config/Makefile
|
||||
config/autoconf.mk
|
||||
config/nspr/Makefile
|
||||
|
|
|
@ -245,6 +245,8 @@ pref("ui.dragThresholdY", 25);
|
|||
// Layers Acceleration
|
||||
pref("layers.acceleration.disabled", false);
|
||||
pref("layers.offmainthreadcomposition.enabled", true);
|
||||
pref("layers.offmainthreadcomposition.animate-opacity", true);
|
||||
pref("layers.offmainthreadcomposition.animate-transform", true);
|
||||
pref("layers.async-video.enabled", true);
|
||||
pref("layers.async-pan-zoom.enabled", true);
|
||||
|
||||
|
|
|
@ -451,8 +451,8 @@ var gAllTests = [
|
|||
// Give www.example.com privileges to store offline data
|
||||
var pm = Cc["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Ci.nsIPermissionManager);
|
||||
pm.add(URI, "offline-app", Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
pm.add(URI, "offline-app", Ci.nsIOfflineCacheUpdateService.ALLOW_NO_WARN);
|
||||
pm.addFromPrincipal(principal, "offline-app", Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
pm.addFromPrincipal(principal, "offline-app", Ci.nsIOfflineCacheUpdateService.ALLOW_NO_WARN);
|
||||
|
||||
// Store some user data to localStorage
|
||||
var dsm = Cc["@mozilla.org/dom/storagemanager;1"]
|
||||
|
@ -525,6 +525,10 @@ var gAllTests = [
|
|||
.getService(Ci.nsIIOService);
|
||||
var URI = ios.newURI(URL, null, null);
|
||||
|
||||
var sm = Cc["@mozilla.org/scriptsecuritymanager;1"]
|
||||
.getService(Ci.nsIScriptSecurityManager);
|
||||
var principal = sm.getNoAppCodebasePrincipal(URI);
|
||||
|
||||
// Open the dialog
|
||||
let wh = new WindowHelper();
|
||||
wh.onload = function () {
|
||||
|
@ -539,7 +543,7 @@ var gAllTests = [
|
|||
// Check all has been deleted (privileges, data, cache)
|
||||
var pm = Cc["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Ci.nsIPermissionManager);
|
||||
is(pm.testPermission(URI, "offline-app"), 0, "offline-app permissions removed");
|
||||
is(pm.testPermissionFromPrincipal(principal, "offline-app"), 0, "offline-app permissions removed");
|
||||
};
|
||||
wh.open();
|
||||
}
|
||||
|
|
|
@ -37,9 +37,20 @@ window.addEventListener("message", function(event) {
|
|||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"].
|
||||
getService(Components.interfaces.nsIPermissionManager);
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
var uri1 = ioService.newURI(frames.testFrame.location, null, null);
|
||||
var uri2 = ioService.newURI(frames.testFrame3.location, null, null);
|
||||
|
||||
pm.remove(frames.testFrame.location.hostname, "offline-app");
|
||||
pm.remove(frames.testFrame3.location.hostname, "offline-app");
|
||||
var principal1 = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
|
||||
.getService(Components.interfaces.nsIScriptSecurityManager)
|
||||
.getNoAppCodebasePrincipal(uri1);
|
||||
var principal2 = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
|
||||
.getService(Components.interfaces.nsIScriptSecurityManager)
|
||||
.getNoAppCodebasePrincipal(uri2);
|
||||
|
||||
pm.removeFromPrincipal(principal1, "offline-app");
|
||||
pm.removeFromPrincipal(principal2, "offline-app");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
|
@ -37,8 +37,15 @@ function finishTest() {
|
|||
var pm = Components.classes["@mozilla.org/permissionmanager;1"].
|
||||
getService(Components.interfaces.nsIPermissionManager);
|
||||
|
||||
pm.remove("mochi.test", "offline-app");
|
||||
|
||||
var uri = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)
|
||||
.newURI(window.frames[0].location, null, null);
|
||||
var principal = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
|
||||
.getService(Components.interfaces.nsIScriptSecurityManager)
|
||||
.getNoAppCodebasePrincipal(uri);
|
||||
|
||||
pm.removeFromPrincipal(principal, "offline-app");
|
||||
|
||||
window.removeEventListener("message", handleMessageEvents, false);
|
||||
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -73,7 +73,7 @@ nsIEHistoryEnumerator::EnsureInitialized()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIEHistoryEnumerator::HasMoreElements(bool* _retval NS_OUTPARAM)
|
||||
nsIEHistoryEnumerator::HasMoreElements(bool* _retval)
|
||||
{
|
||||
*_retval = false;
|
||||
|
||||
|
@ -124,7 +124,7 @@ nsIEHistoryEnumerator::HasMoreElements(bool* _retval NS_OUTPARAM)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIEHistoryEnumerator::GetNext(nsISupports** _retval NS_OUTPARAM)
|
||||
nsIEHistoryEnumerator::GetNext(nsISupports** _retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
|
||||
|
|
|
@ -9,6 +9,9 @@ const ABOUT_PERMISSIONS_SPEC = "about:permissions";
|
|||
const TEST_URI_1 = NetUtil.newURI("http://mozilla.com/");
|
||||
const TEST_URI_2 = NetUtil.newURI("http://mozilla.org/");
|
||||
|
||||
const TEST_PRINCIPAL_1 = Services.scriptSecurityManager.getNoAppCodebasePrincipal(TEST_URI_1);
|
||||
const TEST_PRINCIPAL_2 = Services.scriptSecurityManager.getNoAppCodebasePrincipal(TEST_URI_2);
|
||||
|
||||
// values from DefaultPermissions object
|
||||
const PERM_UNKNOWN = 0;
|
||||
const PERM_ALLOW = 1;
|
||||
|
@ -50,7 +53,7 @@ function test() {
|
|||
Services.logins.setLoginSavingEnabled(TEST_URI_2.prePath, true);
|
||||
} else {
|
||||
// set permissions on a site without history visits to test enumerateServices
|
||||
Services.perms.add(TEST_URI_2, type, TEST_PERMS[type]);
|
||||
Services.perms.addFromPrincipal(TEST_PRINCIPAL_2, type, TEST_PERMS[type]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,8 +70,8 @@ function test() {
|
|||
function cleanUp() {
|
||||
for (let type in TEST_PERMS) {
|
||||
if (type != "password") {
|
||||
Services.perms.remove(TEST_URI_1.host, type);
|
||||
Services.perms.remove(TEST_URI_2.host, type);
|
||||
Services.perms.removeFromPrincipal(TEST_PRINCIPAL_1, type);
|
||||
Services.perms.removeFromPrincipal(TEST_PRINCIPAL_2, type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,7 +241,7 @@ var tests = [
|
|||
is(geoMenulist.value, PERM_UNKNOWN, "menulist correctly shows that geolocation permission is unspecified");
|
||||
|
||||
// change a permission programatically
|
||||
Services.perms.add(TEST_URI_2, "geo", PERM_DENY);
|
||||
Services.perms.addFromPrincipal(TEST_PRINCIPAL_2, "geo", PERM_DENY);
|
||||
// check to make sure this change is reflected in the UI
|
||||
is(geoMenulist.value, PERM_DENY, "menulist shows that geolocation is blocked");
|
||||
|
||||
|
@ -247,7 +250,7 @@ var tests = [
|
|||
geoMenulist.selectedItem = geoAllowItem;
|
||||
geoMenulist.doCommand();
|
||||
// check to make sure this change is reflected in the permission manager
|
||||
is(Services.perms.testPermission(TEST_URI_2, "geo"), PERM_ALLOW,
|
||||
is(Services.perms.testPermissionFromPrincipal(TEST_PRINCIPAL_2, "geo"), PERM_ALLOW,
|
||||
"permission manager shows that geolocation is allowed");
|
||||
|
||||
runNextTest();
|
||||
|
@ -273,7 +276,7 @@ var tests = [
|
|||
ok(Services.logins.getLoginSavingEnabled(TEST_URI_2.prePath),
|
||||
"password saving should be enabled by default");
|
||||
} else {
|
||||
is(Services.perms.testPermission(TEST_URI_2, type), PERM_UNKNOWN,
|
||||
is(Services.perms.testPermissionFromPrincipal(TEST_PRINCIPAL_2, type), PERM_UNKNOWN,
|
||||
type + " permission should not be set for test site 2");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -249,7 +249,11 @@ function add_permission(aURI)
|
|||
check_permission_exists(aURI, false);
|
||||
let pm = Cc["@mozilla.org/permissionmanager;1"].
|
||||
getService(Ci.nsIPermissionManager);
|
||||
pm.add(aURI, PERMISSION_TYPE, PERMISSION_VALUE);
|
||||
let principal = Cc["@mozilla.org/scriptsecuritymanager;1"]
|
||||
.getService(Ci.nsIScriptSecurityManager)
|
||||
.getNoAppCodebasePrincipal(aURI);
|
||||
|
||||
pm.addFromPrincipal(principal, PERMISSION_TYPE, PERMISSION_VALUE);
|
||||
check_permission_exists(aURI, true);
|
||||
}
|
||||
|
||||
|
@ -265,7 +269,11 @@ function check_permission_exists(aURI, aExists)
|
|||
{
|
||||
let pm = Cc["@mozilla.org/permissionmanager;1"].
|
||||
getService(Ci.nsIPermissionManager);
|
||||
let perm = pm.testExactPermission(aURI, PERMISSION_TYPE);
|
||||
let principal = Cc["@mozilla.org/scriptsecuritymanager;1"]
|
||||
.getService(Ci.nsIScriptSecurityManager)
|
||||
.getNoAppCodebasePrincipal(aURI);
|
||||
|
||||
let perm = pm.testExactPermissionFromPrincipal(principal, PERMISSION_TYPE);
|
||||
let checker = aExists ? do_check_eq : do_check_neq;
|
||||
checker(perm, PERMISSION_VALUE);
|
||||
}
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
|
||||
#include "nsIShellService.h"
|
||||
#include "nsStringAPI.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsGNOMEShellService : public nsIShellService
|
||||
class nsGNOMEShellService MOZ_FINAL : public nsIShellService
|
||||
{
|
||||
public:
|
||||
nsGNOMEShellService() : mCheckedThisSession(false), mAppIsInPath(false) { }
|
||||
|
|
|
@ -14,6 +14,9 @@ const TEST_URI2 = "http://example.com/browser/browser/devtools/styleinspector/"
|
|||
const XUL_URI = Cc["@mozilla.org/network/io-service;1"]
|
||||
.getService(Ci.nsIIOService)
|
||||
.newURI(TEST_URI2, null, null);
|
||||
const XUL_PRINCIPAL = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
|
||||
.getService(Ci.nsIScriptSecurityManager)
|
||||
.getNoAppCodebasePrincipal(XUL_URI);
|
||||
|
||||
let tempScope = {};
|
||||
Cu.import("resource:///modules/devtools/CssLogic.jsm", tempScope);
|
||||
|
@ -47,7 +50,7 @@ function testFromHTML()
|
|||
function openXUL()
|
||||
{
|
||||
Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager)
|
||||
.add(XUL_URI, 'allowXULXBL', Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
.addFromPrincipal(XUL_PRINCIPAL, 'allowXULXBL', Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
addTab(TEST_URI2);
|
||||
browser.addEventListener("load", xulLoaded, true);
|
||||
}
|
||||
|
@ -93,7 +96,7 @@ function finishUp()
|
|||
{
|
||||
info("finishing up");
|
||||
Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager)
|
||||
.add(XUL_URI, 'allowXULXBL', Ci.nsIPermissionManager.DENY_ACTION);
|
||||
.addFromPrincipal(XUL_PRINCIPAL, 'allowXULXBL', Ci.nsIPermissionManager.DENY_ACTION);
|
||||
doc = null;
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
|
|
|
@ -554,6 +554,8 @@ html[dir=rtl] .iq-resizable-se {
|
|||
|
||||
#searchbox{
|
||||
width: 270px;
|
||||
max-width: -moz-available;
|
||||
-moz-margin-start: 20px;
|
||||
height: 30px;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,1), 0px 0px 9px rgba(0,0,0,.8);
|
||||
color: white;
|
||||
|
|
|
@ -550,6 +550,8 @@ html[dir=rtl] .iq-resizable-se {
|
|||
|
||||
#searchbox {
|
||||
width: 270px;
|
||||
max-width: -moz-available;
|
||||
-moz-margin-start: 20px;
|
||||
height: 30px;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,1), 0px 0px 13px rgba(0,0,0,.8);
|
||||
color: white;
|
||||
|
|
|
@ -569,6 +569,8 @@ html[dir=rtl] .iq-resizable-se {
|
|||
|
||||
#searchbox{
|
||||
width: 270px;
|
||||
max-width: -moz-available;
|
||||
-moz-margin-start: 20px;
|
||||
height: 30px;
|
||||
box-shadow: 0px 1px 0px rgba(255,255,255,.5), 0px -1px 0px rgba(0,0,0,1), 0px 0px 9px rgba(0,0,0,.8);
|
||||
color: white;
|
||||
|
|
|
@ -102,13 +102,11 @@ class DeviceManagerSUT(DeviceManager):
|
|||
|
||||
def _shouldCmdCloseSocket(self, cmd):
|
||||
""" Some commands need to close the socket after they are sent:
|
||||
* push
|
||||
* rebt
|
||||
* uninst
|
||||
* quit
|
||||
"""
|
||||
socketClosingCmds = [re.compile('^push .*$'),
|
||||
re.compile('^quit.*'),
|
||||
socketClosingCmds = [re.compile('^quit.*'),
|
||||
re.compile('^rebt.*'),
|
||||
re.compile('^uninst .*$')]
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import java.io.InputStream;
|
|||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.net.DatagramPacket;
|
||||
import java.net.DatagramSocket;
|
||||
import java.net.InetAddress;
|
||||
|
@ -106,7 +107,7 @@ public class DoCommand {
|
|||
String ffxProvider = "org.mozilla.ffxcp";
|
||||
String fenProvider = "org.mozilla.fencp";
|
||||
|
||||
private final String prgVersion = "SUTAgentAndroid Version 1.09";
|
||||
private final String prgVersion = "SUTAgentAndroid Version 1.10";
|
||||
|
||||
public enum Command
|
||||
{
|
||||
|
@ -2571,7 +2572,7 @@ private void CancelNotification()
|
|||
|
||||
public String GetMemoryInfo()
|
||||
{
|
||||
String sRet = "PA:" + GetMemoryConfig();
|
||||
String sRet = "PA:" + GetMemoryConfig() + ", FREE: " + GetMemoryUsage();
|
||||
return (sRet);
|
||||
}
|
||||
|
||||
|
@ -2585,6 +2586,33 @@ private void CancelNotification()
|
|||
return (lMem);
|
||||
}
|
||||
|
||||
public long GetMemoryUsage()
|
||||
{
|
||||
|
||||
String load = "";
|
||||
try {
|
||||
RandomAccessFile reader = new RandomAccessFile("/proc/meminfo", "r");
|
||||
load = reader.readLine(); // Read in the MemTotal
|
||||
load = reader.readLine(); // Read in the MemFree
|
||||
} catch (IOException ex) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
String[] toks = load.split(" ");
|
||||
int i = 1;
|
||||
for (i=1; i < toks.length; i++) {
|
||||
String val = toks[i].trim();
|
||||
if (!val.equals("")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i <= toks.length) {
|
||||
long lMem = Long.parseLong(toks[i].trim());
|
||||
return (lMem * 1024);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
public String UpdateCallBack(String sFileName)
|
||||
{
|
||||
String sRet = sErrorPrefix + "No file specified";
|
||||
|
|
|
@ -26,3 +26,4 @@ HOST_CPPSRCS = $(CPPSRCS)
|
|||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
|
||||
HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION)
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
# 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/.
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
# Paths here are topsrcdir-relative, and
|
||||
# must be in dependency-order.
|
||||
setuptools_packages := \
|
||||
other-licenses/simplejson-2.1.1 \
|
||||
testing/mozbase/manifestdestiny \
|
||||
testing/mozbase/mozinfo \
|
||||
testing/mozbase/mozinstall \
|
||||
testing/mozbase/mozlog \
|
||||
testing/mozbase/mozprocess \
|
||||
testing/mozbase/mozprofile \
|
||||
testing/mozbase/mozrunner \
|
||||
build/pylib/blessings \
|
||||
$(NULL)
|
||||
|
||||
|
||||
define install_setuptools_package
|
||||
cd $(topsrcdir)/$(1)/; CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" CXXFLAGS="$(HOST_CXXFLAGS)" $(PYTHON) setup.py develop
|
||||
|
||||
endef
|
||||
|
||||
default::
|
||||
$(foreach package,$(setuptools_packages),$(call install_setuptools_package,$(package)))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
|
@ -0,0 +1,9 @@
|
|||
setup.py:other-licenses/simplejson-2.1.1:develop
|
||||
setup.py:testing/mozbase/manifestdestiny:develop
|
||||
setup.py:testing/mozbase/mozinfo:develop
|
||||
setup.py:testing/mozbase/mozinstall:develop
|
||||
setup.py:testing/mozbase/mozlog:develop
|
||||
setup.py:testing/mozbase/mozprocess:develop
|
||||
setup.py:testing/mozbase/mozprofile:develop
|
||||
setup.py:testing/mozbase/mozrunner:develop
|
||||
setup.py:build/pylib/blessings:develop
|
|
@ -0,0 +1,63 @@
|
|||
# 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 contains code for populating the virtualenv environment for
|
||||
# Mozilla's build system. It is typically called as part of configure.
|
||||
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def populate_virtualenv(top_source_directory, manifest_filename):
|
||||
"""Populate the virtualenv from the contents of a manifest.
|
||||
|
||||
The manifest file consists of colon-delimited fields. The first field
|
||||
specifies the action. The remaining fields are arguments to that action.
|
||||
The following actions are supported:
|
||||
|
||||
setup.py -- Invoke setup.py for a package. Expects the arguments:
|
||||
1. relative path directory containing setup.py.
|
||||
2. argument(s) to setup.py. e.g. "develop". Each program argument is
|
||||
delimited by a colon. Arguments with colons are not yet supported.
|
||||
|
||||
Note that the Python interpreter running this function should be the one
|
||||
from the virtualenv. If it is the system Python or if the environment is
|
||||
not configured properly, packages could be installed into the wrong place.
|
||||
This is how virtualenv's work.
|
||||
"""
|
||||
packages = []
|
||||
fh = open(manifest_filename, 'rU')
|
||||
for line in fh:
|
||||
packages.append(line.rstrip().split(':'))
|
||||
fh.close()
|
||||
|
||||
for package in packages:
|
||||
if package[0] == 'setup.py':
|
||||
assert len(package) >= 2
|
||||
|
||||
call_setup(os.path.join(top_source_directory, package[1]),
|
||||
package[2:])
|
||||
|
||||
def call_setup(directory, arguments):
|
||||
"""Calls setup.py in a directory."""
|
||||
setup = os.path.join(directory, 'setup.py')
|
||||
|
||||
program = [sys.executable, setup]
|
||||
program.extend(arguments)
|
||||
|
||||
# We probably could call the contents of this file inside the context of
|
||||
# this interpreter using execfile() or similar. However, if global
|
||||
# variables like sys.path are adjusted, this could cause all kinds of
|
||||
# havoc. While this may work, invoking a new process is safer.
|
||||
result = subprocess.call(program, cwd=directory)
|
||||
|
||||
if result != 0:
|
||||
raise Exception('Error installing package: %s' % directory)
|
||||
|
||||
# configure invokes us with /path/to/topsrcdir and /path/to/manifest
|
||||
if __name__ == '__main__':
|
||||
assert len(sys.argv) == 3
|
||||
|
||||
populate_virtualenv(sys.argv[1], sys.argv[2])
|
||||
sys.exit(0)
|
|
@ -29,12 +29,12 @@ protected:
|
|||
public:
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetPreferences(char** prefBranch NS_OUTPARAM, char** id NS_OUTPARAM, char** subjectName NS_OUTPARAM, char** grantedList NS_OUTPARAM, char** deniedList NS_OUTPARAM, bool* isTrusted NS_OUTPARAM);
|
||||
NS_IMETHOD GetPreferences(char** prefBranch, char** id, char** subjectName, char** grantedList, char** deniedList, bool* isTrusted);
|
||||
NS_IMETHOD GetSecurityPolicy(void** aSecurityPolicy);
|
||||
NS_IMETHOD SetSecurityPolicy(void* aSecurityPolicy);
|
||||
NS_IMETHOD CanEnableCapability(const char* capability, PRInt16* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD IsCapabilityEnabled(const char* capability, void* annotation, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD EnableCapability(const char* capability, void** annotation NS_INOUTPARAM);
|
||||
NS_IMETHOD CanEnableCapability(const char* capability, PRInt16* _retval);
|
||||
NS_IMETHOD IsCapabilityEnabled(const char* capability, void* annotation, bool* _retval);
|
||||
NS_IMETHOD EnableCapability(const char* capability, void** annotation);
|
||||
NS_IMETHOD GetHasCertificate(bool* aHasCertificate);
|
||||
NS_IMETHOD GetFingerprint(nsACString& aFingerprint);
|
||||
NS_IMETHOD GetPrettyName(nsACString& aPrettyName);
|
||||
|
@ -114,15 +114,15 @@ class nsPrincipal : public nsBasePrincipal
|
|||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSISERIALIZABLE
|
||||
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD EqualsIgnoringDomain(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD EqualsIgnoringDomain(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD GetHashValue(PRUint32* aHashValue);
|
||||
NS_IMETHOD GetURI(nsIURI** aURI);
|
||||
NS_IMETHOD GetDomain(nsIURI** aDomain);
|
||||
NS_IMETHOD SetDomain(nsIURI* aDomain);
|
||||
NS_IMETHOD GetOrigin(char** aOrigin);
|
||||
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD SubsumesIgnoringDomain(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD SubsumesIgnoringDomain(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report);
|
||||
NS_IMETHOD GetExtendedOrigin(nsACString& aExtendedOrigin);
|
||||
NS_IMETHOD GetAppStatus(PRUint16* aAppStatus);
|
||||
|
@ -192,15 +192,15 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIEXPANDEDPRINCIPAL
|
||||
NS_DECL_NSISERIALIZABLE
|
||||
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD EqualsIgnoringDomain(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD EqualsIgnoringDomain(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD GetHashValue(PRUint32* aHashValue);
|
||||
NS_IMETHOD GetURI(nsIURI** aURI);
|
||||
NS_IMETHOD GetDomain(nsIURI** aDomain);
|
||||
NS_IMETHOD SetDomain(nsIURI* aDomain);
|
||||
NS_IMETHOD GetOrigin(char** aOrigin);
|
||||
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD SubsumesIgnoringDomain(nsIPrincipal* other, bool* _retval NS_OUTPARAM);
|
||||
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD SubsumesIgnoringDomain(nsIPrincipal* other, bool* _retval);
|
||||
NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report);
|
||||
NS_IMETHOD GetExtendedOrigin(nsACString& aExtendedOrigin);
|
||||
NS_IMETHOD GetAppStatus(PRUint16* aAppStatus);
|
||||
|
|
|
@ -57,9 +57,9 @@ public:
|
|||
NS_IMETHOD ReloadChrome();
|
||||
NS_IMETHOD RefreshSkins();
|
||||
NS_IMETHOD AllowScriptsForPackage(nsIURI* url,
|
||||
bool* _retval NS_OUTPARAM);
|
||||
bool* _retval);
|
||||
NS_IMETHOD AllowContentToAccess(nsIURI* url,
|
||||
bool* _retval NS_OUTPARAM);
|
||||
bool* _retval);
|
||||
|
||||
// nsIChromeRegistry methods:
|
||||
NS_IMETHOD_(bool) WrappersEnabled(nsIURI *aURI);
|
||||
|
|
|
@ -22,24 +22,24 @@ class nsChromeRegistryChrome : public nsChromeRegistry
|
|||
nsChromeRegistryChrome();
|
||||
~nsChromeRegistryChrome();
|
||||
|
||||
NS_OVERRIDE nsresult Init();
|
||||
nsresult Init() MOZ_OVERRIDE;
|
||||
|
||||
NS_OVERRIDE NS_IMETHOD CheckForNewChrome();
|
||||
NS_OVERRIDE NS_IMETHOD CheckForOSAccessibility();
|
||||
NS_OVERRIDE NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
|
||||
nsIUTF8StringEnumerator* *aResult);
|
||||
NS_OVERRIDE NS_IMETHOD IsLocaleRTL(const nsACString& package,
|
||||
bool *aResult);
|
||||
NS_OVERRIDE NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
|
||||
nsACString& aLocale);
|
||||
NS_OVERRIDE NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
|
||||
const PRUnichar *someData);
|
||||
NS_IMETHOD CheckForNewChrome() MOZ_OVERRIDE;
|
||||
NS_IMETHOD CheckForOSAccessibility() MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
|
||||
nsIUTF8StringEnumerator* *aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD IsLocaleRTL(const nsACString& package,
|
||||
bool *aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
|
||||
nsACString& aLocale) MOZ_OVERRIDE;
|
||||
NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
|
||||
const PRUnichar *someData) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
NS_OVERRIDE NS_IMETHOD GetXULOverlays(nsIURI *aURI,
|
||||
nsISimpleEnumerator **_retval);
|
||||
NS_OVERRIDE NS_IMETHOD GetStyleOverlays(nsIURI *aURI,
|
||||
nsISimpleEnumerator **_retval);
|
||||
NS_IMETHOD GetXULOverlays(nsIURI *aURI,
|
||||
nsISimpleEnumerator **_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetStyleOverlays(nsIURI *aURI,
|
||||
nsISimpleEnumerator **_retval) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
void SendRegisteredChrome(mozilla::dom::PContentParent* aChild);
|
||||
|
@ -50,12 +50,12 @@ class nsChromeRegistryChrome : public nsChromeRegistry
|
|||
PRUint32 number, void *arg);
|
||||
|
||||
nsresult SelectLocaleFromPref(nsIPrefBranch* prefs);
|
||||
NS_OVERRIDE nsresult UpdateSelectedLocale();
|
||||
NS_OVERRIDE nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
|
||||
const nsCString& aProvider,
|
||||
const nsCString& aPath);
|
||||
NS_OVERRIDE nsresult GetFlagsFromPackage(const nsCString& aPackage,
|
||||
PRUint32* aFlags);
|
||||
nsresult UpdateSelectedLocale() MOZ_OVERRIDE;
|
||||
nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
|
||||
const nsCString& aProvider,
|
||||
const nsCString& aPath) MOZ_OVERRIDE;
|
||||
nsresult GetFlagsFromPackage(const nsCString& aPackage,
|
||||
PRUint32* aFlags) MOZ_OVERRIDE;
|
||||
|
||||
static const PLDHashTableOps kTableOps;
|
||||
static PLDHashNumber HashKey(PLDHashTable *table, const void *key);
|
||||
|
|
|
@ -25,20 +25,20 @@ class nsChromeRegistryContent : public nsChromeRegistry
|
|||
const nsTArray<OverrideMapping>& aOverrides,
|
||||
const nsACString& aLocale);
|
||||
|
||||
NS_OVERRIDE NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
|
||||
nsIUTF8StringEnumerator* *aResult);
|
||||
NS_OVERRIDE NS_IMETHOD CheckForNewChrome();
|
||||
NS_OVERRIDE NS_IMETHOD CheckForOSAccessibility();
|
||||
NS_OVERRIDE NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const PRUnichar* aData);
|
||||
NS_OVERRIDE NS_IMETHOD IsLocaleRTL(const nsACString& package,
|
||||
bool *aResult);
|
||||
NS_OVERRIDE NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
|
||||
nsACString& aLocale);
|
||||
NS_OVERRIDE NS_IMETHOD GetStyleOverlays(nsIURI *aChromeURL,
|
||||
nsISimpleEnumerator **aResult);
|
||||
NS_OVERRIDE NS_IMETHOD GetXULOverlays(nsIURI *aChromeURL,
|
||||
nsISimpleEnumerator **aResult);
|
||||
NS_IMETHOD GetLocalesForPackage(const nsACString& aPackage,
|
||||
nsIUTF8StringEnumerator* *aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD CheckForNewChrome() MOZ_OVERRIDE;
|
||||
NS_IMETHOD CheckForOSAccessibility() MOZ_OVERRIDE;
|
||||
NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const PRUnichar* aData) MOZ_OVERRIDE;
|
||||
NS_IMETHOD IsLocaleRTL(const nsACString& package,
|
||||
bool *aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
|
||||
nsACString& aLocale) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetStyleOverlays(nsIURI *aChromeURL,
|
||||
nsISimpleEnumerator **aResult) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetXULOverlays(nsIURI *aChromeURL,
|
||||
nsISimpleEnumerator **aResult) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
struct PackageEntry
|
||||
|
@ -56,11 +56,11 @@ class nsChromeRegistryContent : public nsChromeRegistry
|
|||
void RegisterResource(const ResourceMapping& aResource);
|
||||
void RegisterOverride(const OverrideMapping& aOverride);
|
||||
|
||||
NS_OVERRIDE nsresult UpdateSelectedLocale();
|
||||
NS_OVERRIDE nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
|
||||
const nsCString& aProvider,
|
||||
const nsCString& aPath);
|
||||
NS_OVERRIDE nsresult GetFlagsFromPackage(const nsCString& aPackage, PRUint32* aFlags);
|
||||
nsresult UpdateSelectedLocale() MOZ_OVERRIDE;
|
||||
nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
|
||||
const nsCString& aProvider,
|
||||
const nsCString& aPath) MOZ_OVERRIDE;
|
||||
nsresult GetFlagsFromPackage(const nsCString& aPackage, PRUint32* aFlags) MOZ_OVERRIDE;
|
||||
|
||||
nsClassHashtable<nsCStringHashKey, PackageEntry> mPackagesHash;
|
||||
nsCString mLocale;
|
||||
|
|
28
client.mk
28
client.mk
|
@ -254,10 +254,10 @@ CONFIG_STATUS = $(wildcard $(OBJDIR)/config.status)
|
|||
CONFIG_CACHE = $(wildcard $(OBJDIR)/config.cache)
|
||||
|
||||
EXTRA_CONFIG_DEPS := \
|
||||
$(TOPSRCDIR)/aclocal.m4 \
|
||||
$(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
|
||||
$(TOPSRCDIR)/js/src/aclocal.m4 \
|
||||
$(NULL)
|
||||
$(TOPSRCDIR)/aclocal.m4 \
|
||||
$(wildcard $(TOPSRCDIR)/build/autoconf/*.m4) \
|
||||
$(TOPSRCDIR)/js/src/aclocal.m4 \
|
||||
$(NULL)
|
||||
|
||||
$(CONFIGURES): %: %.in $(EXTRA_CONFIG_DEPS)
|
||||
@$(PYTHON) $(TOPSRCDIR)/js/src/config/check-sync-dirs.py $(TOPSRCDIR)/js/src/build $(TOPSRCDIR)/build
|
||||
|
@ -265,16 +265,16 @@ $(CONFIGURES): %: %.in $(EXTRA_CONFIG_DEPS)
|
|||
cd $(@D); $(AUTOCONF)
|
||||
|
||||
CONFIG_STATUS_DEPS := \
|
||||
$(wildcard \
|
||||
$(CONFIGURES) \
|
||||
$(TOPSRCDIR)/allmakefiles.sh \
|
||||
$(TOPSRCDIR)/nsprpub/configure \
|
||||
$(TOPSRCDIR)/config/milestone.txt \
|
||||
$(TOPSRCDIR)/js/src/config/milestone.txt \
|
||||
$(TOPSRCDIR)/browser/config/version.txt \
|
||||
$(TOPSRCDIR)/*/confvars.sh \
|
||||
) \
|
||||
$(NULL)
|
||||
$(wildcard $(TOPSRCDIR)/*/confvars.sh) \
|
||||
$(CONFIGURES) \
|
||||
$(TOPSRCDIR)/allmakefiles.sh \
|
||||
$(TOPSRCDIR)/nsprpub/configure \
|
||||
$(TOPSRCDIR)/config/milestone.txt \
|
||||
$(TOPSRCDIR)/js/src/config/milestone.txt \
|
||||
$(TOPSRCDIR)/browser/config/version.txt \
|
||||
$(TOPSRCDIR)/build/virtualenv/packages.txt \
|
||||
$(TOPSRCDIR)/build/virtualenv/populate_virtualenv.py \
|
||||
$(NULL)
|
||||
|
||||
CONFIGURE_ENV_ARGS += \
|
||||
MAKE="$(MAKE)" \
|
||||
|
|
|
@ -237,7 +237,6 @@ MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
|
|||
MOZ_PERMISSIONS = @MOZ_PERMISSIONS@
|
||||
MOZ_XTF = @MOZ_XTF@
|
||||
MOZ_FLEXBOX = @MOZ_FLEXBOX@
|
||||
MOZ_SVG_DLISTS = @MOZ_SVG_DLISTS@
|
||||
MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@
|
||||
MOZ_PIXMAN_CFLAGS = @MOZ_PIXMAN_CFLAGS@
|
||||
|
||||
|
|
|
@ -684,10 +684,6 @@ SYSINSTALL = $(NSINSTALL) -t
|
|||
# This isn't necessarily true, just here
|
||||
sysinstall_cmd = install_cmd
|
||||
|
||||
# Directory nsinstall.
|
||||
DIR_INSTALL = $(INSTALL)
|
||||
dir_install_cmd = install_cmd
|
||||
|
||||
#
|
||||
# Localization build automation
|
||||
#
|
||||
|
|
|
@ -15,7 +15,7 @@ $(error Must define relativesrcdir when defining XPCSHELL_TESTS.)
|
|||
endif
|
||||
|
||||
define _INSTALL_TESTS
|
||||
$(DIR_INSTALL) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(relativesrcdir)/$(dir)
|
||||
$(call install_cmd, $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(relativesrcdir)/$(dir))
|
||||
|
||||
endef # do not remove the blank line!
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="*"
|
||||
name="nsinstall"
|
||||
type="win32"
|
||||
/>
|
||||
<description>nsinstall</description>
|
||||
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<ms_asmv3:security>
|
||||
<ms_asmv3:requestedPrivileges>
|
||||
<ms_asmv3:requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</ms_asmv3:requestedPrivileges>
|
||||
</ms_asmv3:security>
|
||||
</ms_asmv3:trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
58
configure.in
58
configure.in
|
@ -338,28 +338,28 @@ else
|
|||
AC_CHECK_PROGS(STRIP, strip, :)
|
||||
AC_CHECK_PROGS(WINDRES, windres, :)
|
||||
if test -z "$HOST_CC"; then
|
||||
HOST_CC='$(CC)'
|
||||
HOST_CC="$CC"
|
||||
fi
|
||||
if test -z "$HOST_CFLAGS"; then
|
||||
HOST_CFLAGS='$(CFLAGS)'
|
||||
HOST_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
if test -z "$HOST_CXX"; then
|
||||
HOST_CXX='$(CXX)'
|
||||
HOST_CXX="$CXX"
|
||||
fi
|
||||
if test -z "$HOST_CXXFLAGS"; then
|
||||
HOST_CXXFLAGS='$(CXXFLAGS)'
|
||||
HOST_CXXFLAGS="$CXXFLAGS"
|
||||
fi
|
||||
if test -z "$HOST_LDFLAGS"; then
|
||||
HOST_LDFLAGS='$(LDFLAGS)'
|
||||
HOST_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
if test -z "$HOST_RANLIB"; then
|
||||
HOST_RANLIB='$(RANLIB)'
|
||||
HOST_RANLIB="$RANLIB"
|
||||
fi
|
||||
if test -z "$HOST_AR"; then
|
||||
HOST_AR='$(AR)'
|
||||
HOST_AR="$AR"
|
||||
fi
|
||||
if test -z "$HOST_AR_FLAGS"; then
|
||||
HOST_AR_FLAGS='$(AR_FLAGS)'
|
||||
HOST_AR_FLAGS="$AR_FLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -2771,6 +2771,21 @@ dnl Note that we assume that mac & win32 have short wchar (see nscore.h)
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl Check for nullptr (bug 626472)
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_MSG_CHECKING(for nullptr)
|
||||
AC_CACHE_VAL(ac_cv_nullptr,
|
||||
[AC_TRY_COMPILE([],
|
||||
[int* foo = nullptr;],
|
||||
[ac_cv_nullptr=true],
|
||||
[ac_cv_nullptr=false])])
|
||||
if test "$ac_cv_nullptr" = true ; then
|
||||
AC_DEFINE(HAVE_NULLPTR)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_LANG_C
|
||||
|
||||
dnl Check for .hidden assembler directive and visibility attribute.
|
||||
|
@ -3642,7 +3657,7 @@ if test -n "$MOZ_LINKER" -a -z "$MOZ_OLD_LINKER" -a "$OS_TARGET" = "Android"; th
|
|||
[echo 'int foo() { return 0; }' > conftest.cpp
|
||||
if AC_TRY_COMMAND(${CXX-g++} -o conftest${DLL_SUFFIX} $CXXFLAGS $DSO_LDOPTS $LDFLAGS conftest.cpp $LIBS 1>&5) &&
|
||||
test -s conftest${DLL_SUFFIX}; then
|
||||
if readelf -d conftest${DLL_SUFFIX} | grep TEXTREL > /dev/null; then
|
||||
if ${TOOLCHAIN_PREFIX}readelf -d conftest${DLL_SUFFIX} | grep TEXTREL > /dev/null; then
|
||||
ac_cv_crt_has_text_relocations=yes
|
||||
else
|
||||
ac_cv_crt_has_text_relocations=no
|
||||
|
@ -4170,7 +4185,6 @@ MOZ_HELP_VIEWER=
|
|||
MOZ_SPELLCHECK=1
|
||||
MOZ_JAVA_COMPOSITOR=
|
||||
MOZ_ONLY_TOUCH_EVENTS=
|
||||
MOZ_SVG_DLISTS=
|
||||
MOZ_TOOLKIT_SEARCH=1
|
||||
MOZ_UI_LOCALE=en-US
|
||||
MOZ_UNIVERSALCHARDET=1
|
||||
|
@ -5796,7 +5810,7 @@ if test -n "$MOZ_CRASHREPORTER"; then
|
|||
AC_MSG_ERROR([Breakpad tools do not support compiling on $HOST_OS_ARCH while targeting $OS_ARCH. Use --disable-crashreporter.])
|
||||
fi
|
||||
|
||||
if test "$OS_ARCH" == "WINNT" -a -z "$HAVE_64BIT_OS"; then
|
||||
if test "$OS_ARCH" = "WINNT" -a -z "$HAVE_64BIT_OS"; then
|
||||
MOZ_CRASHREPORTER_INJECTOR=1
|
||||
AC_DEFINE(MOZ_CRASHREPORTER_INJECTOR)
|
||||
fi
|
||||
|
@ -6001,13 +6015,6 @@ if test -n "$MOZ_FLEXBOX"; then
|
|||
AC_DEFINE(MOZ_FLEXBOX)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl SVG Display Lists
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_SVG_DLISTS"; then
|
||||
AC_DEFINE(MOZ_SVG_DLISTS)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Build Freetype in the tree
|
||||
dnl ========================================================
|
||||
|
@ -7208,7 +7215,7 @@ if test "$USE_ELF_HACK" = 1; then
|
|||
[echo "int main() {return 0;}" > conftest.${ac_ext}
|
||||
if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.${ac_ext} $LIBS 1>&2) &&
|
||||
test -s conftest${ac_exeext}; then
|
||||
if readelf -l conftest${ac_exeext} | grep GNU_RELRO > /dev/null; then
|
||||
if ${TOOLCHAIN_PREFIX}readelf -l conftest${ac_exeext} | grep GNU_RELRO > /dev/null; then
|
||||
LINK_WITH_PT_GNU_RELRO=yes
|
||||
else
|
||||
LINK_WITH_PT_GNU_RELRO=no
|
||||
|
@ -8780,6 +8787,15 @@ esac
|
|||
|
||||
AC_SUBST(PYTHON)
|
||||
|
||||
# Populate the virtualenv
|
||||
AC_MSG_RESULT([Populating Python virtualenv])
|
||||
MACOSX_DEPLOYMENT_TARGET= LDFLAGS="${HOST_LDFLAGS}" \
|
||||
CC="${HOST_CC}" CXX="${HOST_CXX}" \
|
||||
CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" \
|
||||
$PYTHON $_topsrcdir/build/virtualenv/populate_virtualenv.py \
|
||||
$_topsrcdir $_topsrcdir/build/virtualenv/packages.txt \
|
||||
|| exit 1
|
||||
|
||||
dnl Load the list of Makefiles to generate.
|
||||
dnl To add new Makefiles, edit allmakefiles.sh.
|
||||
dnl allmakefiles.sh sets the variable, MAKEFILES.
|
||||
|
@ -8853,10 +8869,6 @@ if test -n "$MOZ_WEBRTC"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Populate the virtualenv
|
||||
AC_MSG_RESULT([Populating Python virtualenv])
|
||||
$MAKE -C build/virtualenv MACOSX_DEPLOYMENT_TARGET= || exit 1
|
||||
|
||||
# Generate a JSON config file for unittest harnesses etc to read
|
||||
# build configuration details from in a standardized way.
|
||||
OS_TARGET=${OS_TARGET} TARGET_CPU=${TARGET_CPU} MOZ_DEBUG=${MOZ_DEBUG} \
|
||||
|
|
|
@ -462,7 +462,7 @@ nsAttrAndChildArray::RemoveAttrAt(PRUint32 aPos, nsAttrValue& aValue)
|
|||
memmove(&ATTRS(mImpl)[aPos],
|
||||
&ATTRS(mImpl)[aPos + 1],
|
||||
(slotCount - aPos - 1) * sizeof(InternalAttr));
|
||||
memset(&ATTRS(mImpl)[slotCount - 1], nsnull, sizeof(InternalAttr));
|
||||
memset(&ATTRS(mImpl)[slotCount - 1], 0, sizeof(InternalAttr));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1984,7 +1984,7 @@ nsFrameLoader::TryRemoteBrowser()
|
|||
nsCOMPtr<nsIAppsService> appsService = do_GetService(APPS_SERVICE_CONTRACTID);
|
||||
if (!appsService) {
|
||||
NS_ERROR("Apps Service is not available!");
|
||||
return NS_ERROR_FAILURE;
|
||||
return false;
|
||||
}
|
||||
|
||||
appsService->GetAppLocalIdByManifestURL(manifest, &appId);
|
||||
|
|
|
@ -462,7 +462,7 @@ public:
|
|||
* Helper methods for implementing querySelector/querySelectorAll
|
||||
*/
|
||||
static nsIContent* doQuerySelector(nsINode* aRoot, const nsAString& aSelector,
|
||||
nsresult *aResult NS_OUTPARAM);
|
||||
nsresult *aResult);
|
||||
static nsresult doQuerySelectorAll(nsINode* aRoot,
|
||||
const nsAString& aSelector,
|
||||
nsIDOMNodeList **aReturn);
|
||||
|
|
|
@ -200,19 +200,19 @@ private:
|
|||
* want to override it.
|
||||
*/
|
||||
#define NS_FORWARD_NSIDOMEVENTTARGET_NOPREHANDLEEVENT(_to) \
|
||||
NS_SCRIPTABLE NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, PRUint8 _argc) { \
|
||||
NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, PRUint8 _argc) { \
|
||||
return _to AddEventListener(type, listener, useCapture, wantsUntrusted, _argc); \
|
||||
} \
|
||||
NS_IMETHOD AddSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, PRUint8 _argc) { \
|
||||
return _to AddSystemEventListener(type, listener, aUseCapture, aWantsUntrusted, _argc); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture) { \
|
||||
NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture) { \
|
||||
return _to RemoveEventListener(type, listener, useCapture); \
|
||||
} \
|
||||
NS_IMETHOD RemoveSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture) { \
|
||||
return _to RemoveSystemEventListener(type, listener, aUseCapture); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, bool *_retval NS_OUTPARAM) { \
|
||||
NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, bool *_retval) { \
|
||||
return _to DispatchEvent(evt, _retval); \
|
||||
} \
|
||||
virtual nsIDOMEventTarget * GetTargetForDOMEvent(void) { \
|
||||
|
@ -233,7 +233,7 @@ private:
|
|||
virtual nsEventListenerManager * GetListenerManager(bool aMayCreate) { \
|
||||
return _to GetListenerManager(aMayCreate); \
|
||||
} \
|
||||
virtual nsIScriptContext * GetContextForEventHandlers(nsresult *aRv NS_OUTPARAM) { \
|
||||
virtual nsIScriptContext * GetContextForEventHandlers(nsresult *aRv) { \
|
||||
return _to GetContextForEventHandlers(aRv); \
|
||||
} \
|
||||
virtual JSContext * GetJSContextForEventHandlers(void) { \
|
||||
|
|
|
@ -602,7 +602,7 @@ nsEventListenerManager::AddScriptEventListener(nsIAtom *aName,
|
|||
csp->LogViolationDetails(nsIContentSecurityPolicy::VIOLATION_TYPE_INLINE_SCRIPT,
|
||||
NS_ConvertUTF8toUTF16(asciiSpec),
|
||||
scriptSample,
|
||||
nsnull);
|
||||
0);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4494,12 +4494,8 @@ nsEventStateManager::CheckForAndDispatchClick(nsPresContext* aPresContext,
|
|||
if (0 != aEvent->clickCount) {
|
||||
//Check that the window isn't disabled before firing a click
|
||||
//(see bug 366544).
|
||||
if (aEvent->widget) {
|
||||
bool enabled;
|
||||
aEvent->widget->IsEnabled(&enabled);
|
||||
if (!enabled) {
|
||||
return ret;
|
||||
}
|
||||
if (aEvent->widget && !aEvent->widget->IsEnabled()) {
|
||||
return ret;
|
||||
}
|
||||
//fire click
|
||||
if (aEvent->button == nsMouseEvent::eMiddleButton ||
|
||||
|
|
|
@ -40,7 +40,7 @@ function runTests() {
|
|||
root.setAttribute("onclick", listenerSource);
|
||||
infos = els.getListenerInfoFor(root, {});
|
||||
is(infos.length, 1, "Element should have listeners (1)");
|
||||
is(infos[0].toSource(), 'function onclick(event) { ' + listenerSource + ' }',
|
||||
is(infos[0].toSource(), 'function onclick(event) {\n' + listenerSource + '\n}',
|
||||
"Unexpected serialization (1)");
|
||||
is(infos[0].type, "click", "Wrong type (1)");
|
||||
is(infos[0].capturing, false, "Wrong phase (1)");
|
||||
|
|
|
@ -45,10 +45,10 @@ div.onload = f;
|
|||
is(div.onload, f, "Should have 'f' as div's onload");
|
||||
div.setAttribute("onload", "");
|
||||
isnot(div.onload, f, "Should not longer have 'f' as div's onload");
|
||||
is(div.onload.toString(), "function onload(event) { }",
|
||||
is(div.onload.toString(), "function onload(event) {\n\n}",
|
||||
"Should have wrapped empty string in a function");
|
||||
div.setAttribute("onload", "foopy();");
|
||||
is(div.onload.toString(), "function onload(event) { foopy(); }",
|
||||
is(div.onload.toString(), "function onload(event) {\nfoopy();\n}",
|
||||
"Should have wrapped call in a function");
|
||||
div.removeAttribute("onload");
|
||||
is(div.onload, null, "Should have null onload now");
|
||||
|
@ -69,11 +69,11 @@ function testPropagationToWindow(eventName) {
|
|||
|
||||
document.body.setAttribute("on"+eventName, eventName);
|
||||
is(window["on"+eventName].toString(),
|
||||
"function on"+eventName+"(event) { "+eventName+" }",
|
||||
"function on"+eventName+"(event) {\n"+eventName+"\n}",
|
||||
"Setting on"+eventName+"attribute on body should propagate to window");
|
||||
document.createElement("body").setAttribute("on"+eventName, eventName+"2");
|
||||
is(window["on"+eventName].toString(),
|
||||
"function on"+eventName+"(event) { "+eventName+"2 }",
|
||||
"function on"+eventName+"(event) {\n"+eventName+"2\n}",
|
||||
"Setting on"+eventName+"attribute on body outside the document should propagate to window");
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=689564
|
|||
var div = document.createElement("div");
|
||||
div.setAttribute("onclick", "div");
|
||||
is(window.onclick, null, "div should not forward onclick");
|
||||
is(div.onclick.toString(), "function onclick(event) { div }",
|
||||
is(div.onclick.toString(), "function onclick(event) {\ndiv\n}",
|
||||
"div should have an onclick handler");
|
||||
|
||||
div.setAttribute("onscroll", "div");
|
||||
is(window.onscroll, null, "div should not forward onscroll");
|
||||
is(div.onscroll.toString(), "function onscroll(event) { div }",
|
||||
is(div.onscroll.toString(), "function onscroll(event) {\ndiv\n}",
|
||||
"div should have an onscroll handler");
|
||||
|
||||
div.setAttribute("onpopstate", "div");
|
||||
|
@ -36,25 +36,25 @@ is(div.onpopstate, null, "div should not have onpopstate handler");
|
|||
var body = document.createElement("body");
|
||||
body.setAttribute("onclick", "body");
|
||||
is(window.onclick, null, "body should not forward onclick");
|
||||
is(body.onclick.toString(), "function onclick(event) { body }",
|
||||
is(body.onclick.toString(), "function onclick(event) {\nbody\n}",
|
||||
"body should have an onclick handler");
|
||||
body.setAttribute("onscroll", "body");
|
||||
is(window.onscroll.toString(), "function onscroll(event) { body }",
|
||||
is(window.onscroll.toString(), "function onscroll(event) {\nbody\n}",
|
||||
"body should forward onscroll");
|
||||
body.setAttribute("onpopstate", "body");
|
||||
is(window.onpopstate.toString(), "function onpopstate(event) { body }",
|
||||
is(window.onpopstate.toString(), "function onpopstate(event) {\nbody\n}",
|
||||
"body should forward onpopstate");
|
||||
|
||||
var frameset = document.createElement("frameset");
|
||||
frameset.setAttribute("onclick", "frameset");
|
||||
is(window.onclick, null, "frameset should not forward onclick");
|
||||
is(frameset.onclick.toString(), "function onclick(event) { frameset }",
|
||||
is(frameset.onclick.toString(), "function onclick(event) {\nframeset\n}",
|
||||
"frameset should have an onclick handler");
|
||||
frameset.setAttribute("onscroll", "frameset");
|
||||
is(window.onscroll.toString(), "function onscroll(event) { frameset }",
|
||||
is(window.onscroll.toString(), "function onscroll(event) {\nframeset\n}",
|
||||
"frameset should forward onscroll");
|
||||
frameset.setAttribute("onpopstate", "frameset");
|
||||
is(window.onpopstate.toString(), "function onpopstate(event) { frameset }",
|
||||
is(window.onpopstate.toString(), "function onpopstate(event) {\nframeset\n}",
|
||||
"frameset should forward onpopstate");
|
||||
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ NS_IMETHODIMP_(bool) nsDOMStringMap::HasDataAttr(const nsAString& aProp)
|
|||
|
||||
/* [noscript] DOMString getDataAttr (in DOMString prop); */
|
||||
NS_IMETHODIMP nsDOMStringMap::GetDataAttr(const nsAString& aProp,
|
||||
nsAString& aResult NS_OUTPARAM)
|
||||
nsAString& aResult)
|
||||
{
|
||||
nsAutoString attr;
|
||||
|
||||
|
|
|
@ -1337,142 +1337,142 @@ PR_STATIC_ASSERT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 1 < 32);
|
|||
* because sometimes elements want to override them.
|
||||
*/
|
||||
#define NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(_to) \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetId(nsAString& aId) { \
|
||||
NS_IMETHOD GetId(nsAString& aId) { \
|
||||
return _to GetId(aId); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetId(const nsAString& aId) { \
|
||||
NS_IMETHOD SetId(const nsAString& aId) { \
|
||||
return _to SetId(aId); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTitle(nsAString& aTitle) { \
|
||||
NS_IMETHOD GetTitle(nsAString& aTitle) { \
|
||||
return _to GetTitle(aTitle); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTitle(const nsAString& aTitle) { \
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) { \
|
||||
return _to SetTitle(aTitle); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetLang(nsAString& aLang) { \
|
||||
NS_IMETHOD GetLang(nsAString& aLang) { \
|
||||
return _to GetLang(aLang); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetLang(const nsAString& aLang) { \
|
||||
NS_IMETHOD SetLang(const nsAString& aLang) { \
|
||||
return _to SetLang(aLang); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDir(nsAString& aDir) { \
|
||||
NS_IMETHOD GetDir(nsAString& aDir) { \
|
||||
return _to GetDir(aDir); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetDir(const nsAString& aDir) { \
|
||||
NS_IMETHOD SetDir(const nsAString& aDir) { \
|
||||
return _to SetDir(aDir); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetClassName(nsAString& aClassName) { \
|
||||
NS_IMETHOD GetClassName(nsAString& aClassName) { \
|
||||
return _to GetClassName(aClassName); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetClassName(const nsAString& aClassName) { \
|
||||
NS_IMETHOD SetClassName(const nsAString& aClassName) { \
|
||||
return _to SetClassName(aClassName); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDataset(nsIDOMDOMStringMap** aDataset) { \
|
||||
NS_IMETHOD GetDataset(nsIDOMDOMStringMap** aDataset) { \
|
||||
return _to GetDataset(aDataset); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetHidden(bool* aHidden) { \
|
||||
NS_IMETHOD GetHidden(bool* aHidden) { \
|
||||
return _to GetHidden(aHidden); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetHidden(bool aHidden) { \
|
||||
NS_IMETHOD SetHidden(bool aHidden) { \
|
||||
return _to SetHidden(aHidden); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD Blur() { \
|
||||
NS_IMETHOD Blur() { \
|
||||
return _to Blur(); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetItemScope(bool* aItemScope) { \
|
||||
NS_IMETHOD GetItemScope(bool* aItemScope) { \
|
||||
return _to GetItemScope(aItemScope); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetItemScope(bool aItemScope) { \
|
||||
NS_IMETHOD SetItemScope(bool aItemScope) { \
|
||||
return _to SetItemScope(aItemScope); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetItemType(nsIVariant** aType) { \
|
||||
NS_IMETHOD GetItemType(nsIVariant** aType) { \
|
||||
return _to GetItemType(aType); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetItemType(nsIVariant* aType) { \
|
||||
NS_IMETHOD SetItemType(nsIVariant* aType) { \
|
||||
return _to SetItemType(aType); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetItemId(nsAString& aId) { \
|
||||
NS_IMETHOD GetItemId(nsAString& aId) { \
|
||||
return _to GetItemId(aId); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetItemId(const nsAString& aId) { \
|
||||
NS_IMETHOD SetItemId(const nsAString& aId) { \
|
||||
return _to SetItemId(aId); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetProperties(nsIDOMHTMLPropertiesCollection** aReturn) { \
|
||||
NS_IMETHOD GetProperties(nsIDOMHTMLPropertiesCollection** aReturn) { \
|
||||
return _to GetProperties(aReturn); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetItemValue(nsIVariant** aValue) { \
|
||||
NS_IMETHOD GetItemValue(nsIVariant** aValue) { \
|
||||
return _to GetItemValue(aValue); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetItemValue(nsIVariant* aValue) { \
|
||||
NS_IMETHOD SetItemValue(nsIVariant* aValue) { \
|
||||
return _to SetItemValue(aValue); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetItemRef(nsIVariant** aRef) { \
|
||||
NS_IMETHOD GetItemRef(nsIVariant** aRef) { \
|
||||
return _to GetItemRef(aRef); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetItemRef(nsIVariant* aRef) { \
|
||||
NS_IMETHOD SetItemRef(nsIVariant* aRef) { \
|
||||
return _to SetItemRef(aRef); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetItemProp(nsIVariant** aProp) { \
|
||||
NS_IMETHOD GetItemProp(nsIVariant** aProp) { \
|
||||
return _to GetItemProp(aProp); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetItemProp(nsIVariant* aProp) { \
|
||||
NS_IMETHOD SetItemProp(nsIVariant* aProp) { \
|
||||
return _to SetItemProp(aProp); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAccessKey(nsAString& aAccessKey) { \
|
||||
NS_IMETHOD GetAccessKey(nsAString& aAccessKey) { \
|
||||
return _to GetAccessKey(aAccessKey); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetAccessKey(const nsAString& aAccessKey) { \
|
||||
NS_IMETHOD SetAccessKey(const nsAString& aAccessKey) { \
|
||||
return _to SetAccessKey(aAccessKey); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetAccessKeyLabel(nsAString& aAccessKeyLabel) { \
|
||||
NS_IMETHOD GetAccessKeyLabel(nsAString& aAccessKeyLabel) { \
|
||||
return _to GetAccessKeyLabel(aAccessKeyLabel); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetDraggable(bool aDraggable) { \
|
||||
NS_IMETHOD SetDraggable(bool aDraggable) { \
|
||||
return _to SetDraggable(aDraggable); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetContentEditable(nsAString& aContentEditable) { \
|
||||
NS_IMETHOD GetContentEditable(nsAString& aContentEditable) { \
|
||||
return _to GetContentEditable(aContentEditable); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetContentEditable(const nsAString& aContentEditable) { \
|
||||
NS_IMETHOD SetContentEditable(const nsAString& aContentEditable) { \
|
||||
return _to SetContentEditable(aContentEditable); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetIsContentEditable(bool* aIsContentEditable) { \
|
||||
NS_IMETHOD GetIsContentEditable(bool* aIsContentEditable) { \
|
||||
return _to GetIsContentEditable(aIsContentEditable); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetContextMenu(nsIDOMHTMLMenuElement** aContextMenu) { \
|
||||
NS_IMETHOD GetContextMenu(nsIDOMHTMLMenuElement** aContextMenu) { \
|
||||
return _to GetContextMenu(aContextMenu); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetSpellcheck(bool* aSpellcheck) { \
|
||||
NS_IMETHOD GetSpellcheck(bool* aSpellcheck) { \
|
||||
return _to GetSpellcheck(aSpellcheck); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetSpellcheck(bool aSpellcheck) { \
|
||||
NS_IMETHOD SetSpellcheck(bool aSpellcheck) { \
|
||||
return _to SetSpellcheck(aSpellcheck); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetOuterHTML(nsAString& aOuterHTML) { \
|
||||
NS_IMETHOD GetOuterHTML(nsAString& aOuterHTML) { \
|
||||
return _to GetOuterHTML(aOuterHTML); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD SetOuterHTML(const nsAString& aOuterHTML) { \
|
||||
NS_IMETHOD SetOuterHTML(const nsAString& aOuterHTML) { \
|
||||
return _to SetOuterHTML(aOuterHTML); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD InsertAdjacentHTML(const nsAString& position, const nsAString& text) { \
|
||||
NS_IMETHOD InsertAdjacentHTML(const nsAString& position, const nsAString& text) { \
|
||||
return _to InsertAdjacentHTML(position, text); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD ScrollIntoView(bool top, PRUint8 _argc) { \
|
||||
NS_IMETHOD ScrollIntoView(bool top, PRUint8 _argc) { \
|
||||
return _to ScrollIntoView(top, _argc); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetOffsetParent(nsIDOMElement** aOffsetParent) { \
|
||||
NS_IMETHOD GetOffsetParent(nsIDOMElement** aOffsetParent) { \
|
||||
return _to GetOffsetParent(aOffsetParent); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetOffsetTop(PRInt32* aOffsetTop) { \
|
||||
NS_IMETHOD GetOffsetTop(PRInt32* aOffsetTop) { \
|
||||
return _to GetOffsetTop(aOffsetTop); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetOffsetLeft(PRInt32* aOffsetLeft) { \
|
||||
NS_IMETHOD GetOffsetLeft(PRInt32* aOffsetLeft) { \
|
||||
return _to GetOffsetLeft(aOffsetLeft); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetOffsetWidth(PRInt32* aOffsetWidth) { \
|
||||
NS_IMETHOD GetOffsetWidth(PRInt32* aOffsetWidth) { \
|
||||
return _to GetOffsetWidth(aOffsetWidth); \
|
||||
} \
|
||||
NS_SCRIPTABLE NS_IMETHOD GetOffsetHeight(PRInt32* aOffsetHeight) { \
|
||||
NS_IMETHOD GetOffsetHeight(PRInt32* aOffsetHeight) { \
|
||||
return _to GetOffsetHeight(aOffsetHeight); \
|
||||
}
|
||||
|
||||
|
|
|
@ -42,19 +42,19 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable);
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,21 +36,21 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,21 +69,21 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLFormElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLFormElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLFormElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLFormElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,23 +28,23 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
return nsGenericHTMLElement::GetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
return nsGenericHTMLElement::SetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -991,7 +991,7 @@ nsHTMLFormElement::WalkFormElements(nsFormSubmission* aFormSubmission)
|
|||
NS_IMETHODIMP_(PRUint32)
|
||||
nsHTMLFormElement::GetElementCount() const
|
||||
{
|
||||
PRUint32 count = nsnull;
|
||||
PRUint32 count = 0;
|
||||
mControls->GetLength(&count);
|
||||
return count;
|
||||
}
|
||||
|
@ -1852,8 +1852,8 @@ nsHTMLFormElement::OnSecurityChange(nsIWebProgress* aWebProgress,
|
|||
NS_IMETHODIMP_(PRInt32)
|
||||
nsHTMLFormElement::IndexOfControl(nsIFormControl* aControl)
|
||||
{
|
||||
PRInt32 index = nsnull;
|
||||
return mControls->IndexOfControl(aControl, &index) == NS_OK ? index : nsnull;
|
||||
PRInt32 index = 0;
|
||||
return mControls->IndexOfControl(aControl, &index) == NS_OK ? index : 0;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -31,23 +31,23 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
return nsGenericHTMLElement::GetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
return nsGenericHTMLElement::SetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable);
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable);
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,17 +75,17 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLFormElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click();
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus();
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD Click();
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus();
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLFormElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,23 +42,23 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLFormElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLFormElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
return nsGenericHTMLFormElement::GetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
return nsGenericHTMLFormElement::SetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus();
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD Focus();
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLFormElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,23 +37,23 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
return nsGenericHTMLElement::GetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
return nsGenericHTMLElement::SetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus();
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD Focus();
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,21 +49,21 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLFormElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLFormElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLFormElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLFormElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,23 +50,23 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
return nsGenericHTMLElement::GetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
return nsGenericHTMLElement::SetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML);
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML);
|
||||
|
||||
// nsIDOMHTMLScriptElement
|
||||
NS_DECL_NSIDOMHTMLSCRIPTELEMENT
|
||||
|
|
|
@ -233,21 +233,21 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLFormElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLFormElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLFormElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLFormElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ public:
|
|||
* @return whether the option is disabled
|
||||
*/
|
||||
NS_IMETHOD IsOptionDisabled(PRInt32 aIndex,
|
||||
bool *aIsDisabled NS_OUTPARAM);
|
||||
bool *aIsDisabled);
|
||||
|
||||
/**
|
||||
* Sets multiple options (or just sets startIndex if select is single)
|
||||
|
@ -333,7 +333,7 @@ public:
|
|||
bool aClearAll,
|
||||
bool aSetDisabled,
|
||||
bool aNotify,
|
||||
bool* aChangedSomething NS_OUTPARAM);
|
||||
bool* aChangedSomething);
|
||||
|
||||
/**
|
||||
* Finds the index of a given option element
|
||||
|
@ -346,7 +346,7 @@ public:
|
|||
NS_IMETHOD GetOptionIndex(nsIDOMHTMLOptionElement* aOption,
|
||||
PRInt32 aStartIndex,
|
||||
bool aForward,
|
||||
PRInt32* aIndex NS_OUTPARAM);
|
||||
PRInt32* aIndex);
|
||||
|
||||
/**
|
||||
* Called when an attribute is about to be changed
|
||||
|
|
|
@ -45,21 +45,21 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,23 +37,23 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex) {
|
||||
return nsGenericHTMLElement::GetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex) {
|
||||
return nsGenericHTMLElement::SetTabIndex(aTabIndex);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML);
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML);
|
||||
|
||||
// nsIDOMHTMLStyleElement
|
||||
NS_DECL_NSIDOMHTMLSTYLEELEMENT
|
||||
|
|
|
@ -78,21 +78,21 @@ public:
|
|||
|
||||
// nsIDOMHTMLElement
|
||||
NS_FORWARD_NSIDOMHTMLELEMENT_BASIC(nsGenericHTMLFormElement::)
|
||||
NS_SCRIPTABLE NS_IMETHOD Click() {
|
||||
NS_IMETHOD Click() {
|
||||
return nsGenericHTMLFormElement::Click();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_SCRIPTABLE NS_IMETHOD Focus() {
|
||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||
NS_IMETHOD Focus() {
|
||||
return nsGenericHTMLFormElement::Focus();
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
NS_IMETHOD GetDraggable(bool* aDraggable) {
|
||||
return nsGenericHTMLFormElement::GetDraggable(aDraggable);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
NS_SCRIPTABLE NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
NS_IMETHOD SetInnerHTML(const nsAString& aInnerHTML) {
|
||||
return nsGenericHTMLFormElement::SetInnerHTML(aInnerHTML);
|
||||
}
|
||||
|
||||
|
|
|
@ -734,9 +734,9 @@ PRInt64 nsOggReader::RangeStartTime(PRInt64 aOffset)
|
|||
{
|
||||
NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
|
||||
MediaResource* resource = mDecoder->GetResource();
|
||||
NS_ENSURE_TRUE(resource != nsnull, nsnull);
|
||||
NS_ENSURE_TRUE(resource != nsnull, 0);
|
||||
nsresult res = resource->Seek(nsISeekableStream::NS_SEEK_SET, aOffset);
|
||||
NS_ENSURE_SUCCESS(res, nsnull);
|
||||
NS_ENSURE_SUCCESS(res, 0);
|
||||
PRInt64 startTime = 0;
|
||||
nsBuiltinDecoderReader::FindStartTime(startTime);
|
||||
return startTime;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "nsISMILType.h"
|
||||
#include "nsCSSProperty.h"
|
||||
#include "nscore.h" // For NS_OVERRIDE
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsAString;
|
||||
|
||||
|
@ -34,22 +34,22 @@ public:
|
|||
protected:
|
||||
// nsISMILType Methods
|
||||
// -------------------
|
||||
NS_OVERRIDE virtual void Init(nsSMILValue& aValue) const;
|
||||
NS_OVERRIDE virtual void Destroy(nsSMILValue&) const;
|
||||
NS_OVERRIDE virtual nsresult Assign(nsSMILValue& aDest,
|
||||
const nsSMILValue& aSrc) const;
|
||||
NS_OVERRIDE virtual bool IsEqual(const nsSMILValue& aLeft,
|
||||
const nsSMILValue& aRight) const;
|
||||
NS_OVERRIDE virtual nsresult Add(nsSMILValue& aDest,
|
||||
const nsSMILValue& aValueToAdd,
|
||||
PRUint32 aCount) const;
|
||||
NS_OVERRIDE virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
|
||||
const nsSMILValue& aTo,
|
||||
double& aDistance) const;
|
||||
NS_OVERRIDE virtual nsresult Interpolate(const nsSMILValue& aStartVal,
|
||||
const nsSMILValue& aEndVal,
|
||||
double aUnitDistance,
|
||||
nsSMILValue& aResult) const;
|
||||
virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE;
|
||||
virtual void Destroy(nsSMILValue&) const MOZ_OVERRIDE;
|
||||
virtual nsresult Assign(nsSMILValue& aDest,
|
||||
const nsSMILValue& aSrc) const MOZ_OVERRIDE;
|
||||
virtual bool IsEqual(const nsSMILValue& aLeft,
|
||||
const nsSMILValue& aRight) const MOZ_OVERRIDE;
|
||||
virtual nsresult Add(nsSMILValue& aDest,
|
||||
const nsSMILValue& aValueToAdd,
|
||||
PRUint32 aCount) const MOZ_OVERRIDE;
|
||||
virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
|
||||
const nsSMILValue& aTo,
|
||||
double& aDistance) const MOZ_OVERRIDE;
|
||||
virtual nsresult Interpolate(const nsSMILValue& aStartVal,
|
||||
const nsSMILValue& aEndVal,
|
||||
double aUnitDistance,
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
public:
|
||||
// Helper Methods
|
||||
|
|
|
@ -39,26 +39,26 @@ public:
|
|||
* @returns true if aAttribute is a recognized animation-related
|
||||
* attribute; false otherwise.
|
||||
*/
|
||||
NS_OVERRIDE virtual bool UnsetAttr(nsIAtom* aAttribute);
|
||||
virtual bool UnsetAttr(nsIAtom* aAttribute) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
// Although <set> animation might look like to-animation, unlike to-animation,
|
||||
// it never interpolates values.
|
||||
// Returning false here will mean this animation function gets treated as
|
||||
// a single-valued function and no interpolation will be attempted.
|
||||
NS_OVERRIDE virtual bool IsToAnimation() const {
|
||||
virtual bool IsToAnimation() const MOZ_OVERRIDE {
|
||||
return false;
|
||||
}
|
||||
|
||||
// <set> applies the exact same value across the simple duration.
|
||||
NS_OVERRIDE virtual bool IsValueFixedForSimpleDuration() const {
|
||||
virtual bool IsValueFixedForSimpleDuration() const MOZ_OVERRIDE {
|
||||
return true;
|
||||
}
|
||||
NS_OVERRIDE virtual bool HasAttr(nsIAtom* aAttName) const;
|
||||
NS_OVERRIDE virtual const nsAttrValue* GetAttr(nsIAtom* aAttName) const;
|
||||
NS_OVERRIDE virtual bool GetAttr(nsIAtom* aAttName,
|
||||
nsAString& aResult) const;
|
||||
NS_OVERRIDE virtual bool WillReplace() const;
|
||||
virtual bool HasAttr(nsIAtom* aAttName) const MOZ_OVERRIDE;
|
||||
virtual const nsAttrValue* GetAttr(nsIAtom* aAttName) const MOZ_OVERRIDE;
|
||||
virtual bool GetAttr(nsIAtom* aAttName,
|
||||
nsAString& aResult) const MOZ_OVERRIDE;
|
||||
virtual bool WillReplace() const MOZ_OVERRIDE;
|
||||
|
||||
bool IsDisallowedAttribute(const nsIAtom* aAttribute) const;
|
||||
};
|
||||
|
|
|
@ -31,11 +31,11 @@ class SVGMotionSMILAnimationFunction : public nsSMILAnimationFunction
|
|||
{
|
||||
public:
|
||||
SVGMotionSMILAnimationFunction();
|
||||
NS_OVERRIDE virtual bool SetAttr(nsIAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult,
|
||||
nsresult* aParseResult = nsnull);
|
||||
NS_OVERRIDE virtual bool UnsetAttr(nsIAtom* aAttribute);
|
||||
virtual bool SetAttr(nsIAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult,
|
||||
nsresult* aParseResult = nsnull) MOZ_OVERRIDE;
|
||||
virtual bool UnsetAttr(nsIAtom* aAttribute) MOZ_OVERRIDE;
|
||||
|
||||
// Method to allow our owner-element to signal us when our <mpath>
|
||||
// has changed or been added/removed. When that happens, we need to
|
||||
|
@ -56,12 +56,12 @@ protected:
|
|||
ePathSourceType_Mpath
|
||||
};
|
||||
|
||||
NS_OVERRIDE virtual nsSMILCalcMode GetCalcMode() const;
|
||||
NS_OVERRIDE virtual nsresult GetValues(const nsISMILAttr& aSMILAttr,
|
||||
nsSMILValueArray& aResult);
|
||||
NS_OVERRIDE virtual void CheckValueListDependentAttrs(PRUint32 aNumValues);
|
||||
virtual nsSMILCalcMode GetCalcMode() const MOZ_OVERRIDE;
|
||||
virtual nsresult GetValues(const nsISMILAttr& aSMILAttr,
|
||||
nsSMILValueArray& aResult) MOZ_OVERRIDE;
|
||||
virtual void CheckValueListDependentAttrs(PRUint32 aNumValues) MOZ_OVERRIDE;
|
||||
|
||||
NS_OVERRIDE virtual bool IsToAnimation() const;
|
||||
virtual bool IsToAnimation() const MOZ_OVERRIDE;
|
||||
|
||||
void CheckKeyPoints();
|
||||
nsresult SetKeyPoints(const nsAString& aKeyPoints, nsAttrValue& aResult);
|
||||
|
|
|
@ -112,7 +112,7 @@ nsXBLPrototypeHandler::nsXBLPrototypeHandler(nsIContent* aHandlerElement)
|
|||
|
||||
nsXBLPrototypeHandler::nsXBLPrototypeHandler(nsXBLPrototypeBinding* aBinding)
|
||||
: mHandlerText(nsnull),
|
||||
mLineNumber(nsnull),
|
||||
mLineNumber(0),
|
||||
mNextHandler(nsnull),
|
||||
mPrototypeBinding(aBinding)
|
||||
{
|
||||
|
|
|
@ -2747,6 +2747,10 @@ nsDocShell::GetSameTypeParent(nsIDocShellTreeItem ** aParent)
|
|||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
*aParent = nsnull;
|
||||
|
||||
if (mIsBrowserFrame) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent =
|
||||
do_QueryInterface(GetAsSupports(mParent));
|
||||
if (!parent)
|
||||
|
@ -2761,6 +2765,27 @@ nsDocShell::GetSameTypeParent(nsIDocShellTreeItem ** aParent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetParentIgnoreBrowserFrame(nsIDocShell** aParent)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
*aParent = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent =
|
||||
do_QueryInterface(GetAsSupports(mParent));
|
||||
if (!parent)
|
||||
return NS_OK;
|
||||
|
||||
PRInt32 parentType;
|
||||
NS_ENSURE_SUCCESS(parent->GetItemType(&parentType), NS_ERROR_FAILURE);
|
||||
|
||||
if (parentType == mItemType) {
|
||||
nsCOMPtr<nsIDocShell> parentDS = do_QueryInterface(parent);
|
||||
parentDS.forget(aParent);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetRootTreeItem(nsIDocShellTreeItem ** aRootTreeItem)
|
||||
{
|
||||
|
@ -4992,12 +5017,20 @@ nsDocShell::SetIsActive(bool aIsActive)
|
|||
}
|
||||
}
|
||||
|
||||
// Recursively tell all of our children
|
||||
// Recursively tell all of our children, but don't tell <iframe mozbrowser>
|
||||
// children; they handle their state separately.
|
||||
PRInt32 n = mChildList.Count();
|
||||
for (PRInt32 i = 0; i < n; ++i) {
|
||||
nsCOMPtr<nsIDocShell> docshell = do_QueryInterface(ChildAt(i));
|
||||
if (docshell)
|
||||
docshell->SetIsActive(aIsActive);
|
||||
if (!docshell) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isContentBoundary = false;
|
||||
docshell->GetIsContentBoundary(&isContentBoundary);
|
||||
if (!isContentBoundary) {
|
||||
docshell->SetIsActive(aIsActive);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -11090,16 +11123,9 @@ NS_IMETHODIMP nsDocShell::EnsureFind()
|
|||
bool
|
||||
nsDocShell::IsFrame()
|
||||
{
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent =
|
||||
do_QueryInterface(GetAsSupports(mParent));
|
||||
if (parent) {
|
||||
PRInt32 parentType = ~mItemType; // Not us
|
||||
parent->GetItemType(&parentType);
|
||||
if (parentType == mItemType) // This is a frame
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent;
|
||||
GetSameTypeParent(getter_AddRefs(parent));
|
||||
return !!parent;
|
||||
}
|
||||
|
||||
/* boolean IsBeingDestroyed (); */
|
||||
|
@ -11335,6 +11361,20 @@ nsDocShell::GetIsContent(bool *aIsContent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetExtendedOrigin(nsIURI *aUri, nsACString &aResult)
|
||||
{
|
||||
bool isInBrowserElement;
|
||||
GetIsInBrowserElement(&isInBrowserElement);
|
||||
|
||||
nsCOMPtr<nsIScriptSecurityManager> ssmgr =
|
||||
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID);
|
||||
NS_ENSURE_TRUE(ssmgr, false);
|
||||
|
||||
return ssmgr->GetExtendedOrigin(aUri, mAppId, isInBrowserElement, aResult);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
nsDocShell::IsOKToLoadURI(nsIURI* aURI)
|
||||
{
|
||||
|
@ -12123,10 +12163,9 @@ nsDocShell::GetAppId(PRUint32* aAppId)
|
|||
|
||||
MOZ_ASSERT(GetFrameType() != eFrameTypeApp);
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
|
||||
GetSameTypeParent(getter_AddRefs(parentAsItem));
|
||||
nsCOMPtr<nsIDocShell> parent;
|
||||
GetParentIgnoreBrowserFrame(getter_AddRefs(parent));
|
||||
|
||||
nsCOMPtr<nsIDocShell> parent = do_QueryInterface(parentAsItem);
|
||||
if (!parent) {
|
||||
*aAppId = nsIScriptSecurityManager::NO_APP_ID;
|
||||
return NS_OK;
|
||||
|
|
|
@ -228,6 +228,7 @@ public:
|
|||
NS_IMETHOD GetIsContent(bool*);
|
||||
NS_IMETHOD GetUsePrivateBrowsing(bool*);
|
||||
NS_IMETHOD SetUsePrivateBrowsing(bool);
|
||||
NS_IMETHOD GetExtendedOrigin(nsIURI *uri, nsACString & retval);
|
||||
|
||||
// Restores a cached presentation from history (mLSHE).
|
||||
// This method swaps out the content viewer and simulates loads for
|
||||
|
|
|
@ -39,7 +39,7 @@ interface nsIWebBrowserPrint;
|
|||
interface nsIVariant;
|
||||
interface nsIPrivacyTransitionObserver;
|
||||
|
||||
[scriptable, builtinclass, uuid(be5a675b-b675-4443-af75-510530eab5fa)]
|
||||
[scriptable, builtinclass, uuid(51f2b7f0-6435-40ec-b315-588f52be7eea)]
|
||||
interface nsIDocShell : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -644,4 +644,10 @@ interface nsIDocShell : nsISupports
|
|||
* docshell.
|
||||
*/
|
||||
readonly attribute bool asyncPanZoomEnabled;
|
||||
|
||||
/**
|
||||
* Like GetSameTypeParent, except this ignores <iframe mozbrowser>
|
||||
* boundaries.
|
||||
*/
|
||||
nsIDocShell getParentIgnoreBrowserFrame();
|
||||
};
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMWindow;
|
||||
interface nsIURI;
|
||||
|
||||
/**
|
||||
* An nsILoadContext represents the context of a load. This interface
|
||||
|
@ -78,4 +79,19 @@ interface nsILoadContext : nsISupports
|
|||
*/
|
||||
readonly attribute unsigned long appId;
|
||||
|
||||
/**
|
||||
* Get the extended origin of a channel in this load context.
|
||||
* The extended origin is a string that has more information than the origin
|
||||
* and can be used to isolate data or permissions between different
|
||||
* principals while taking into account parameters like the app id or the
|
||||
* fact that the load is taking place in a mozbrowser.
|
||||
*
|
||||
* In some cases this function will simply return the origin for the
|
||||
* channel's URI.
|
||||
*
|
||||
* The extendedOrigin is intended to be an opaque identifier. It is
|
||||
* currently "human-readable" but no callers should assume it will stay
|
||||
* as-is and it might be crypto-hashed at some point.
|
||||
*/
|
||||
AUTF8String GetExtendedOrigin(in nsIURI channel);
|
||||
};
|
||||
|
|
|
@ -1930,7 +1930,7 @@ nsDOMWindowUtils::StartFrameTimeRecording()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::StopFrameTimeRecording(PRUint32 *frameCount NS_OUTPARAM, float **frames NS_OUTPARAM)
|
||||
nsDOMWindowUtils::StopFrameTimeRecording(PRUint32 *frameCount, float **frames)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(frameCount);
|
||||
NS_ENSURE_ARG_POINTER(frames);
|
||||
|
|
|
@ -1976,7 +1976,7 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
|||
|
||||
js::SetProxyExtra(mJSObject, 0, js::PrivateValue(NULL));
|
||||
|
||||
outerObject = JS_TransplantObject(cx, mJSObject, outerObject);
|
||||
outerObject = xpc::TransplantObject(cx, mJSObject, outerObject);
|
||||
if (!outerObject) {
|
||||
NS_ERROR("unable to transplant wrappers, probably OOM");
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -2990,11 +2990,8 @@ nsGlobalWindow::GetRealParent(nsIDOMWindow** aParent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(mDocShell));
|
||||
NS_ENSURE_TRUE(docShellAsItem, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent;
|
||||
docShellAsItem->GetSameTypeParent(getter_AddRefs(parent));
|
||||
nsCOMPtr<nsIDocShell> parent;
|
||||
mDocShell->GetParentIgnoreBrowserFrame(getter_AddRefs(parent));
|
||||
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject(do_GetInterface(parent));
|
||||
|
@ -3073,11 +3070,19 @@ NS_IMETHODIMP
|
|||
nsGlobalWindow::GetContent(nsIDOMWindow** aContent)
|
||||
{
|
||||
FORWARD_TO_OUTER(GetContent, (aContent), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
*aContent = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> primaryContent;
|
||||
// If we're contained in <iframe mozbrowser>, then GetContent is the same as
|
||||
// window.top.
|
||||
if (mDocShell) {
|
||||
bool belowContentBoundary = false;
|
||||
mDocShell->GetIsBelowContentBoundary(&belowContentBoundary);
|
||||
if (belowContentBoundary) {
|
||||
return GetScriptableTop(aContent);
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> primaryContent;
|
||||
if (!nsContentUtils::IsCallerChrome()) {
|
||||
// If we're called by non-chrome code, make sure we don't return
|
||||
// the primary content window if the calling tab is hidden. In
|
||||
|
@ -3091,7 +3096,6 @@ nsGlobalWindow::GetContent(nsIDOMWindow** aContent)
|
|||
|
||||
if (!visible) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(mDocShell));
|
||||
|
||||
treeItem->GetSameTypeRootTreeItem(getter_AddRefs(primaryContent));
|
||||
}
|
||||
}
|
||||
|
@ -3111,6 +3115,7 @@ nsGlobalWindow::GetContent(nsIDOMWindow** aContent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetPrompter(nsIPrompt** aPrompt)
|
||||
{
|
||||
|
@ -7006,19 +7011,16 @@ nsGlobalWindow::GetRealFrameElement(nsIDOMElement** aFrameElement)
|
|||
|
||||
*aFrameElement = NULL;
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellTI(do_QueryInterface(mDocShell));
|
||||
|
||||
if (!docShellTI) {
|
||||
if (!mDocShell) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent;
|
||||
docShellTI->GetSameTypeParent(getter_AddRefs(parent));
|
||||
nsCOMPtr<nsIDocShell> parent;
|
||||
mDocShell->GetParentIgnoreBrowserFrame(getter_AddRefs(parent));
|
||||
|
||||
if (!parent || parent == docShellTI) {
|
||||
if (!parent || parent == mDocShell) {
|
||||
// We're at a chrome boundary, don't expose the chrome iframe
|
||||
// element to content code.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
virtual ~nsSelectionCommandsBase() {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandContext, bool *_retval NS_OUTPARAM);
|
||||
NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandContext, bool *_retval);
|
||||
NS_IMETHOD GetCommandStateParams(const char * aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext);
|
||||
NS_IMETHOD DoCommandParams(const char * aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext);
|
||||
|
||||
|
|
|
@ -3873,8 +3873,8 @@ ReadSourceFromFilename(JSContext *cx, const char *filename, jschar **src, PRUint
|
|||
|
||||
// mozJSSubScriptLoader prefixes the filenames of the scripts it loads with
|
||||
// the filename of its caller. Axe that if present.
|
||||
const char *arrow = strstr(filename, " -> ");
|
||||
if (arrow)
|
||||
const char *arrow;
|
||||
while ((arrow = strstr(filename, " -> ")))
|
||||
filename = arrow + strlen(" -> ");
|
||||
|
||||
// Get the URI.
|
||||
|
|
|
@ -49,6 +49,15 @@ function BrowserElementChild() {
|
|||
// Maps outer window id --> weak ref to window. Used by modal dialog code.
|
||||
this._windowIDDict = {};
|
||||
|
||||
// _forcedVisible corresponds to the visibility state our owner has set on us
|
||||
// (via iframe.setVisible). ownerVisible corresponds to whether the docShell
|
||||
// whose window owns this element is visible.
|
||||
//
|
||||
// Our docShell is visible iff _forcedVisible and _ownerVisible are both
|
||||
// true.
|
||||
this._forcedVisible = true;
|
||||
this._ownerVisible = true;
|
||||
|
||||
this._init();
|
||||
};
|
||||
|
||||
|
@ -65,6 +74,10 @@ BrowserElementChild.prototype = {
|
|||
Ci.nsIWebProgress.NOTIFY_SECURITY |
|
||||
Ci.nsIWebProgress.NOTIFY_STATE_WINDOW);
|
||||
|
||||
docShell.QueryInterface(Ci.nsIWebNavigation)
|
||||
.sessionHistory = Cc["@mozilla.org/browser/shistory;1"]
|
||||
.createInstance(Ci.nsISHistory);
|
||||
|
||||
// This is necessary to get security web progress notifications.
|
||||
var securityUI = Cc['@mozilla.org/secure_browser_ui;1']
|
||||
.createInstance(Ci.nsISecureBrowserUI);
|
||||
|
@ -123,6 +136,7 @@ BrowserElementChild.prototype = {
|
|||
addMsgListener("stop", this._recvStop);
|
||||
addMsgListener("unblock-modal-prompt", this._recvStopWaiting);
|
||||
addMsgListener("fire-ctx-callback", this._recvFireCtxCallback);
|
||||
addMsgListener("owner-visibility-change", this._recvOwnerVisibilityChange);
|
||||
|
||||
let els = Cc["@mozilla.org/eventlistenerservice;1"]
|
||||
.getService(Ci.nsIEventListenerService);
|
||||
|
@ -444,8 +458,24 @@ BrowserElementChild.prototype = {
|
|||
|
||||
_recvSetVisible: function(data) {
|
||||
debug("Received setVisible message: (" + data.json.visible + ")");
|
||||
if (docShell.isActive !== data.json.visible) {
|
||||
docShell.isActive = data.json.visible;
|
||||
this._forcedVisible = data.json.visible;
|
||||
this._updateDocShellVisibility();
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when the window which contains this iframe becomes hidden or
|
||||
* visible.
|
||||
*/
|
||||
_recvOwnerVisibilityChange: function(data) {
|
||||
debug("Received ownerVisibilityChange: (" + data.json.visible + ")");
|
||||
this._ownerVisible = data.json.visible;
|
||||
this._updateDocShellVisibility();
|
||||
},
|
||||
|
||||
_updateDocShellVisibility: function() {
|
||||
var visible = this._forcedVisible && this._ownerVisible;
|
||||
if (docShell.isActive !== visible) {
|
||||
docShell.isActive = visible;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -192,6 +192,13 @@ function BrowserElementParent(frameLoader) {
|
|||
defineDOMRequestMethod('getScreenshot', 'get-screenshot');
|
||||
defineDOMRequestMethod('getCanGoBack', 'get-can-go-back');
|
||||
defineDOMRequestMethod('getCanGoForward', 'get-can-go-forward');
|
||||
|
||||
// Listen to mozvisibilitychange on the iframe's owner window, and forward it
|
||||
// down to the child.
|
||||
this._window.addEventListener('mozvisibilitychange',
|
||||
this._ownerVisibilityChange.bind(this),
|
||||
/* useCapture = */ false,
|
||||
/* wantsUntrusted = */ false);
|
||||
}
|
||||
|
||||
BrowserElementParent.prototype = {
|
||||
|
@ -218,6 +225,14 @@ BrowserElementParent.prototype = {
|
|||
|
||||
_recvHello: function(data) {
|
||||
debug("recvHello");
|
||||
|
||||
// Inform our child if our owner element's document is invisible. Note
|
||||
// that we must do so here, rather than in the BrowserElementParent
|
||||
// constructor, because the BrowserElementChild may not be initialized when
|
||||
// we run our constructor.
|
||||
if (this._window.document.mozHidden) {
|
||||
this._ownerVisibilityChange();
|
||||
}
|
||||
},
|
||||
|
||||
_fireCtxMenuEvent: function(data) {
|
||||
|
@ -412,6 +427,14 @@ BrowserElementParent.prototype = {
|
|||
|
||||
this._frameElement.dispatchEvent(evt);
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when the visibility of the window which owns this iframe changes.
|
||||
*/
|
||||
_ownerVisibilityChange: function() {
|
||||
this._sendAsyncMsg('owner-visibility-change',
|
||||
{visible: !this._window.document.mozHidden});
|
||||
},
|
||||
};
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([BrowserElementParentFactory]);
|
||||
|
|
|
@ -39,6 +39,13 @@ MOCHITEST_FILES = \
|
|||
test_browserElement_inproc_GetScreenshot.html \
|
||||
browserElement_SetVisible.js \
|
||||
test_browserElement_inproc_SetVisible.html \
|
||||
browserElement_SetVisibleFrames.js \
|
||||
test_browserElement_inproc_SetVisibleFrames.html \
|
||||
file_browserElement_SetVisibleFrames_Outer.html \
|
||||
file_browserElement_SetVisibleFrames_Inner.html \
|
||||
browserElement_SetVisibleFrames2.js \
|
||||
test_browserElement_inproc_SetVisibleFrames2.html \
|
||||
file_browserElement_SetVisibleFrames2_Outer.html \
|
||||
browserElement_KeyEvents.js \
|
||||
test_browserElement_inproc_KeyEvents.html \
|
||||
browserElement_XFrameOptions.js \
|
||||
|
@ -56,6 +63,9 @@ MOCHITEST_FILES = \
|
|||
test_browserElement_inproc_AlertInFrame.html \
|
||||
file_browserElement_AlertInFrame.html \
|
||||
file_browserElement_AlertInFrame_Inner.html \
|
||||
browserElement_TargetTop.js \
|
||||
test_browserElement_inproc_TargetTop.html \
|
||||
file_browserElement_TargetTop.html \
|
||||
browserElement_PromptCheck.js \
|
||||
test_browserElement_inproc_PromptCheck.html \
|
||||
browserElement_PromptConfirm.js \
|
||||
|
@ -75,10 +85,14 @@ MOCHITEST_FILES = \
|
|||
browserElement_OpenWindowRejected.js \
|
||||
test_browserElement_inproc_OpenWindowRejected.html \
|
||||
file_browserElement_OpenWindowRejected.html \
|
||||
browserElement_OpenWindowDifferentOrigin.js \
|
||||
test_browserElement_inproc_OpenWindowDifferentOrigin.html \
|
||||
file_browserElement_OpenWindowDifferentOrigin.html \
|
||||
browserElement_SecurityChange.js \
|
||||
test_browserElement_inproc_SecurityChange.html \
|
||||
file_browserElement_SecurityChange.html \
|
||||
browserElement_BackForward.js \
|
||||
test_browserElement_inproc_BackForward.html \
|
||||
file_bug741717.sjs \
|
||||
browserElement_Reload.js \
|
||||
file_bug709759.sjs \
|
||||
|
@ -97,8 +111,6 @@ MOCHITEST_FILES = \
|
|||
|
||||
# OOP tests don't work on Windows (bug 763081) or native-fennec (bug
|
||||
# 774939).
|
||||
#
|
||||
# Note that there's no inproc equivalent of BackForward; that's intentional.
|
||||
ifneq ($(OS_ARCH),WINNT) #{
|
||||
ifndef MOZ_JAVA_COMPOSITOR #{
|
||||
MOCHITEST_FILES += \
|
||||
|
@ -110,12 +122,15 @@ MOCHITEST_FILES += \
|
|||
test_browserElement_oop_Iconchange.html \
|
||||
test_browserElement_oop_GetScreenshot.html \
|
||||
test_browserElement_oop_SetVisible.html \
|
||||
test_browserElement_oop_SetVisibleFrames.html \
|
||||
test_browserElement_oop_SetVisibleFrames2.html \
|
||||
test_browserElement_oop_KeyEvents.html \
|
||||
test_browserElement_oop_XFrameOptions.html \
|
||||
test_browserElement_oop_XFrameOptionsDeny.html \
|
||||
test_browserElement_oop_XFrameOptionsSameOrigin.html \
|
||||
test_browserElement_oop_Alert.html \
|
||||
test_browserElement_oop_AlertInFrame.html \
|
||||
test_browserElement_oop_TargetTop.html \
|
||||
test_browserElement_oop_PromptCheck.html \
|
||||
test_browserElement_oop_PromptConfirm.html \
|
||||
test_browserElement_oop_Close.html \
|
||||
|
@ -123,6 +138,7 @@ MOCHITEST_FILES += \
|
|||
test_browserElement_oop_OpenWindow.html \
|
||||
test_browserElement_oop_OpenWindowInFrame.html \
|
||||
test_browserElement_oop_OpenWindowRejected.html \
|
||||
test_browserElement_oop_OpenWindowDifferentOrigin.html \
|
||||
test_browserElement_oop_SecurityChange.html \
|
||||
test_browserElement_oop_BackForward.html \
|
||||
test_browserElement_oop_Reload.html \
|
||||
|
|
|
@ -18,18 +18,6 @@ function addOneShotIframeEventListener(event, fn) {
|
|||
}
|
||||
|
||||
function runTest() {
|
||||
// At the moment, this isn't going to work unless we're actually out of
|
||||
// process.
|
||||
//
|
||||
// With in-process mozbrowser, the root SHistory for an <iframe mozbrowser>
|
||||
// crosses the mozbrowser boundary. It's like the mozbrowser wasn't there;
|
||||
// canGoBack reflects whether the top-level frame can go back, not whether the
|
||||
// iframe itself can go back.
|
||||
if (!browserElementTestHelpers.getOOPByDefaultPref()) {
|
||||
ok(false, "This test only works OOP.");
|
||||
return;
|
||||
}
|
||||
|
||||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addToWhitelist();
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/* Any copyright is dedicated to the public domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Bug 769182 - window.open to a different origin should load the page.
|
||||
|
||||
"use strict";
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addToWhitelist();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(true, 'Got first window.open call');
|
||||
|
||||
e.detail.frameElement.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(true, 'Got second window.open call');
|
||||
document.body.appendChild(e.detail.frameElement);
|
||||
});
|
||||
|
||||
e.detail.frameElement.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
ok(true, 'Got alert from second window.');
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
document.body.appendChild(e.detail.frameElement);
|
||||
});
|
||||
|
||||
// DifferentOrigin.html?1 calls
|
||||
//
|
||||
// window.open('http://example.com/.../DifferentOrigin.html?2'),
|
||||
//
|
||||
// which calls alert().
|
||||
|
||||
iframe.src = 'http://example.org/tests/dom/browser-element/mochitest/file_browserElement_OpenWindowDifferentOrigin.html?1';
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
runTest();
|
|
@ -0,0 +1,77 @@
|
|||
/* Any copyright is dedicated to the public domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Bug 762939 - Test that visibility propagates down properly through
|
||||
// hierarchies of <iframe mozbrowser>.
|
||||
//
|
||||
// In this test, we modify the parent's visibility and check that the child's
|
||||
// visibility is changed as appopriate. We test modifying the child's
|
||||
// visibility in a separate testcase.
|
||||
|
||||
"use strict";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var iframe;
|
||||
|
||||
function runTest() {
|
||||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addToWhitelist();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
|
||||
// Our test involves three <iframe mozbrowser>'s, parent, child1, and child2.
|
||||
// child1 and child2 are contained inside parent. child1 is visibile, and
|
||||
// child2 is not.
|
||||
//
|
||||
// For the purposes of this test, we want there to be a process barrier
|
||||
// between child{1,2} and parent. Therefore parent must be a non-remote
|
||||
// <iframe mozbrowser>, until bug 761935 is resolved and we can have nested
|
||||
// content processes.
|
||||
iframe.remote = false;
|
||||
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', checkMessage);
|
||||
expectMessage('parent:ready', test1);
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
iframe.src = 'file_browserElement_SetVisibleFrames_Outer.html';
|
||||
}
|
||||
|
||||
function test1() {
|
||||
expectMessage('child1:hidden', test2);
|
||||
iframe.setVisible(false);
|
||||
}
|
||||
|
||||
function test2() {
|
||||
expectMessage('child1:visible', finish);
|
||||
iframe.setVisible(true);
|
||||
}
|
||||
|
||||
function finish() {
|
||||
// We need to remove this listener because when this test finishes and the
|
||||
// iframe containing this document is navigated, we'll fire a
|
||||
// visibilitychange(false) event on all child iframes. That's OK and
|
||||
// expected, but if we don't remove our listener, then we'll end up causing
|
||||
// the /next/ test to fail!
|
||||
iframe.removeEventListener('mozbrowsershowmodalprompt', checkMessage);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
var expectedMsg = null;
|
||||
var expectedMsgCallback = null;
|
||||
function expectMessage(msg, next) {
|
||||
expectedMsg = msg;
|
||||
expectedMsgCallback = next;
|
||||
}
|
||||
|
||||
function checkMessage(e) {
|
||||
var msg = e.detail.message;
|
||||
is(msg, expectedMsg);
|
||||
if (msg == expectedMsg) {
|
||||
expectedMsg = null;
|
||||
SimpleTest.executeSoon(function() { expectedMsgCallback() });
|
||||
}
|
||||
}
|
||||
|
||||
runTest();
|
|
@ -0,0 +1,53 @@
|
|||
/* Any copyright is dedicated to the public domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Bug 762939 - Test that setting a <iframe mozbrowser> to invisible / visible
|
||||
// inside an invisible <iframe mozbrowser> doesn't trigger any events.
|
||||
|
||||
"use strict";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addToWhitelist();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
|
||||
// We need remote = false here until bug 761935 is fixed; see
|
||||
// SetVisibleFrames.js for an explanation.
|
||||
iframe.remote = false;
|
||||
|
||||
iframe.addEventListener('mozbrowserloadend', function loadEnd(e) {
|
||||
iframe.removeEventListener('mozbrowserloadend', loadEnd);
|
||||
iframe.setVisible(false);
|
||||
iframe.src = 'file_browserElement_SetVisibleFrames2_Outer.html';
|
||||
});
|
||||
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
if (e.detail.message == 'parent:finish') {
|
||||
ok(true, "Got parent:finish");
|
||||
|
||||
// Give any extra events a chance to fire, then end the test.
|
||||
SimpleTest.executeSoon(function() {
|
||||
SimpleTest.executeSoon(function() {
|
||||
SimpleTest.executeSoon(function() {
|
||||
SimpleTest.executeSoon(function() {
|
||||
SimpleTest.executeSoon(function() {
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
ok(false, "Got unexpected message: " + e.detail.message);
|
||||
}
|
||||
});
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
runTest();
|
|
@ -0,0 +1,32 @@
|
|||
/* Any copyright is dedicated to the public domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Bug 771273 - Check that window.open(url, '_top') works properly with <iframe
|
||||
// mozbrowser>.
|
||||
"use strict";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addToWhitelist();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
ok(false, 'Not expecting an openwindow event.');
|
||||
});
|
||||
|
||||
iframe.addEventListener('mozbrowserlocationchange', function(e) {
|
||||
if (/file_browserElement_TargetTop.html\?2$/.test(e.detail)) {
|
||||
ok(true, 'Got the locationchange we were looking for.');
|
||||
SimpleTest.finish();
|
||||
}
|
||||
});
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
iframe.src = 'file_browserElement_TargetTop.html';
|
||||
}
|
||||
|
||||
runTest();
|
|
@ -38,11 +38,13 @@ function outerIframeLoaded() {
|
|||
} \
|
||||
} \
|
||||
is(content.window.top, content.window, 'top'); \
|
||||
is(content.window.content, content.window, 'content'); \
|
||||
is(content.window.parent, content.window, 'parent'); \
|
||||
is(content.window.frameElement, null, 'frameElement'); \
|
||||
var innerIframe = content.document.getElementById('inner-iframe'); \
|
||||
var innerWindow = innerIframe.contentWindow; \
|
||||
is(innerWindow.top, content.window, 'inner top'); \
|
||||
is(innerWindow.content, content.window, 'inner content'); \
|
||||
is(innerWindow.parent, content.window, 'inner parent'); \
|
||||
is(innerWindow.frameElement, innerIframe, 'inner frameElement');"
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<html>
|
||||
<body>
|
||||
|
||||
<div id='name'></div>
|
||||
|
||||
<script>
|
||||
if (location.search == "?1") {
|
||||
open("http://example.com/tests/dom/browser-element/mochitest/file_browserElement_OpenWindowDifferentOrigin.html?2");
|
||||
}
|
||||
else if (location.search == "?2") {
|
||||
alert("finish");
|
||||
}
|
||||
|
||||
document.getElementById('name').innerHTML = location.search;
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
<html>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
|
||||
iframe.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
if (e.detail.message == 'child:ready') {
|
||||
setTimeout(function() {
|
||||
iframe.setVisible(false);
|
||||
iframe.setVisible(true);
|
||||
setTimeout(function() {
|
||||
alert('parent:finish');
|
||||
}, 0);
|
||||
}, 0);
|
||||
}
|
||||
else {
|
||||
// Pass the message up to our parent.
|
||||
alert(e.detail.message);
|
||||
}
|
||||
});
|
||||
|
||||
document.body.appendChild(iframe);
|
||||
iframe.src = 'file_browserElement_SetVisibleFrames_Inner.html?child';
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<html>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
var name = location.search.substring(1);
|
||||
addEventListener('load', function() {
|
||||
setTimeout(function() {
|
||||
alert(name + ':ready');
|
||||
}, 0);
|
||||
});
|
||||
|
||||
addEventListener('mozvisibilitychange', function() {
|
||||
alert(name + ':' + (document.mozHidden ? 'hidden' : 'visible'));
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<html>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
|
||||
var numPrompts = 0;
|
||||
function handlePrompt(e) {
|
||||
numPrompts++;
|
||||
|
||||
// The first two prompts should be "child1:ready" and "child2:ready". Once
|
||||
// we get both of these, forward the child's prompt up to our parent.
|
||||
if (numPrompts == 2) {
|
||||
// This has to happen here, because setVisibile doesn't exist on the iframe
|
||||
// until BrowserElementChild.js is loaded in it. (That's pretty broken...)
|
||||
iframe2.setVisible(false);
|
||||
}
|
||||
else if (numPrompts == 3) {
|
||||
if (e.detail.message != 'child2:hidden') {
|
||||
alert("parent:fail Didn't get expected 'child2:hidden'.");
|
||||
}
|
||||
|
||||
alert('parent:ready');
|
||||
}
|
||||
else if (numPrompts > 3) {
|
||||
alert(e.detail.message);
|
||||
}
|
||||
}
|
||||
|
||||
var iframe1 = document.createElement('iframe');
|
||||
iframe1.mozbrowser = true;
|
||||
iframe1.addEventListener('mozbrowsershowmodalprompt', handlePrompt);
|
||||
|
||||
var iframe2 = document.createElement('iframe');
|
||||
iframe2.mozbrowser = true;
|
||||
iframe2.addEventListener('mozbrowsershowmodalprompt', handlePrompt);
|
||||
|
||||
iframe1.src = 'file_browserElement_SetVisibleFrames_Inner.html?child1';
|
||||
iframe2.src = 'file_browserElement_SetVisibleFrames_Inner.html?child2';
|
||||
document.body.appendChild(iframe1);
|
||||
document.body.appendChild(iframe2);
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,12 @@
|
|||
<html>
|
||||
<body>
|
||||
<div id='url'></div>
|
||||
|
||||
<script>
|
||||
if (location.search == '') {
|
||||
window.open('file_browserElement_TargetTop.html?2', '_top');
|
||||
}
|
||||
document.getElementById('url').innerHTML = document.location.href;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of browser element.</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_BackForward.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of browser element.</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_OpenWindowDifferentOrigin.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 762939</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_SetVisibleFrames.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 762939</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_SetVisibleFrames2.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 771273</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_TargetTop.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of browser element.</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_OpenWindowDifferentOrigin.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 762939</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_SetVisibleFrames.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 762939</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_SetVisibleFrames2.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test for Bug 771273</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_TargetTop.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1230,7 +1230,7 @@ nsDOMDeviceStorage::GetType(nsAString & aType)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::Add(nsIDOMBlob *aBlob, nsIDOMDOMRequest * *_retval NS_OUTPARAM)
|
||||
nsDOMDeviceStorage::Add(nsIDOMBlob *aBlob, nsIDOMDOMRequest * *_retval)
|
||||
{
|
||||
// possible race here w/ unique filename
|
||||
char buffer[128];
|
||||
|
@ -1245,7 +1245,7 @@ nsDOMDeviceStorage::Add(nsIDOMBlob *aBlob, nsIDOMDOMRequest * *_retval NS_OUTPAR
|
|||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::AddNamed(nsIDOMBlob *aBlob,
|
||||
const nsAString & aPath,
|
||||
nsIDOMDOMRequest * *_retval NS_OUTPARAM)
|
||||
nsIDOMDOMRequest * *_retval)
|
||||
{
|
||||
// if the blob is null here, bail
|
||||
if (aBlob == nsnull)
|
||||
|
@ -1277,7 +1277,7 @@ nsDOMDeviceStorage::AddNamed(nsIDOMBlob *aBlob,
|
|||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::Get(const JS::Value & aPath,
|
||||
JSContext* aCx,
|
||||
nsIDOMDOMRequest * *_retval NS_OUTPARAM)
|
||||
nsIDOMDOMRequest * *_retval)
|
||||
{
|
||||
return GetInternal(aPath, aCx, _retval, false);
|
||||
}
|
||||
|
@ -1285,7 +1285,7 @@ nsDOMDeviceStorage::Get(const JS::Value & aPath,
|
|||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::GetEditable(const JS::Value & aPath,
|
||||
JSContext* aCx,
|
||||
nsIDOMDOMRequest * *_retval NS_OUTPARAM)
|
||||
nsIDOMDOMRequest * *_retval)
|
||||
{
|
||||
return GetInternal(aPath, aCx, _retval, true);
|
||||
}
|
||||
|
@ -1293,7 +1293,7 @@ nsDOMDeviceStorage::GetEditable(const JS::Value & aPath,
|
|||
nsresult
|
||||
nsDOMDeviceStorage::GetInternal(const JS::Value & aPath,
|
||||
JSContext* aCx,
|
||||
nsIDOMDOMRequest * *_retval NS_OUTPARAM,
|
||||
nsIDOMDOMRequest * *_retval,
|
||||
bool aEditable)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> win = do_QueryReferent(mOwner);
|
||||
|
@ -1331,7 +1331,7 @@ nsDOMDeviceStorage::GetInternal(const JS::Value & aPath,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::Delete(const JS::Value & aPath, JSContext* aCx, nsIDOMDOMRequest * *_retval NS_OUTPARAM)
|
||||
nsDOMDeviceStorage::Delete(const JS::Value & aPath, JSContext* aCx, nsIDOMDOMRequest * *_retval)
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> r;
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
private:
|
||||
~nsDOMDeviceStorage();
|
||||
|
||||
nsresult GetInternal(const JS::Value & aName, JSContext* aCx, nsIDOMDOMRequest * *_retval NS_OUTPARAM, bool aEditable);
|
||||
nsresult GetInternal(const JS::Value & aName, JSContext* aCx, nsIDOMDOMRequest * *_retval, bool aEditable);
|
||||
|
||||
nsresult EnumerateInternal(const JS::Value & aName, const JS::Value & aOptions, JSContext* aCx, PRUint8 aArgc, bool aEditable, nsIDOMDeviceStorageCursor** aRetval);
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ IndexedDatabaseManager::FireWindowOnError(nsPIDOMWindow* aOwner,
|
|||
if (NS_FAILED(scriptError->InitWithWindowID(event.errorMsg,
|
||||
event.fileName,
|
||||
nsnull, event.lineNr,
|
||||
nsnull, 0,
|
||||
0, 0,
|
||||
"IndexedDB",
|
||||
aOwner->WindowID()))) {
|
||||
NS_WARNING("Failed to init script error!");
|
||||
|
|
|
@ -45,7 +45,7 @@ include $(topsrcdir)/config/rules.mk
|
|||
|
||||
# Copy all the normal xpcshell tests from the regular unit directory.
|
||||
copy-xpcshell-tests:
|
||||
$(DIR_INSTALL) $(wildcard $(topsrcdir)/dom/indexedDB/test/unit/test_*.js) \
|
||||
$(testxpcobjdir)/$(relativesrcdir)/$(XPCSHELL_TESTS)
|
||||
$(call install_cmd,$(wildcard $(topsrcdir)/dom/indexedDB/test/unit/test_*.js) \
|
||||
$(testxpcobjdir)/$(relativesrcdir)/$(XPCSHELL_TESTS))
|
||||
|
||||
libs-xpcshell-tests: copy-xpcshell-tests
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче