mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central to fx-team
This commit is contained in:
commit
5fd4302283
@ -416,9 +416,7 @@ nsCoreUtils::IsContentDocument(nsIDocument *aDocument)
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem = aDocument->GetDocShell();
|
||||
NS_ASSERTION(docShellTreeItem, "No document shell tree item for document!");
|
||||
|
||||
int32_t contentType;
|
||||
docShellTreeItem->GetItemType(&contentType);
|
||||
return (contentType == nsIDocShellTreeItem::typeContent);
|
||||
return (docShellTreeItem->ItemType() == nsIDocShellTreeItem::typeContent);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -383,9 +383,8 @@ Accessible::AccessKey() const
|
||||
return KeyBinding();
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
int32_t itemType = 0, modifierMask = 0;
|
||||
treeItem->GetItemType(&itemType);
|
||||
switch (itemType) {
|
||||
int32_t modifierMask = 0;
|
||||
switch (treeItem->ItemType()) {
|
||||
case nsIDocShellTreeItem::typeChrome:
|
||||
rv = Preferences::GetInt("ui.key.chromeAccess", &modifierMask);
|
||||
break;
|
||||
@ -2120,10 +2119,9 @@ Accessible::RelationByType(RelationType aType)
|
||||
// If the item type is typeContent, we assume we are in browser tab
|
||||
// content. Note, this includes content such as about:addons,
|
||||
// for consistency.
|
||||
int32_t itemType = 0;
|
||||
root->GetItemType(&itemType);
|
||||
if (itemType == nsIDocShellTreeItem::typeContent)
|
||||
if (root->ItemType() == nsIDocShellTreeItem::typeContent) {
|
||||
return Relation(nsAccUtils::GetDocAccessibleFor(root));
|
||||
}
|
||||
}
|
||||
}
|
||||
return Relation();
|
||||
|
@ -189,8 +189,7 @@ DocAccessible::NativeRole()
|
||||
if (docShell) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
|
||||
docShell->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
|
||||
int32_t itemType;
|
||||
docShell->GetItemType(&itemType);
|
||||
int32_t itemType = docShell->ItemType();
|
||||
if (sameTypeRoot == docShell) {
|
||||
// Root of content or chrome tree
|
||||
if (itemType == nsIDocShellTreeItem::typeChrome)
|
||||
@ -692,9 +691,7 @@ DocAccessible::AddEventListeners()
|
||||
|
||||
// We want to add a command observer only if the document is content and has
|
||||
// an editor.
|
||||
int32_t itemType;
|
||||
docShellTreeItem->GetItemType(&itemType);
|
||||
if (itemType == nsIDocShellTreeItem::typeContent) {
|
||||
if (docShellTreeItem->ItemType() == nsIDocShellTreeItem::typeContent) {
|
||||
nsCOMPtr<nsICommandManager> commandManager = do_GetInterface(docShellTreeItem);
|
||||
if (commandManager)
|
||||
commandManager->AddCommandObserver(this, "obs_documentCreated");
|
||||
@ -724,9 +721,7 @@ DocAccessible::RemoveEventListeners()
|
||||
NS_ASSERTION(docShellTreeItem, "doc should support nsIDocShellTreeItem.");
|
||||
|
||||
if (docShellTreeItem) {
|
||||
int32_t itemType;
|
||||
docShellTreeItem->GetItemType(&itemType);
|
||||
if (itemType == nsIDocShellTreeItem::typeContent) {
|
||||
if (docShellTreeItem->ItemType() == nsIDocShellTreeItem::typeContent) {
|
||||
nsCOMPtr<nsICommandManager> commandManager = do_GetInterface(docShellTreeItem);
|
||||
if (commandManager) {
|
||||
commandManager->RemoveCommandObserver(this, "obs_documentCreated");
|
||||
@ -2028,9 +2023,7 @@ DocAccessible::IsLoadEventTarget() const
|
||||
}
|
||||
|
||||
// It's content (not chrome) root document.
|
||||
int32_t contentType;
|
||||
treeItem->GetItemType(&contentType);
|
||||
return (contentType == nsIDocShellTreeItem::typeContent);
|
||||
return (treeItem->ItemType() == nsIDocShellTreeItem::typeContent);
|
||||
}
|
||||
|
||||
PLDHashOperator
|
||||
|
@ -12,7 +12,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="221bcaecbbbc9d185f691471b64aed9e75b0c11d"/>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "34bb6cda673afe1b610c2be5611889c38d180b53",
|
||||
"revision": "997156ae4adde76831ba2fccce33ae340f897f75",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="221bcaecbbbc9d185f691471b64aed9e75b0c11d"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cf19095a08e1279667b3af0df920c0b0107c8cad"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2a698b3ee70d1811822d940c1b740b5adebea1ff"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -14,6 +14,9 @@ package-compare:
|
||||
stage-package:
|
||||
@$(MAKE) -C browser/installer stage-package
|
||||
|
||||
sdk:
|
||||
@$(MAKE) -C browser/installer make-sdk
|
||||
|
||||
install::
|
||||
@$(MAKE) -C browser/installer install
|
||||
|
||||
|
@ -8,8 +8,9 @@ import os
|
||||
import subprocess
|
||||
|
||||
from mach.decorators import (
|
||||
CommandProvider,
|
||||
Command,
|
||||
CommandArgument,
|
||||
CommandProvider,
|
||||
)
|
||||
from mozbuild.base import (
|
||||
MachCommandBase,
|
||||
@ -34,7 +35,12 @@ class MachCommands(MachCommandBase):
|
||||
@Command('valgrind-test', category='testing',
|
||||
conditions=[conditions.is_firefox, is_valgrind_build],
|
||||
description='Run the Valgrind test job.')
|
||||
def valgrind_test(self):
|
||||
@CommandArgument('--suppressions', default=[], action='append',
|
||||
metavar='FILENAME',
|
||||
help='Specify a suppression file for Valgrind to use. Use '
|
||||
'--suppression multiple times to specify multiple suppression '
|
||||
'files.')
|
||||
def valgrind_test(self, suppressions):
|
||||
import json
|
||||
import sys
|
||||
import tempfile
|
||||
@ -101,6 +107,9 @@ class MachCommands(MachCommandBase):
|
||||
'--track-origins=yes'
|
||||
]
|
||||
|
||||
for s in suppressions:
|
||||
valgrind_args.append('--suppressions=' + s)
|
||||
|
||||
supps_dir = os.path.join(build_dir, 'valgrind')
|
||||
supps_file1 = os.path.join(supps_dir, 'cross-architecture.sup')
|
||||
valgrind_args.append('--suppressions=' + supps_file1)
|
||||
|
@ -1,3 +1,7 @@
|
||||
# This file is normally included by autoconf.mk, but it is also used
|
||||
# directly in python/mozbuild/mozbuild/base.py for gmake validation.
|
||||
# We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
|
||||
# whether a normal build is happening or whether the check is running.
|
||||
includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||
@ -34,9 +38,11 @@ ifneq (4.0-,$(firstword $(sort 4.0- $(MAKE_VERSION))))
|
||||
$(error Make version too old. Only versions strictly greater than 4.0 are supported.)
|
||||
endif
|
||||
endif
|
||||
ifdef INCLUDED_AUTOCONF_MK
|
||||
ifeq (a,$(firstword a$(subst /, ,$(srcdir))))
|
||||
$(error MSYS-style srcdir are not supported for Windows builds.)
|
||||
endif
|
||||
endif
|
||||
endif # WINNT
|
||||
|
||||
ifdef .PYMAKE
|
||||
@ -44,3 +50,7 @@ include_deps = $(eval $(if $(2),,-)includedeps $(1))
|
||||
else
|
||||
include_deps = $(eval $(if $(2),,-)include $(1))
|
||||
endif
|
||||
|
||||
ifndef INCLUDED_AUTOCONF_MK
|
||||
default::
|
||||
endif
|
||||
|
@ -67,7 +67,8 @@ endif
|
||||
# Get all directories traversed for all subtiers in the current tier, or use
|
||||
# directly the $(*_dirs) variables available in root.mk when there is no
|
||||
# TIERS (like for js/src).
|
||||
CURRENT_DIRS := $(or $($(CURRENT_TIER)_dirs),$(foreach subtier,$(CURRENT_SUBTIERS),$($(CURRENT_TIER)_subtier_$(subtier))))
|
||||
TIER_DIRS = $(or $($(1)_dirs),$(foreach subtier,$($(1)_subtiers),$($(1)_subtier_$(subtier))))
|
||||
CURRENT_DIRS := $(call TIER_DIRS,$(CURRENT_TIER))
|
||||
|
||||
ifneq (,$(filter binaries libs,$(CURRENT_TIER)))
|
||||
WANT_STAMPS = 1
|
||||
@ -144,9 +145,8 @@ endif
|
||||
|
||||
else
|
||||
|
||||
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above, but
|
||||
# still recurse for externally managed make files (gyp-generated ones).
|
||||
ifeq ($(EXTERNALLY_MANAGED_MAKE_FILE)_$(NO_RECURSE_MAKELEVEL),_$(MAKELEVEL))
|
||||
# Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above
|
||||
ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
|
||||
|
||||
compile binaries libs export tools::
|
||||
|
||||
@ -193,20 +193,18 @@ tools export:: $(SUBMAKEFILES)
|
||||
|
||||
endif # ifdef TIERS
|
||||
|
||||
endif # ifeq ($(EXTERNALLY_MANAGED_MAKE_FILE)_$(NO_RECURSE_MAKELEVEL),_$(MAKELEVEL))
|
||||
endif # ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
|
||||
|
||||
endif # ifeq (1_.,$(MOZ_PSEUDO_DERECURSE)_$(DEPTH))
|
||||
|
||||
ifdef MOZ_PSEUDO_DERECURSE
|
||||
ifdef EXTERNALLY_MANAGED_MAKE_FILE
|
||||
# gyp-managed directories
|
||||
recurse_targets := $(addsuffix /binaries,$(DIRS) $(PARALLEL_DIRS))
|
||||
else
|
||||
ifeq (.,$(DEPTH))
|
||||
# top-level directories
|
||||
recurse_targets := $(addsuffix /binaries,$(binaries_dirs))
|
||||
ifdef recurse_targets
|
||||
# only js/src has binaries_dirs, and we want to adjust paths for it.
|
||||
ifdef BUILDING_JS
|
||||
ifndef JS_STANDALONE
|
||||
# Only define recurse_targets for js, when it is built as part of gecko.
|
||||
recurse_targets := $(addsuffix /binaries,$(call TIER_DIRS,binaries))
|
||||
# we want to adjust paths for js/src.
|
||||
want_abspaths = 1
|
||||
endif
|
||||
endif
|
||||
|
@ -8461,13 +8461,13 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLE)
|
||||
|
||||
# For extensions and langpacks, we require a max version that is compatible
|
||||
# across security releases. MOZ_APP_MAXVERSION is our method for doing that.
|
||||
# 10.0a1 and 10.0a2 aren't affected
|
||||
# 10.0 becomes 10.0.*
|
||||
# 10.0.1 becomes 10.0.*
|
||||
# 24.0a1 and 24.0a2 aren't affected
|
||||
# 24.0 becomes 24.*
|
||||
# 24.1.1 becomes 24.*
|
||||
IS_ALPHA=`echo $MOZ_APP_VERSION | grep a`
|
||||
if test -z "$IS_ALPHA"; then
|
||||
changequote(,)
|
||||
MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*.[0-9]*\).*|\1|"`.*
|
||||
MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\).*|\1|"`.*
|
||||
changequote([,])
|
||||
else
|
||||
MOZ_APP_MAXVERSION=$MOZ_APP_VERSION
|
||||
|
@ -408,16 +408,10 @@ DragDataProducer::Produce(nsDOMDataTransfer* aDataTransfer,
|
||||
// if set, serialize the content under this node
|
||||
nsCOMPtr<nsIContent> nodeToSerialize;
|
||||
|
||||
bool isChromeShell = false;
|
||||
nsCOMPtr<nsIWebNavigation> webnav = do_GetInterface(mWindow);
|
||||
nsCOMPtr<nsIDocShellTreeItem> dsti = do_QueryInterface(webnav);
|
||||
if (dsti) {
|
||||
int32_t type = -1;
|
||||
if (NS_SUCCEEDED(dsti->GetItemType(&type)) &&
|
||||
type == nsIDocShellTreeItem::typeChrome) {
|
||||
isChromeShell = true;
|
||||
}
|
||||
}
|
||||
const bool isChromeShell =
|
||||
dsti && dsti->ItemType() == nsIDocShellTreeItem::typeChrome;
|
||||
|
||||
// In chrome shells, only allow dragging inside editable areas.
|
||||
if (isChromeShell && !editingElement)
|
||||
|
@ -3219,13 +3219,12 @@ nsContentUtils::IsInChromeDocshell(nsIDocument *aDocument)
|
||||
return IsInChromeDocshell(aDocument->GetDisplayDocument());
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShell(aDocument->GetDocShell());
|
||||
int32_t itemType = nsIDocShellTreeItem::typeContent;
|
||||
if (docShell) {
|
||||
docShell->GetItemType(&itemType);
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShell = aDocument->GetDocShell();
|
||||
if (!docShell) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return itemType == nsIDocShellTreeItem::typeChrome;
|
||||
return docShell->ItemType() == nsIDocShellTreeItem::typeChrome;
|
||||
}
|
||||
|
||||
// static
|
||||
@ -5042,13 +5041,8 @@ nsContentUtils::CheckForSubFrameDrop(nsIDragSession* aDragSession,
|
||||
return true;
|
||||
}
|
||||
|
||||
int32_t type = -1;
|
||||
if (NS_FAILED(tdsti->GetItemType(&type))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Always allow dropping onto chrome shells.
|
||||
if (type == nsIDocShellTreeItem::typeChrome) {
|
||||
if (tdsti->ItemType() == nsIDocShellTreeItem::typeChrome) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -637,10 +637,9 @@ nsCopySupport::FireClipboardEvent(int32_t aType, int32_t aClipboardType, nsIPres
|
||||
if (!nsContentUtils::IsSafeToRunScript())
|
||||
return false;
|
||||
|
||||
int32_t type = -1;
|
||||
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(piWindow);
|
||||
bool chromeShell = (docShell && NS_SUCCEEDED(docShell->GetItemType(&type)) &&
|
||||
type == nsIDocShellTreeItem::typeChrome);
|
||||
const bool chromeShell =
|
||||
docShell && docShell->ItemType() == nsIDocShellTreeItem::typeChrome;
|
||||
|
||||
// next, fire the cut, copy or paste event
|
||||
bool doDefault = true;
|
||||
|
@ -4258,10 +4258,7 @@ nsIDocument::SetContainer(nsDocShell* aContainer)
|
||||
}
|
||||
|
||||
// Get the Docshell
|
||||
int32_t itemType;
|
||||
aContainer->GetItemType(&itemType);
|
||||
// check itemtype
|
||||
if (itemType == nsIDocShellTreeItem::typeContent) {
|
||||
if (aContainer->ItemType() == nsIDocShellTreeItem::typeContent) {
|
||||
// check if same type root
|
||||
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
|
||||
aContainer->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
|
||||
|
@ -783,9 +783,7 @@ AllDescendantsOfType(nsIDocShellTreeItem* aParentItem, int32_t aType)
|
||||
nsCOMPtr<nsIDocShellTreeItem> kid;
|
||||
aParentItem->GetChildAt(i, getter_AddRefs(kid));
|
||||
|
||||
int32_t kidType;
|
||||
kid->GetItemType(&kidType);
|
||||
if (kidType != aType || !AllDescendantsOfType(kid, aType)) {
|
||||
if (kid->ItemType() != aType || !AllDescendantsOfType(kid, aType)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1090,10 +1088,8 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
|
||||
// Also make sure that the two docshells are the same type. Otherwise
|
||||
// swapping is certainly not safe. If this needs to be changed then
|
||||
// the code below needs to be audited as it assumes identical types.
|
||||
int32_t ourType = nsIDocShellTreeItem::typeChrome;
|
||||
int32_t otherType = nsIDocShellTreeItem::typeChrome;
|
||||
ourDocshell->GetItemType(&ourType);
|
||||
otherDocshell->GetItemType(&otherType);
|
||||
int32_t ourType = ourDocshell->ItemType();
|
||||
int32_t otherType = otherDocshell->ItemType();
|
||||
if (ourType != otherType) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
@ -1123,10 +1119,8 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
|
||||
}
|
||||
|
||||
// Make sure our parents are the same type too
|
||||
int32_t ourParentType = nsIDocShellTreeItem::typeContent;
|
||||
int32_t otherParentType = nsIDocShellTreeItem::typeContent;
|
||||
ourParentItem->GetItemType(&ourParentType);
|
||||
otherParentItem->GetItemType(&otherParentType);
|
||||
int32_t ourParentType = ourParentItem->ItemType();
|
||||
int32_t otherParentType = otherParentItem->ItemType();
|
||||
if (ourParentType != otherParentType) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
@ -1616,8 +1610,7 @@ nsFrameLoader::MaybeCreateDocShell()
|
||||
// Note: This logic duplicates a lot of logic in
|
||||
// nsSubDocumentFrame::AttributeChanged. We should fix that.
|
||||
|
||||
int32_t parentType;
|
||||
docShell->GetItemType(&parentType);
|
||||
int32_t parentType = docShell->ItemType();
|
||||
|
||||
// XXXbz why is this in content code, exactly? We should handle
|
||||
// this some other way..... Not sure how yet.
|
||||
@ -1753,10 +1746,7 @@ nsFrameLoader::CheckForRecursiveLoad(nsIURI* aURI)
|
||||
"Trying to load a new url to a docshell without owner!");
|
||||
NS_ENSURE_STATE(treeOwner);
|
||||
|
||||
|
||||
int32_t ourType;
|
||||
rv = mDocShell->GetItemType(&ourType);
|
||||
if (NS_SUCCEEDED(rv) && ourType != nsIDocShellTreeItem::typeContent) {
|
||||
if (mDocShell->ItemType() != nsIDocShellTreeItem::typeContent) {
|
||||
// No need to do recursion-protection here XXXbz why not?? Do we really
|
||||
// trust people not to screw up with non-content docshells?
|
||||
return NS_OK;
|
||||
@ -2015,10 +2005,7 @@ nsFrameLoader::TryRemoteBrowser()
|
||||
|
||||
// <iframe mozbrowser> gets to skip these checks.
|
||||
if (!OwnerIsBrowserOrAppFrame()) {
|
||||
int32_t parentType;
|
||||
parentAsItem->GetItemType(&parentType);
|
||||
|
||||
if (parentType != nsIDocShellTreeItem::typeChrome) {
|
||||
if (parentAsItem->ItemType() != nsIDocShellTreeItem::typeChrome) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2544,10 +2531,7 @@ nsFrameLoader::AttributeChanged(nsIDocument* aDocument,
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t parentType;
|
||||
parentItem->GetItemType(&parentType);
|
||||
|
||||
if (parentType != nsIDocShellTreeItem::typeChrome) {
|
||||
if (parentItem->ItemType() != nsIDocShellTreeItem::typeChrome) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -253,10 +253,10 @@ nsInProcessTabChildGlobal::DelayedDisconnect()
|
||||
nsDOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("unload"));
|
||||
|
||||
// Continue with the Disconnect cleanup
|
||||
nsCOMPtr<nsIDOMWindow> win = do_GetInterface(mDocShell);
|
||||
nsCOMPtr<nsPIDOMWindow> pwin = do_QueryInterface(win);
|
||||
if (pwin) {
|
||||
pwin->SetChromeEventHandler(pwin->GetChromeEventHandler());
|
||||
nsCOMPtr<nsPIDOMWindow> win = do_GetInterface(mDocShell);
|
||||
if (win) {
|
||||
MOZ_ASSERT(win->IsOuterWindow());
|
||||
win->SetChromeEventHandler(win->GetChromeEventHandler());
|
||||
}
|
||||
mDocShell = nullptr;
|
||||
mChromeMessageManager = nullptr;
|
||||
|
@ -1,6 +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/.
|
||||
|
||||
MOCHITEST_FILES = file_bug649134-1.sjs file_bug649134-2.sjs index.html
|
@ -1,6 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
@ -1,8 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
MOCHITEST_MANIFESTS += ['mochitest.ini']
|
||||
|
@ -325,6 +325,16 @@ support-files =
|
||||
[test_bug643051.html]
|
||||
[test_bug646157.html]
|
||||
[test_bug649134.html]
|
||||
# This extra subdirectory is needed due to the nature of this test.
|
||||
# With the bug, the test loads the base URL of the bug649134/file_*.sjs
|
||||
# files, and the mochitest server responds with the contents of index.html if
|
||||
# it exists in that case, which we use to detect failure.
|
||||
# We cannot have index.html in this directory because it would prevent
|
||||
# running the tests here.
|
||||
support-files =
|
||||
bug649134/file_bug649134-1.sjs
|
||||
bug649134/file_bug649134-2.sjs
|
||||
bug649134/index.html
|
||||
[test_bug651956.html]
|
||||
[test_bug658746.html]
|
||||
[test_bug659596.html]
|
||||
|
@ -4,17 +4,7 @@
|
||||
# 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 extra subdirectory is needed due to the nature of this test.
|
||||
# With the bug, the test loads the base URL of the bug649134/file_*.sjs
|
||||
# files, and the mochitest server responds with the contents of index.html if
|
||||
# it exists in that case, which we use to detect failure.
|
||||
# We can't have index.html in this directory because it would prevent
|
||||
# running the tests here.
|
||||
TEST_DIRS += ['bug649134']
|
||||
|
||||
TEST_DIRS += ['forms']
|
||||
|
||||
MOCHITEST_MANIFESTS += ['mochitest.ini']
|
||||
MOCHITEST_MANIFESTS += ['forms/mochitest.ini', 'mochitest.ini']
|
||||
|
||||
MOCHITEST_CHROME_MANIFESTS += ['chrome.ini']
|
||||
|
||||
|
@ -161,24 +161,24 @@ function reflectUnsignedInt(aParameters)
|
||||
for (var value of values) {
|
||||
element[attr] = value;
|
||||
is(element[attr], value, "." + attr + " should be equals " + value);
|
||||
is(element.getAttribute(attr), value,
|
||||
is(element.getAttribute(attr), String(value),
|
||||
"@" + attr + " should be equals " + value);
|
||||
|
||||
element.setAttribute(attr, value);
|
||||
is(element[attr], value, "." + attr + " should be equals " + value);
|
||||
is(element.getAttribute(attr), value,
|
||||
is(element.getAttribute(attr), String(value),
|
||||
"@" + attr + " should be equals " + value);
|
||||
}
|
||||
|
||||
// -3000000000 is equivalent to 1294967296 when using the IDL attribute.
|
||||
element[attr] = -3000000000;
|
||||
is(element[attr], 1294967296, "." + attr + " should be equals to 1294967296");
|
||||
is(element.getAttribute(attr), 1294967296,
|
||||
is(element.getAttribute(attr), "1294967296",
|
||||
"@" + attr + " should be equals to 1294967296");
|
||||
|
||||
// When setting the content atribute, it's a string so it will be unvalid.
|
||||
element.setAttribute(attr, -3000000000);
|
||||
is(element.getAttribute(attr), -3000000000,
|
||||
is(element.getAttribute(attr), "-3000000000",
|
||||
"@" + attr + " should be equals to " + -3000000000);
|
||||
is(element[attr], defaultValue,
|
||||
"." + attr + " should be equals to " + defaultValue);
|
||||
@ -192,7 +192,7 @@ function reflectUnsignedInt(aParameters)
|
||||
|
||||
for (var values of nonValidValues) {
|
||||
element[attr] = values[0];
|
||||
is(element.getAttribute(attr), values[1],
|
||||
is(element.getAttribute(attr), String(values[1]),
|
||||
"@" + attr + " should be equals to " + values[1]);
|
||||
is(element[attr], defaultValue,
|
||||
"." + attr + " should be equals to " + defaultValue);
|
||||
@ -200,7 +200,7 @@ function reflectUnsignedInt(aParameters)
|
||||
|
||||
for (var values of nonValidValues) {
|
||||
element.setAttribute(attr, values[0]);
|
||||
is(element.getAttribute(attr), values[0],
|
||||
is(element.getAttribute(attr), String(values[0]),
|
||||
"@" + attr + " should be equals to " + values[0]);
|
||||
is(element[attr], defaultValue,
|
||||
"." + attr + " should be equals to " + defaultValue);
|
||||
@ -223,8 +223,8 @@ function reflectUnsignedInt(aParameters)
|
||||
}
|
||||
|
||||
// If 0 is set in @attr, it will be ignored when calling .attr.
|
||||
element.setAttribute(attr, 0);
|
||||
is(element.getAttribute(attr), 0, "@" + attr + " should be equals to 0");
|
||||
element.setAttribute(attr, "0");
|
||||
is(element.getAttribute(attr), "0", "@" + attr + " should be equals to 0");
|
||||
if (nonZero) {
|
||||
is(element[attr], defaultValue,
|
||||
"." + attr + " should be equals to " + defaultValue);
|
||||
@ -474,9 +474,10 @@ function reflectInt(aParameters)
|
||||
// Parse: Ignore leading whitespace, find [+/-][numbers]
|
||||
var result = /^[ \t\n\f\r]*([\+\-]?[0-9]+)/.exec(value);
|
||||
if (result) {
|
||||
if ((nonNegative ? 0:-0x80000000) <= result[1] && result[1] <= 0x7FFFFFFF) {
|
||||
var resultInt = parseInt(result[1], 10);
|
||||
if ((nonNegative ? 0 : -0x80000000) <= resultInt && resultInt <= 0x7FFFFFFF) {
|
||||
// If the value is within allowed value range for signed/unsigned integer, return value
|
||||
return result[1];
|
||||
return resultInt;
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
@ -569,8 +570,9 @@ function reflectInt(aParameters)
|
||||
} else {
|
||||
is(element[attr], expectedIdlAttributeResult(v), element.localName + "[" + attr + "] = " + v +
|
||||
", " + element.localName + "[" + attr + "] ");
|
||||
is(element.getAttribute(attr), expectedIdlAttributeResult(v), element.localName + "[" + attr +
|
||||
"] = " + v + ", " + element.localName + ".getAttribute(" + attr + ") ");
|
||||
is(element.getAttribute(attr), String(expectedIdlAttributeResult(v)),
|
||||
element.localName + "[" + attr + "] = " + v + ", " +
|
||||
element.localName + ".getAttribute(" + attr + ") ");
|
||||
}
|
||||
}
|
||||
element.removeAttribute(attr);
|
||||
|
@ -334,8 +334,7 @@ ForEachPing(nsIContent *content, ForEachPingCallback callback, void *closure)
|
||||
if (!content->IsHTML())
|
||||
return;
|
||||
nsIAtom *nameAtom = content->Tag();
|
||||
if (!nameAtom->Equals(NS_LITERAL_STRING("a")) &&
|
||||
!nameAtom->Equals(NS_LITERAL_STRING("area")))
|
||||
if (nameAtom != nsGkAtoms::a && nameAtom != nsGkAtoms::area)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIAtom> pingAtom = do_GetAtom("ping");
|
||||
@ -2840,12 +2839,18 @@ nsDocShell::NameEquals(const char16_t *aName, bool *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* virtual */ int32_t
|
||||
nsDocShell::ItemType()
|
||||
{
|
||||
return mItemType;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetItemType(int32_t * aItemType)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aItemType);
|
||||
|
||||
*aItemType = mItemType;
|
||||
*aItemType = ItemType();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -3029,10 +3034,7 @@ nsDocShell::GetSameTypeParent(nsIDocShellTreeItem ** aParent)
|
||||
if (!parent)
|
||||
return NS_OK;
|
||||
|
||||
int32_t parentType;
|
||||
NS_ENSURE_SUCCESS(parent->GetItemType(&parentType), NS_ERROR_FAILURE);
|
||||
|
||||
if (parentType == mItemType) {
|
||||
if (parent->ItemType() == mItemType) {
|
||||
parent.swap(*aParent);
|
||||
}
|
||||
return NS_OK;
|
||||
@ -3049,10 +3051,7 @@ nsDocShell::GetSameTypeParentIgnoreBrowserAndAppBoundaries(nsIDocShell** aParent
|
||||
if (!parent)
|
||||
return NS_OK;
|
||||
|
||||
int32_t parentType;
|
||||
NS_ENSURE_SUCCESS(parent->GetItemType(&parentType), NS_ERROR_FAILURE);
|
||||
|
||||
if (parentType == mItemType) {
|
||||
if (parent->ItemType() == mItemType) {
|
||||
nsCOMPtr<nsIDocShell> parentDS = do_QueryInterface(parent);
|
||||
parentDS.forget(aParent);
|
||||
}
|
||||
@ -3352,9 +3351,7 @@ nsDocShell::DoFindItemWithName(const char16_t* aName,
|
||||
if (parentAsTreeItem == reqAsTreeItem)
|
||||
return NS_OK;
|
||||
|
||||
int32_t parentType;
|
||||
parentAsTreeItem->GetItemType(&parentType);
|
||||
if (parentType == mItemType) {
|
||||
if (parentAsTreeItem->ItemType() == mItemType) {
|
||||
return parentAsTreeItem->
|
||||
FindItemWithName(aName,
|
||||
static_cast<nsIDocShellTreeItem*>
|
||||
@ -3464,8 +3461,7 @@ PrintDocTree(nsIDocShellTreeItem * aParentNode, int aLevel)
|
||||
int32_t childWebshellCount;
|
||||
aParentNode->GetChildCount(&childWebshellCount);
|
||||
nsCOMPtr<nsIDocShell> parentAsDocShell(do_QueryInterface(aParentNode));
|
||||
int32_t type;
|
||||
aParentNode->GetItemType(&type);
|
||||
int32_t type = aParentNode->ItemType();
|
||||
nsCOMPtr<nsIPresShell> presShell = parentAsDocShell->GetPresShell();
|
||||
nsRefPtr<nsPresContext> presContext;
|
||||
parentAsDocShell->GetPresContext(getter_AddRefs(presContext));
|
||||
@ -3557,9 +3553,8 @@ nsDocShell::SetTreeOwner(nsIDocShellTreeOwner * aTreeOwner)
|
||||
while (iter.HasMore()) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> child = do_QueryObject(iter.GetNext());
|
||||
NS_ENSURE_TRUE(child, NS_ERROR_FAILURE);
|
||||
int32_t childType = ~mItemType; // Set it to not us in case the get fails
|
||||
child->GetItemType(&childType); // We don't care if this fails, if it does we won't set the owner
|
||||
if (childType == mItemType)
|
||||
|
||||
if (child->ItemType() == mItemType)
|
||||
child->SetTreeOwner(aTreeOwner);
|
||||
}
|
||||
|
||||
@ -3657,13 +3652,9 @@ nsDocShell::AddChild(nsIDocShellTreeItem * aChild)
|
||||
childDocShell->SetUseGlobalHistory(true);
|
||||
}
|
||||
|
||||
|
||||
int32_t childType = ~mItemType; // Set it to not us in case the get fails
|
||||
aChild->GetItemType(&childType);
|
||||
if (childType != mItemType)
|
||||
if (aChild->ItemType() != mItemType) {
|
||||
return NS_OK;
|
||||
// Everything below here is only done when the child is the same type.
|
||||
|
||||
}
|
||||
|
||||
aChild->SetTreeOwner(mTreeOwner);
|
||||
|
||||
@ -3773,8 +3764,7 @@ nsDocShell::FindChildWithName(const char16_t * aName,
|
||||
while (iter.HasMore()) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> child = do_QueryObject(iter.GetNext());
|
||||
NS_ENSURE_TRUE(child, NS_ERROR_FAILURE);
|
||||
int32_t childType;
|
||||
child->GetItemType(&childType);
|
||||
int32_t childType = child->ItemType();
|
||||
|
||||
if (aSameType && (childType != mItemType))
|
||||
continue;
|
||||
|
@ -123,11 +123,9 @@ nsresult nsDocShellForwardsEnumerator::BuildArrayRecursive(nsIDocShellTreeItem*
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
int32_t itemType;
|
||||
// add this item to the array
|
||||
if ((mDocShellType == nsIDocShellTreeItem::typeAll) ||
|
||||
(NS_SUCCEEDED(inItem->GetItemType(&itemType)) && (itemType == mDocShellType)))
|
||||
{
|
||||
if (mDocShellType == nsIDocShellTreeItem::typeAll ||
|
||||
inItem->ItemType() == mDocShellType) {
|
||||
if (!inItemArray.AppendElement(do_GetWeakReference(inItem)))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
@ -168,17 +166,12 @@ nsresult nsDocShellBackwardsEnumerator::BuildArrayRecursive(nsIDocShellTreeItem*
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
int32_t itemType;
|
||||
// add this item to the array
|
||||
if ((mDocShellType == nsIDocShellTreeItem::typeAll) ||
|
||||
(NS_SUCCEEDED(inItem->GetItemType(&itemType)) && (itemType == mDocShellType)))
|
||||
{
|
||||
if (mDocShellType == nsIDocShellTreeItem::typeAll ||
|
||||
inItem->ItemType() == mDocShellType) {
|
||||
if (!inItemArray.AppendElement(do_GetWeakReference(inItem)))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ interface nsIReflowObserver;
|
||||
|
||||
typedef unsigned long nsLoadFlags;
|
||||
|
||||
[scriptable, builtinclass, uuid(24732b66-e37e-444e-96a2-8b8d1fa292fc)]
|
||||
[scriptable, builtinclass, uuid(af035c67-1690-431b-9c4d-d38e3cc3137a)]
|
||||
interface nsIDocShell : nsIDocShellTreeItem
|
||||
{
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ interface nsIDocShellTreeOwner;
|
||||
* node or a leaf.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(cb16a98d-a9e4-4ee2-a450-709b92ad8a89)]
|
||||
[scriptable, uuid(f897f4af-f67e-4115-9d37-ce09f71122e2)]
|
||||
interface nsIDocShellTreeItem : nsISupports
|
||||
{
|
||||
/*
|
||||
@ -46,6 +46,7 @@ interface nsIDocShellTreeItem : nsISupports
|
||||
The type this item is.
|
||||
*/
|
||||
attribute long itemType;
|
||||
[noscript,notxpcom,nostdcall] long ItemType();
|
||||
|
||||
/*
|
||||
Parent DocShell.
|
||||
|
@ -1,14 +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/.
|
||||
|
||||
# Disabled for too many intermittent failures (bug 719186)
|
||||
# test_bug413310.html \
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
MOCHITEST_FILES += \
|
||||
test_bug511449.html \
|
||||
file_bug511449.html \
|
||||
$(NULL)
|
||||
endif
|
@ -1,8 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['browser.ini']
|
||||
|
@ -44,8 +44,14 @@ support-files =
|
||||
[test_bug387979.html]
|
||||
[test_bug402210.html]
|
||||
[test_bug404548.html]
|
||||
[test_bug413310.html]
|
||||
# Disabled for too many intermittent failures (bug 719186)
|
||||
skip-if = true
|
||||
[test_bug475636.html]
|
||||
[test_bug509055.html]
|
||||
[test_bug511449.html]
|
||||
skip-if = toolkit != "cocoa"
|
||||
support-files = file_bug511449.html
|
||||
[test_bug529119-1.html]
|
||||
[test_bug529119-2.html]
|
||||
[test_bug540462.html]
|
||||
|
@ -4,7 +4,7 @@
|
||||
# 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/.
|
||||
|
||||
DIRS += ['chrome', 'navigation', 'browser']
|
||||
DIRS += ['chrome', 'navigation']
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
|
||||
|
||||
@ -16,3 +16,5 @@ MOCHITEST_MANIFESTS += [
|
||||
'iframesandbox/mochitest.ini',
|
||||
'mochitest.ini'
|
||||
]
|
||||
BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
|
||||
|
||||
|
@ -594,13 +594,10 @@ nsFocusManager::GetFocusedElementForWindow(nsIDOMWindow* aWindow,
|
||||
NS_IMETHODIMP
|
||||
nsFocusManager::MoveCaretToFocus(nsIDOMWindow* aWindow)
|
||||
{
|
||||
int32_t itemType = nsIDocShellTreeItem::typeChrome;
|
||||
|
||||
nsCOMPtr<nsIWebNavigation> webnav = do_GetInterface(aWindow);
|
||||
nsCOMPtr<nsIDocShellTreeItem> dsti = do_QueryInterface(webnav);
|
||||
if (dsti) {
|
||||
dsti->GetItemType(&itemType);
|
||||
if (itemType != nsIDocShellTreeItem::typeChrome) {
|
||||
if (dsti->ItemType() != nsIDocShellTreeItem::typeChrome) {
|
||||
nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(dsti);
|
||||
NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE);
|
||||
|
||||
@ -2041,10 +2038,9 @@ nsFocusManager::UpdateCaret(bool aMoveCaretToFocus,
|
||||
if (!dsti)
|
||||
return;
|
||||
|
||||
int32_t itemType;
|
||||
dsti->GetItemType(&itemType);
|
||||
if (itemType == nsIDocShellTreeItem::typeChrome)
|
||||
if (dsti->ItemType() == nsIDocShellTreeItem::typeChrome) {
|
||||
return; // Never browse with caret in chrome
|
||||
}
|
||||
|
||||
bool browseWithCaret =
|
||||
Preferences::GetBool("accessibility.browsewithcaret");
|
||||
@ -2473,9 +2469,7 @@ nsFocusManager::DetermineElementToMoveFocus(nsPIDOMWindow* aWindow,
|
||||
}
|
||||
else {
|
||||
// Otherwise, for content shells, start from the location of the caret.
|
||||
int32_t itemType;
|
||||
docShell->GetItemType(&itemType);
|
||||
if (itemType != nsIDocShellTreeItem::typeChrome) {
|
||||
if (docShell->ItemType() != nsIDocShellTreeItem::typeChrome) {
|
||||
nsCOMPtr<nsIContent> endSelectionContent;
|
||||
GetSelectionLocation(doc, presShell,
|
||||
getter_AddRefs(startContent),
|
||||
@ -2991,14 +2985,11 @@ nsFocusManager::GetRootForFocus(nsPIDOMWindow* aWindow,
|
||||
if (!frame || !frame->IsFocusable(nullptr, 0))
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
else {
|
||||
int32_t itemType;
|
||||
} else {
|
||||
nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell();
|
||||
docShell->GetItemType(&itemType);
|
||||
|
||||
if (itemType == nsIDocShellTreeItem::typeChrome)
|
||||
if (docShell->ItemType() == nsIDocShellTreeItem::typeChrome) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (aCheckVisibility && !IsWindowVisible(aWindow))
|
||||
|
@ -1956,12 +1956,9 @@ nsGlobalWindow::SetInitialPrincipalToSubject()
|
||||
|
||||
// Now, if we're about to use the system principal, make sure we're not using
|
||||
// it for a content docshell.
|
||||
if (newWindowPrincipal == systemPrincipal) {
|
||||
int32_t itemType;
|
||||
nsresult rv = GetDocShell()->GetItemType(&itemType);
|
||||
if (NS_FAILED(rv) || itemType != nsIDocShellTreeItem::typeChrome) {
|
||||
newWindowPrincipal = nullptr;
|
||||
}
|
||||
if (newWindowPrincipal == systemPrincipal &&
|
||||
GetDocShell()->ItemType() != nsIDocShellTreeItem::typeChrome) {
|
||||
newWindowPrincipal = nullptr;
|
||||
}
|
||||
|
||||
// If there's an existing document, bail if it either:
|
||||
@ -2586,12 +2583,8 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
||||
// situation when we're creating a temporary non-chrome-about-blank
|
||||
// document in a chrome docshell, don't notify just yet. Instead wait
|
||||
// until we have a real chrome doc.
|
||||
int32_t itemType = nsIDocShellTreeItem::typeContent;
|
||||
if (mDocShell) {
|
||||
mDocShell->GetItemType(&itemType);
|
||||
}
|
||||
|
||||
if (itemType != nsIDocShellTreeItem::typeChrome ||
|
||||
if (!mDocShell ||
|
||||
mDocShell->ItemType() != nsIDocShellTreeItem::typeChrome ||
|
||||
nsContentUtils::IsSystemPrincipal(mDoc->NodePrincipal())) {
|
||||
newInnerWindow->mHasNotifiedGlobalCreated = true;
|
||||
nsContentUtils::AddScriptRunner(
|
||||
@ -3157,15 +3150,8 @@ nsGlobalWindow::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
|
||||
|
||||
nsCOMPtr<Element> element = GetFrameElementInternal();
|
||||
nsIDocShell* docShell = GetDocShell();
|
||||
|
||||
int32_t itemType = nsIDocShellTreeItem::typeChrome;
|
||||
|
||||
if (docShell) {
|
||||
docShell->GetItemType(&itemType);
|
||||
}
|
||||
|
||||
if (element && GetParentInternal() &&
|
||||
itemType != nsIDocShellTreeItem::typeChrome) {
|
||||
docShell && docShell->ItemType() != nsIDocShellTreeItem::typeChrome) {
|
||||
// If we're not in chrome, or at a chrome boundary, fire the
|
||||
// onload event for the frame element.
|
||||
|
||||
@ -5656,9 +5642,7 @@ nsGlobalWindow::SetFullScreenInternal(bool aFullScreen, bool aRequireTrust)
|
||||
|
||||
// make sure we don't try to set full screen on a non-chrome window,
|
||||
// which might happen in embedding world
|
||||
int32_t itemType;
|
||||
mDocShell->GetItemType(&itemType);
|
||||
if (itemType != nsIDocShellTreeItem::typeChrome)
|
||||
if (mDocShell->ItemType() != nsIDocShellTreeItem::typeChrome)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// If we are already in full screen mode, just return.
|
||||
@ -6289,9 +6273,7 @@ nsGlobalWindow::Focus(ErrorResult& aError)
|
||||
// about:blank loaded. We don't want to focus our widget in that case.
|
||||
// XXXbz should we really be checking for IsInitialDocument() instead?
|
||||
bool lookForPresShell = true;
|
||||
int32_t itemType = nsIDocShellTreeItem::typeContent;
|
||||
mDocShell->GetItemType(&itemType);
|
||||
if (itemType == nsIDocShellTreeItem::typeChrome &&
|
||||
if (mDocShell->ItemType() == nsIDocShellTreeItem::typeChrome &&
|
||||
GetPrivateRoot() == static_cast<nsIDOMWindow*>(this) &&
|
||||
mDoc) {
|
||||
nsIURI* ourURI = mDoc->GetDocumentURI();
|
||||
@ -6881,10 +6863,10 @@ nsGlobalWindow::GetWindowRoot(nsIDOMEventTarget **aWindowRoot)
|
||||
already_AddRefed<nsPIWindowRoot>
|
||||
nsGlobalWindow::GetTopWindowRoot()
|
||||
{
|
||||
nsIDOMWindow *rootWindow = GetPrivateRoot();
|
||||
nsCOMPtr<nsPIDOMWindow> piWin(do_QueryInterface(rootWindow));
|
||||
if (!piWin)
|
||||
nsPIDOMWindow* piWin = GetPrivateRoot();
|
||||
if (!piWin) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIWindowRoot> window = do_QueryInterface(piWin->GetChromeEventHandler());
|
||||
return window.forget();
|
||||
@ -7154,10 +7136,9 @@ nsGlobalWindow::RevisePopupAbuseLevel(PopupControlState aControl)
|
||||
|
||||
NS_ASSERTION(mDocShell, "Must have docshell");
|
||||
|
||||
int32_t type = nsIDocShellTreeItem::typeChrome;
|
||||
mDocShell->GetItemType(&type);
|
||||
if (type != nsIDocShellTreeItem::typeContent)
|
||||
if (mDocShell->ItemType() != nsIDocShellTreeItem::typeContent) {
|
||||
return openAllowed;
|
||||
}
|
||||
|
||||
PopupControlState abuse = aControl;
|
||||
switch (abuse) {
|
||||
@ -9416,22 +9397,16 @@ nsGlobalWindow::DisableGamepadUpdates()
|
||||
void
|
||||
nsGlobalWindow::SetChromeEventHandler(EventTarget* aChromeEventHandler)
|
||||
{
|
||||
MOZ_ASSERT(IsOuterWindow());
|
||||
|
||||
SetChromeEventHandlerInternal(aChromeEventHandler);
|
||||
if (IsOuterWindow()) {
|
||||
// update the chrome event handler on all our inner windows
|
||||
for (nsGlobalWindow *inner = (nsGlobalWindow *)PR_LIST_HEAD(this);
|
||||
inner != this;
|
||||
inner = (nsGlobalWindow*)PR_NEXT_LINK(inner)) {
|
||||
NS_ASSERTION(!inner->mOuterWindow || inner->mOuterWindow == this,
|
||||
"bad outer window pointer");
|
||||
inner->SetChromeEventHandlerInternal(aChromeEventHandler);
|
||||
}
|
||||
} else if (mOuterWindow) {
|
||||
// Need the cast to be able to call the protected method on a
|
||||
// superclass. We could make the method public instead, but it's really
|
||||
// better this way.
|
||||
static_cast<nsGlobalWindow*>(mOuterWindow.get())->
|
||||
SetChromeEventHandlerInternal(aChromeEventHandler);
|
||||
// update the chrome event handler on all our inner windows
|
||||
for (nsGlobalWindow *inner = (nsGlobalWindow *)PR_LIST_HEAD(this);
|
||||
inner != this;
|
||||
inner = (nsGlobalWindow*)PR_NEXT_LINK(inner)) {
|
||||
NS_ASSERTION(!inner->mOuterWindow || inner->mOuterWindow == this,
|
||||
"bad outer window pointer");
|
||||
inner->SetChromeEventHandlerInternal(aChromeEventHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,6 @@ public:
|
||||
virtual NS_HIDDEN_(void) ActivateOrDeactivate(bool aActivate);
|
||||
virtual NS_HIDDEN_(void) SetActive(bool aActive);
|
||||
virtual NS_HIDDEN_(void) SetIsBackground(bool aIsBackground);
|
||||
|
||||
virtual NS_HIDDEN_(void) SetChromeEventHandler(mozilla::dom::EventTarget* aChromeEventHandler);
|
||||
|
||||
virtual NS_HIDDEN_(void) SetInitialPrincipalToSubject();
|
||||
@ -548,17 +547,6 @@ public:
|
||||
return mContext;
|
||||
}
|
||||
|
||||
nsIScriptContext *GetScriptContextInternal(uint32_t aLangID)
|
||||
{
|
||||
NS_ASSERTION(aLangID == nsIProgrammingLanguage::JAVASCRIPT,
|
||||
"We don't support this language ID");
|
||||
if (mOuterWindow) {
|
||||
return GetOuterWindowInternal()->mContext;
|
||||
}
|
||||
|
||||
return mContext;
|
||||
}
|
||||
|
||||
nsGlobalWindow *GetOuterWindowInternal()
|
||||
{
|
||||
return static_cast<nsGlobalWindow *>(GetOuterWindow());
|
||||
|
@ -245,12 +245,8 @@ nsSelectMoveScrollCommand::DoCommand(const char *aCommandName, nsISupports *aCom
|
||||
caretOn = Preferences::GetBool("accessibility.browsewithcaret");
|
||||
if (caretOn) {
|
||||
nsCOMPtr<nsIDocShell> docShell = piWindow->GetDocShell();
|
||||
if (docShell) {
|
||||
int32_t itemType;
|
||||
docShell->GetItemType(&itemType);
|
||||
if (itemType == nsIDocShellTreeItem::typeChrome) {
|
||||
caretOn = false;
|
||||
}
|
||||
if (docShell && docShell->ItemType() == nsIDocShellTreeItem::typeChrome) {
|
||||
caretOn = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
return mChromeEventHandler;
|
||||
}
|
||||
|
||||
// Outer windows only.
|
||||
virtual void SetChromeEventHandler(mozilla::dom::EventTarget* aChromeEventHandler) = 0;
|
||||
|
||||
mozilla::dom::EventTarget* GetParentTarget()
|
||||
|
@ -20,22 +20,6 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
namespace {
|
||||
|
||||
bool
|
||||
IsChromeType(nsIDocShell *aDocShell)
|
||||
{
|
||||
if (!aDocShell) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t itemType;
|
||||
aDocShell->GetItemType(&itemType);
|
||||
return itemType == nsIDocShellTreeItem::typeChrome;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
/* static */ already_AddRefed<nsScreen>
|
||||
nsScreen::Create(nsPIDOMWindow* aWindow)
|
||||
{
|
||||
@ -218,7 +202,8 @@ nsScreen::GetLockOrientationPermission() const
|
||||
}
|
||||
|
||||
// Chrome can always lock the screen orientation.
|
||||
if (IsChromeType(owner->GetDocShell())) {
|
||||
nsIDocShell* docShell = owner->GetDocShell();
|
||||
if (docShell && docShell->ItemType() == nsIDocShellTreeItem::typeChrome) {
|
||||
return LOCK_ALLOWED;
|
||||
}
|
||||
|
||||
|
@ -3119,6 +3119,13 @@ BluetoothDBusService::SendMetaData(const nsAString& aTitle,
|
||||
nsCString tempMediaNumber = EmptyCString();
|
||||
nsCString tempTotalMediaCount = EmptyCString();
|
||||
nsCString tempDuration = EmptyCString();
|
||||
|
||||
// We currently don't support genre field in music player.
|
||||
// In order to send media metadata through AVRCP, we set genre to an empty
|
||||
// string to match the BlueZ method "UpdateMetaData" with signature "sssssss",
|
||||
// which takes genre field as the last parameter.
|
||||
nsCString tempGenre = EmptyCString();
|
||||
|
||||
if (aMediaNumber >= 0) {
|
||||
tempMediaNumber.AppendInt(aMediaNumber);
|
||||
}
|
||||
@ -3135,6 +3142,7 @@ BluetoothDBusService::SendMetaData(const nsAString& aTitle,
|
||||
const char* mediaNumber = tempMediaNumber.get();
|
||||
const char* totalMediaCount = tempTotalMediaCount.get();
|
||||
const char* duration = tempDuration.get();
|
||||
const char* genre = tempGenre.get();
|
||||
|
||||
nsAutoString prevTitle, prevAlbum;
|
||||
a2dp->GetTitle(prevTitle);
|
||||
@ -3161,6 +3169,7 @@ BluetoothDBusService::SendMetaData(const nsAString& aTitle,
|
||||
DBUS_TYPE_STRING, &mediaNumber,
|
||||
DBUS_TYPE_STRING, &totalMediaCount,
|
||||
DBUS_TYPE_STRING, &duration,
|
||||
DBUS_TYPE_STRING, &genre,
|
||||
DBUS_TYPE_INVALID);
|
||||
NS_ENSURE_TRUE_VOID(ret);
|
||||
|
||||
|
@ -4,4 +4,4 @@
|
||||
# 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/.
|
||||
|
||||
DIRS = ['priority']
|
||||
MOCHITEST_MANIFESTS += ['priority/mochitest.ini']
|
||||
|
@ -1,39 +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/.
|
||||
|
||||
# Note: ../browserElementTestHelpers.js makes all tests in this directory OOP,
|
||||
# because testing the process-priority manager without OOP frames doesn't make
|
||||
# much sense.
|
||||
#
|
||||
# Good luck running these tests on anything but desktop Linux.
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
|
||||
# This test disabled due to bug 865844. In fact, it was never enabled!
|
||||
#
|
||||
# test_WebGLContextLost.html \
|
||||
# file_WebGLContextLost.html \
|
||||
|
||||
MOCHITEST_FILES = \
|
||||
test_Simple.html \
|
||||
test_Visibility.html \
|
||||
test_HighPriority.html \
|
||||
file_HighPriority.html \
|
||||
test_HighPriorityDowngrade.html \
|
||||
test_HighPriorityDowngrade2.html \
|
||||
test_Background.html \
|
||||
test_BackgroundLRU.html \
|
||||
test_Audio.html \
|
||||
file_Audio.html \
|
||||
silence.ogg \
|
||||
test_MultipleFrames.html \
|
||||
file_MultipleFrames.html \
|
||||
test_Preallocated.html \
|
||||
test_ExpectingSystemMessage.html \
|
||||
test_ExpectingSystemMessage2.html \
|
||||
test_NestedFrames.html \
|
||||
file_NestedFramesOuter.html \
|
||||
$(NULL)
|
||||
|
||||
endif # MOZ_WIDGET_TOOLKIT == gtk2
|
30
dom/browser-element/mochitest/priority/mochitest.ini
Normal file
30
dom/browser-element/mochitest/priority/mochitest.ini
Normal file
@ -0,0 +1,30 @@
|
||||
[DEFAULT]
|
||||
# Good luck running these tests on anything but desktop Linux.
|
||||
skip-if = toolkit != "gtk2"
|
||||
|
||||
# Note: ../browserElementTestHelpers.js makes all tests in this directory OOP,
|
||||
# because testing the process-priority manager without OOP frames does not make
|
||||
# much sense.
|
||||
|
||||
[test_Simple.html]
|
||||
[test_Visibility.html]
|
||||
[test_HighPriority.html]
|
||||
support-files = file_HighPriority.html
|
||||
[test_HighPriorityDowngrade.html]
|
||||
[test_HighPriorityDowngrade2.html]
|
||||
[test_Background.html]
|
||||
[test_BackgroundLRU.html]
|
||||
[test_Audio.html]
|
||||
support-files = file_Audio.html silence.ogg
|
||||
[test_MultipleFrames.html]
|
||||
support-files = file_MultipleFrames.html
|
||||
[test_Preallocated.html]
|
||||
[test_ExpectingSystemMessage.html]
|
||||
[test_ExpectingSystemMessage2.html]
|
||||
[test_NestedFrames.html]
|
||||
support-files = file_NestedFramesOuter.html
|
||||
[test_WebGLContextLost.html]
|
||||
# This test disabled due to bug 865844. In fact, it was never enabled!
|
||||
skip-if = true
|
||||
support-files = file_WebGLContextLost.html
|
||||
|
@ -150,8 +150,7 @@ PrintDocTree(nsIDocShellTreeItem* aParentItem, int aLevel)
|
||||
int32_t childWebshellCount;
|
||||
aParentItem->GetChildCount(&childWebshellCount);
|
||||
nsCOMPtr<nsIDocShell> parentAsDocShell(do_QueryInterface(aParentItem));
|
||||
int32_t type;
|
||||
aParentItem->GetItemType(&type);
|
||||
int32_t type = aParentItem->ItemType();
|
||||
nsCOMPtr<nsIPresShell> presShell = parentAsDocShell->GetPresShell();
|
||||
nsRefPtr<nsPresContext> presContext;
|
||||
parentAsDocShell->GetPresContext(getter_AddRefs(presContext));
|
||||
@ -1343,10 +1342,7 @@ nsEventStateManager::GetAccessModifierMaskFor(nsISupports* aDocShell)
|
||||
if (!treeItem)
|
||||
return -1; // invalid modifier
|
||||
|
||||
int32_t itemType;
|
||||
treeItem->GetItemType(&itemType);
|
||||
switch (itemType) {
|
||||
|
||||
switch (treeItem->ItemType()) {
|
||||
case nsIDocShellTreeItem::typeChrome:
|
||||
return Prefs::ChromeAccessModifierMask();
|
||||
|
||||
|
@ -151,8 +151,7 @@ FileHandle::GetFile(ErrorResult& aError)
|
||||
nsRefPtr<FileRequest> request =
|
||||
FileRequest::Create(GetOwner(), lockedFile, false);
|
||||
|
||||
nsRefPtr<MetadataParameters> params = new MetadataParameters();
|
||||
params->Init(true, false);
|
||||
nsRefPtr<MetadataParameters> params = new MetadataParameters(true, false);
|
||||
|
||||
nsRefPtr<GetFileHelper> helper =
|
||||
new GetFileHelper(lockedFile, request, params, this);
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
#include "mozilla/dom/EncodingUtils.h"
|
||||
#include "mozilla/dom/LockedFileBinding.h"
|
||||
|
||||
#define STREAM_COPY_BLOCK_SIZE 32768
|
||||
|
||||
@ -541,19 +542,16 @@ LockedFile::GetMetadata(JS::Handle<JS::Value> aParameters,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsRefPtr<MetadataParameters> params = new MetadataParameters();
|
||||
|
||||
// Get optional arguments.
|
||||
if (!JSVAL_IS_VOID(aParameters) && !JSVAL_IS_NULL(aParameters)) {
|
||||
nsresult rv = params->Init(aCx, aParameters);
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR);
|
||||
DOMFileMetadataParameters config;
|
||||
JS::Rooted<JS::Value> parameters(aCx, aParameters);
|
||||
bool result = config.Init(aCx, parameters);
|
||||
NS_ENSURE_TRUE(result, NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR);
|
||||
|
||||
if (!params->IsConfigured()) {
|
||||
return NS_ERROR_TYPE_ERR;
|
||||
}
|
||||
}
|
||||
else {
|
||||
params->Init(true, true);
|
||||
nsRefPtr<MetadataParameters> params =
|
||||
new MetadataParameters(config.mSize, config.mLastModified);
|
||||
if (!params->IsConfigured()) {
|
||||
return NS_ERROR_TYPE_ERR;
|
||||
}
|
||||
|
||||
nsRefPtr<FileRequest> fileRequest = GenerateFileRequest();
|
||||
|
@ -12,8 +12,6 @@
|
||||
|
||||
#include "nsIFileStreams.h"
|
||||
|
||||
#include "DictionaryHelpers.h"
|
||||
|
||||
#include "AsyncHelper.h"
|
||||
#include "FileHelper.h"
|
||||
|
||||
@ -30,35 +28,28 @@ class MetadataParameters
|
||||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MetadataParameters)
|
||||
|
||||
nsresult
|
||||
Init(JSContext* aCx, JS::Handle<JS::Value> aVal)
|
||||
MetadataParameters(bool aSizeRequested, bool aLastModifiedRequested)
|
||||
: mSizeRequested(aSizeRequested)
|
||||
, mLastModifiedRequested(aLastModifiedRequested)
|
||||
{
|
||||
return mConfig.Init(aCx, aVal.address());
|
||||
}
|
||||
|
||||
void
|
||||
Init(bool aRequestSize, bool aRequestLastModified)
|
||||
{
|
||||
mConfig.size = aRequestSize;
|
||||
mConfig.lastModified = aRequestLastModified;
|
||||
}
|
||||
|
||||
bool
|
||||
IsConfigured() const
|
||||
{
|
||||
return mConfig.size || mConfig.lastModified;
|
||||
return mSizeRequested || mLastModifiedRequested;
|
||||
}
|
||||
|
||||
bool
|
||||
SizeRequested() const
|
||||
{
|
||||
return mConfig.size;
|
||||
return mSizeRequested;
|
||||
}
|
||||
|
||||
bool
|
||||
LastModifiedRequested() const
|
||||
{
|
||||
return mConfig.lastModified;
|
||||
return mLastModifiedRequested;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
@ -74,10 +65,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
mozilla::idl::DOMFileMetadataParameters mConfig;
|
||||
|
||||
uint64_t mSize;
|
||||
int64_t mLastModified;
|
||||
bool mSizeRequested;
|
||||
bool mLastModifiedRequested;
|
||||
};
|
||||
|
||||
class MetadataHelper : public FileHelper
|
||||
|
@ -9,12 +9,6 @@
|
||||
interface nsIDOMEventListener;
|
||||
interface nsIDOMFileHandle;
|
||||
|
||||
dictionary DOMFileMetadataParameters
|
||||
{
|
||||
boolean size;
|
||||
boolean lastModified;
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(a09cdc35-6b1e-42ce-95bb-f8f10a354202)]
|
||||
interface nsIDOMLockedFile : nsISupports
|
||||
{
|
||||
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
'editing',
|
||||
]
|
@ -1,6 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
implementation.js \
|
||||
tests.js \
|
||||
$(NULL)
|
@ -1,7 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_runtest.html \
|
||||
test_event.html \
|
||||
data.js \
|
||||
$(NULL)
|
@ -1,5 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
reset.css \
|
||||
$(NULL)
|
@ -1,5 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
24
dom/imptests/editing/mochitest.ini
Normal file
24
dom/imptests/editing/mochitest.ini
Normal file
@ -0,0 +1,24 @@
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
conformancetest/data.js
|
||||
css/reset.css
|
||||
implementation.js
|
||||
selecttest/common.js
|
||||
selecttest/test-iframe.html
|
||||
tests.js
|
||||
|
||||
[conformancetest/test_event.html]
|
||||
[conformancetest/test_runtest.html]
|
||||
[selecttest/test_Document-open.html]
|
||||
[selecttest/test_addRange.html]
|
||||
[selecttest/test_collapse.html]
|
||||
[selecttest/test_collapseToStartEnd.html]
|
||||
[selecttest/test_deleteFromDocument.html]
|
||||
[selecttest/test_extend.html]
|
||||
[selecttest/test_getRangeAt.html]
|
||||
[selecttest/test_getSelection.html]
|
||||
[selecttest/test_interfaces.html]
|
||||
[selecttest/test_isCollapsed.html]
|
||||
[selecttest/test_removeAllRanges.html]
|
||||
[selecttest/test_selectAllChildren.html]
|
@ -1,8 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
'css',
|
||||
'conformancetest',
|
||||
'selecttest',
|
||||
]
|
@ -1,18 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_addRange.html \
|
||||
test_collapse.html \
|
||||
test_collapseToStartEnd.html \
|
||||
test_deleteFromDocument.html \
|
||||
test_Document-open.html \
|
||||
test_extend.html \
|
||||
test_getRangeAt.html \
|
||||
test_getSelection.html \
|
||||
test_interfaces.html \
|
||||
test_isCollapsed.html \
|
||||
test_removeAllRanges.html \
|
||||
test_selectAllChildren.html \
|
||||
common.js \
|
||||
test-iframe.html \
|
||||
$(NULL)
|
@ -1,5 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,6 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_event.html.json \
|
||||
test_runtest.html.json \
|
||||
$(NULL)
|
@ -0,0 +1,7 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_event.html.json]
|
||||
[test_runtest.html.json]
|
@ -1,12 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_Document-open.html.json \
|
||||
test_addRange.html.json \
|
||||
test_collapse.html.json \
|
||||
test_collapseToStartEnd.html.json \
|
||||
test_extend.html.json \
|
||||
test_getSelection.html.json \
|
||||
test_removeAllRanges.html.json \
|
||||
test_selectAllChildren.html.json \
|
||||
$(NULL)
|
13
dom/imptests/failures/editing/selecttest/mochitest.ini
Normal file
13
dom/imptests/failures/editing/selecttest/mochitest.ini
Normal file
@ -0,0 +1,13 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_Document-open.html.json]
|
||||
[test_addRange.html.json]
|
||||
[test_collapse.html.json]
|
||||
[test_collapseToStartEnd.html.json]
|
||||
[test_extend.html.json]
|
||||
[test_getSelection.html.json]
|
||||
[test_removeAllRanges.html.json]
|
||||
[test_selectAllChildren.html.json]
|
@ -1,6 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_historical.html.json \
|
||||
test_interfaces.html.json \
|
||||
$(NULL)
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_HTMLCollection-empty-name.html.json \
|
||||
$(NULL)
|
6
dom/imptests/failures/html/dom/collections/mochitest.ini
Normal file
6
dom/imptests/failures/html/dom/collections/mochitest.ini
Normal file
@ -0,0 +1,6 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_HTMLCollection-empty-name.html.json]
|
@ -1,4 +1,6 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
DIRS += [
|
||||
]
|
||||
|
||||
[test_exceptions.html.json]
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_DOMTokenList-stringifier.html.json \
|
||||
$(NULL)
|
6
dom/imptests/failures/html/dom/lists/mochitest.ini
Normal file
6
dom/imptests/failures/html/dom/lists/mochitest.ini
Normal file
@ -0,0 +1,6 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_DOMTokenList-stringifier.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
7
dom/imptests/failures/html/dom/mochitest.ini
Normal file
7
dom/imptests/failures/html/dom/mochitest.ini
Normal file
@ -0,0 +1,7 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_historical.html.json]
|
||||
[test_interfaces.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,14 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_Document-createElement-namespace.html.json \
|
||||
test_Document-createElementNS.html.json \
|
||||
test_Document-createEvent.html.json \
|
||||
test_Document-getElementsByTagName.html.json \
|
||||
test_Node-isEqualNode.xhtml.json \
|
||||
test_Node-properties.html.json \
|
||||
test_attributes.html.json \
|
||||
test_case.html.json \
|
||||
test_getElementsByClassName-10.xml.json \
|
||||
test_getElementsByClassName-11.xml.json \
|
||||
$(NULL)
|
15
dom/imptests/failures/html/dom/nodes/mochitest.ini
Normal file
15
dom/imptests/failures/html/dom/nodes/mochitest.ini
Normal file
@ -0,0 +1,15 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_Document-createElement-namespace.html.json]
|
||||
[test_Document-createElementNS.html.json]
|
||||
[test_Document-createEvent.html.json]
|
||||
[test_Document-getElementsByTagName.html.json]
|
||||
[test_Node-isEqualNode.xhtml.json]
|
||||
[test_Node-properties.html.json]
|
||||
[test_attributes.html.json]
|
||||
[test_case.html.json]
|
||||
[test_getElementsByClassName-10.xml.json]
|
||||
[test_getElementsByClassName-11.xml.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,10 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
# Disabled due to bug 859075
|
||||
# test_window-named-properties.html.json \
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_window-indexed-properties-strict.html.json \
|
||||
test_window-properties.html.json \
|
||||
test_window-prototype-chain.html.json \
|
||||
$(NULL)
|
@ -0,0 +1,10 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_window-indexed-properties-strict.html.json]
|
||||
[test_window-named-properties.html.json]
|
||||
skip-if = true # bug 859075
|
||||
[test_window-properties.html.json]
|
||||
[test_window-prototype-chain.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_window-null-names.html.json \
|
||||
$(NULL)
|
@ -1,5 +1,6 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_exceptions.html.json \
|
||||
$(NULL)
|
||||
|
||||
[test_window-null-names.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,14 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_document.images.html.json \
|
||||
test_document.title-03.html.json \
|
||||
test_document.title-04.xhtml.json \
|
||||
test_document.title-06.html.json \
|
||||
test_document.title-07.html.json \
|
||||
test_nameditem-02.html.json \
|
||||
test_nameditem-03.html.json \
|
||||
test_nameditem-04.html.json \
|
||||
test_nameditem-05.html.json \
|
||||
test_nameditem-06.html.json \
|
||||
$(NULL)
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_document.getElementsByName-newelements.html.json \
|
||||
$(NULL)
|
@ -0,0 +1,6 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_document.getElementsByName-newelements.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -0,0 +1,15 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_document.images.html.json]
|
||||
[test_document.title-03.html.json]
|
||||
[test_document.title-04.xhtml.json]
|
||||
[test_document.title-06.html.json]
|
||||
[test_document.title-07.html.json]
|
||||
[test_nameditem-02.html.json]
|
||||
[test_nameditem-03.html.json]
|
||||
[test_nameditem-04.html.json]
|
||||
[test_nameditem-05.html.json]
|
||||
[test_nameditem-06.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_script-IDL-event-htmlfor.html.json \
|
||||
$(NULL)
|
@ -0,0 +1,6 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_script-IDL-event-htmlfor.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_form-elements-nameditem-01.html.json \
|
||||
$(NULL)
|
@ -0,0 +1,6 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_form-elements-nameditem-01.html.json]
|
@ -1,4 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
DIRS += [
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
|
||||
MOCHITEST_FILES := \
|
||||
test_option-text-spaces.html.json \
|
||||
$(NULL)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user