mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Merge latest green fx-team changeset and mozilla-central
This commit is contained in:
commit
521b11af34
2
CLOBBER
2
CLOBBER
@ -17,4 +17,4 @@
|
||||
#
|
||||
# Modifying this file will now automatically clobber the buildbot machines \o/
|
||||
#
|
||||
Bug 704356 needed to clobber for the removal of jspropertycache.cpp
|
||||
Bug 877859 Valgrind header location updates for FxOS Valgrind
|
||||
|
@ -402,7 +402,7 @@ pref("services.push.enabled", true);
|
||||
// This preference should be used in UX to enable/disable push.
|
||||
pref("services.push.connection.enabled", true);
|
||||
// serverURL to be assigned by services team
|
||||
pref("services.push.serverURL", "");
|
||||
pref("services.push.serverURL", "wss://push.services.mozilla.com/");
|
||||
pref("services.push.userAgentID", "");
|
||||
// Exponential back-off start is 5 seconds like in HTTP/1.1.
|
||||
// Maximum back-off is pingInterval.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "fc8faac211332ebdbbea8bf11f3ca2deba541cee",
|
||||
"revision": "c86fcf41322b8bfc7b139cc54a68b178ba071f26",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -712,10 +712,10 @@ function runTest(testNum) {
|
||||
var full_screen_element = subwindow.document.getElementById("test-dom-full-screen");
|
||||
var openDomFullScreen = function() {
|
||||
subwindow.removeEventListener("mozfullscreenchange", openDomFullScreen, false);
|
||||
SpecialPowers.clearUserPref("full-screen-api.allow-trusted-requests-only");
|
||||
openContextMenuFor(dom_full_screen, true); // Invoke context menu for next test.
|
||||
}
|
||||
subwindow.addEventListener("mozfullscreenchange", openDomFullScreen, false);
|
||||
SpecialPowers.setBoolPref("full-screen-api.approval-required", false);
|
||||
SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only", false);
|
||||
full_screen_element.mozRequestFullScreen();
|
||||
break;
|
||||
@ -741,11 +741,11 @@ function runTest(testNum) {
|
||||
var full_screen_element = subwindow.document.getElementById("test-dom-full-screen");
|
||||
var openPagemenu = function() {
|
||||
subwindow.removeEventListener("mozfullscreenchange", openPagemenu, false);
|
||||
SpecialPowers.clearUserPref("full-screen-api.approval-required");
|
||||
SpecialPowers.clearUserPref("full-screen-api.allow-trusted-requests-only");
|
||||
openContextMenuFor(pagemenu, true); // Invoke context menu for next test.
|
||||
}
|
||||
subwindow.addEventListener("mozfullscreenchange", openPagemenu, false);
|
||||
SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only", false);
|
||||
subwindow.document.mozCancelFullScreen();
|
||||
break;
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
||||
</hbox>
|
||||
|
||||
<!-- Tracking -->
|
||||
<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true">
|
||||
<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true" align="start">
|
||||
<caption label="&tracking.label;"/>
|
||||
<radiogroup id="doNotTrackSelection" orient="vertical"
|
||||
preference="privacy.donottrackheader.value"
|
||||
|
@ -82,7 +82,7 @@
|
||||
<script type="application/javascript" src="chrome://browser/content/preferences/privacy.js"/>
|
||||
|
||||
<!-- Tracking -->
|
||||
<groupbox id="trackingGroup">
|
||||
<groupbox id="trackingGroup" align="start">
|
||||
<caption label="&tracking.label;"/>
|
||||
<radiogroup id="doNotTrackSelection" orient="vertical"
|
||||
preference="privacy.donottrackheader.value"
|
||||
|
@ -86,12 +86,12 @@
|
||||
<content orient="horizontal">
|
||||
<xul:vbox id="results-vbox" class="meta-section viewable-height" flex="1">
|
||||
<xul:label class="meta-section-title" value="&autocompleteResultsHeader.label;"/>
|
||||
<richgrid id="results-richgrid" anonid="results" seltype="single" flex="1"/>
|
||||
<richgrid id="results-richgrid" deferlayout="true" anonid="results" seltype="single" flex="1"/>
|
||||
</xul:vbox>
|
||||
|
||||
<xul:vbox id="searches-vbox" class="meta-section viewable-height" flex="1">
|
||||
<xul:label class="meta-section-title" value="&autocompleteSearchesHeader.label;"/>
|
||||
<richgrid id="searches-richgrid" anonid="searches" seltype="single" flex="1"/>
|
||||
<richgrid id="searches-richgrid" deferlayout="true" anonid="searches" seltype="single" flex="1"/>
|
||||
</xul:vbox>
|
||||
</content>
|
||||
|
||||
@ -178,6 +178,10 @@
|
||||
|
||||
this.clearSelection();
|
||||
this.invalidate();
|
||||
|
||||
this._results.arrangeItemsNow();
|
||||
this._searches.arrangeItemsNow();
|
||||
|
||||
this._fire("autocompletestart");
|
||||
]]>
|
||||
</body>
|
||||
@ -411,7 +415,7 @@
|
||||
<parameter name="aGrid"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
return aGrid.itemCount != undefined;
|
||||
return aGrid && aGrid.itemCount != undefined;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -338,53 +338,13 @@
|
||||
<field name="_columnCount">0</field>
|
||||
<property name="columnCount" readonly="true" onget="return this._columnCount;"/>
|
||||
|
||||
<field name="_scheduledArrangeItemsTries">0</field>
|
||||
|
||||
<!-- define a height where we consider an item not yet rendered
|
||||
10 is the height of the empty item (padding/border etc. only) -->
|
||||
<field name="_itemHeightRenderThreshold">10</field>
|
||||
|
||||
<method name="arrangeItems">
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (this.itemCount <= 0) {
|
||||
return;
|
||||
}
|
||||
let item = this.getItemAtIndex(0);
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
let gridItemRect = item.getBoundingClientRect();
|
||||
|
||||
// cap the number of times we reschedule calling arrangeItems
|
||||
let maxRetries = 5;
|
||||
|
||||
// delay as necessary until the item has a proper height
|
||||
if (gridItemRect.height <= this._itemHeightRenderThreshold) {
|
||||
if (this._scheduledArrangeItemsTimerId) {
|
||||
// retry of arrangeItems already scheduled
|
||||
return;
|
||||
}
|
||||
|
||||
// track how many times we've attempted arrangeItems
|
||||
this._scheduledArrangeItemsTries++;
|
||||
|
||||
if (maxRetries > this._scheduledArrangeItemsTries) {
|
||||
// schedule re-try of arrangeItems at the next tick
|
||||
this._scheduledArrangeItemsTimerId = setTimeout(this.arrangeItems.bind(this), 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// items ready to arrange (or retries max exceeded)
|
||||
// reset the flags
|
||||
if (this._scheduledArrangeItemsTimerId) {
|
||||
clearTimeout(this._scheduledArrangeItemsTimerId);
|
||||
delete this._scheduledArrangeItemsTimerId;
|
||||
}
|
||||
if (this._scheduledArrangeItemsTries) {
|
||||
this._scheduledArrangeItemsTries = 0;
|
||||
}
|
||||
<property name="_containerRect">
|
||||
<getter><![CDATA[
|
||||
// return the rect that represents our bounding box
|
||||
|
||||
// Autocomplete is a binding within a binding, so we have to step
|
||||
// up an additional parentNode.
|
||||
@ -394,12 +354,89 @@
|
||||
container = this.parentNode.parentNode.getBoundingClientRect();
|
||||
else
|
||||
container = this.parentNode.getBoundingClientRect();
|
||||
return container;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
// If we don't have valid dimensions we can't arrange yet
|
||||
if (!container.height || !gridItemRect.height) {
|
||||
<property name="_itemRect">
|
||||
<getter><![CDATA[
|
||||
// return the rect that represents an item in the grid
|
||||
|
||||
// TODO: when we remove the need for DOM item measurement, 0 items will not be a problem
|
||||
let item = this.itemCount ? this.getItemAtIndex(0) : null;
|
||||
if (item) {
|
||||
let gridItemRect = item.getBoundingClientRect();
|
||||
if (gridItemRect.height > this._itemHeightRenderThreshold) {
|
||||
return gridItemRect;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<!-- do conditions allow layout/arrange of the grid? -->
|
||||
<property name="_canLayout" readonly="true">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
let gridItemRect = this._itemRect;
|
||||
// If we don't have valid item dimensions we can't arrange yet
|
||||
if (!(gridItemRect && gridItemRect.height)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let container = this._containerRect;
|
||||
// If we don't have valid container dimensions we can't arrange yet
|
||||
if (!(container && container.height)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<field name="_scheduledArrangeItemsTimerId">null</field>
|
||||
<field name="_scheduledArrangeItemsTries">0</field>
|
||||
<field name="_maxArrangeItemsRetries">5</field>
|
||||
<method name="_scheduleArrangeItems">
|
||||
<parameter name="aTime"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
// cap the number of times we reschedule calling arrangeItems
|
||||
if (
|
||||
!this._scheduledArrangeItemsTimerId &&
|
||||
this._maxArrangeItemsRetries > this._scheduledArrangeItemsTries
|
||||
) {
|
||||
this._scheduledArrangeItemsTimerId = setTimeout(this.arrangeItems.bind(this), aTime || 0);
|
||||
// track how many times we've attempted arrangeItems
|
||||
this._scheduledArrangeItemsTries++;
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="arrangeItems">
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (this.hasAttribute("deferlayout")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this._canLayout) {
|
||||
// try again later
|
||||
this._scheduleArrangeItems();
|
||||
return;
|
||||
}
|
||||
|
||||
let gridItemRect = this._itemRect;
|
||||
let container = this._containerRect;
|
||||
|
||||
// reset the flags
|
||||
if (this._scheduledArrangeItemsTimerId) {
|
||||
clearTimeout(this._scheduledArrangeItemsTimerId);
|
||||
delete this._scheduledArrangeItemsTimerId;
|
||||
}
|
||||
this._scheduledArrangeItemsTries = 0;
|
||||
|
||||
// We favor overflowing horizontally, not vertically
|
||||
let maxRowCount = Math.floor(container.height / gridItemRect.height) - 1;
|
||||
|
||||
@ -418,6 +455,21 @@
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="arrangeItemsNow">
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.removeAttribute("deferlayout");
|
||||
// cancel any scheduled arrangeItems and reset flags
|
||||
if (this._scheduledArrangeItemsTimerId) {
|
||||
clearTimeout(this._scheduledArrangeItemsTimerId);
|
||||
delete this._scheduledArrangeItemsTimerId;
|
||||
}
|
||||
this._scheduledArrangeItemsTries = 0;
|
||||
// pass over any params
|
||||
return this.arrangeItems.apply(this, arguments);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<!-- Inteface to suppress selection events -->
|
||||
|
||||
|
@ -8,7 +8,7 @@ toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
|
||||
|
||||
if toolkit == 'cocoa':
|
||||
DIRS += ['osx']
|
||||
elif toolkit in ('gtk2', 'qt'):
|
||||
elif toolkit in ('gtk2', 'gtk3', 'qt'):
|
||||
DIRS += ['linux']
|
||||
else:
|
||||
DIRS += ['windows']
|
||||
|
@ -416,15 +416,20 @@ ifdef MOZ_UPDATE_XTERM
|
||||
UPDATE_TITLE = printf "\033]0;%s in %s\007" $(1) $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2) ;
|
||||
endif
|
||||
|
||||
define SUBMAKE # $(call SUBMAKE,target,directory)
|
||||
# Static directories are largely independent of our build system. But, they
|
||||
# could share the same build mechanism (like moz.build files). We need to
|
||||
# prevent leaking of our backend state to these independent build systems. This
|
||||
# is why MOZBUILD_BACKEND_CHECKED isn't exported to make invocations for static
|
||||
# directories.
|
||||
define SUBMAKE # $(call SUBMAKE,target,directory,static)
|
||||
+@$(UPDATE_TITLE)
|
||||
+$(MAKE) $(if $(2),-C $(2)) $(1)
|
||||
+$(if $(3), MOZBUILD_BACKEND_CHECKED=,) $(MAKE) $(if $(2),-C $(2)) $(1)
|
||||
|
||||
endef # The extra line is important here! don't delete it
|
||||
|
||||
define TIER_DIR_SUBMAKE
|
||||
@echo "BUILDSTATUS TIERDIR_START $(2)"
|
||||
$(call SUBMAKE,$(1),$(2))
|
||||
$(call SUBMAKE,$(1),$(2),$(3))
|
||||
@echo "BUILDSTATUS TIERDIR_FINISH $(2)"
|
||||
|
||||
endef # Ths empty line is important.
|
||||
@ -441,11 +446,6 @@ LOOP_OVER_PARALLEL_DIRS = \
|
||||
$(foreach dir,$(PARALLEL_DIRS),$(call SUBMAKE,$@,$(dir)))
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
LOOP_OVER_STATIC_DIRS = \
|
||||
$(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,$@,$(dir)))
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(TOOL_DIRS)))
|
||||
LOOP_OVER_TOOL_DIRS = \
|
||||
$(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,$@,$(dir)))
|
||||
@ -671,7 +671,7 @@ else
|
||||
|
||||
default all::
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
$(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir)))
|
||||
$(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir),1))
|
||||
endif
|
||||
$(MAKE) export
|
||||
$(MAKE) libs
|
||||
@ -715,7 +715,7 @@ endif
|
||||
@echo "BUILDSTATUS DIRS $$($$@_dirs)"
|
||||
ifneq (,$(tier_$(1)_staticdirs))
|
||||
@echo "BUILDSTATUS SUBTIER_START $(1) static"
|
||||
$$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir)))
|
||||
$$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir),1))
|
||||
@echo "BUILDSTATUS SUBTIER_FINISH $(1) static"
|
||||
endif
|
||||
ifneq (,$(tier_$(1)_dirs))
|
||||
|
@ -204,7 +204,7 @@ if test -n "$gonkdir" ; then
|
||||
|
||||
case "$ANDROID_VERSION" in
|
||||
15)
|
||||
GONK_INCLUDES="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib -I$gonkdir/dalvik/libnativehelper/include/nativehelper -I$gonkdir/external/valgrind"
|
||||
GONK_INCLUDES="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib -I$gonkdir/dalvik/libnativehelper/include/nativehelper"
|
||||
MOZ_B2G_BT=1
|
||||
MOZ_B2G_CAMERA=1
|
||||
MOZ_OMX_DECODER=1
|
||||
@ -218,7 +218,7 @@ if test -n "$gonkdir" ; then
|
||||
AC_MSG_ERROR([Unsupported platform version: $ANDROID_VERSION])
|
||||
;;
|
||||
esac
|
||||
CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/system -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/hardware/libhardware/include $GONK_INCLUDES $CPPFLAGS"
|
||||
CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/system -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/hardware/libhardware/include -I$gonkdir/external/valgrind/fxos-include $GONK_INCLUDES $CPPFLAGS"
|
||||
CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
|
||||
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions -Wno-psabi $CXXFLAGS $STLPORT_CPPFLAGS"
|
||||
dnl Add -llog by default, since we use it all over the place.
|
||||
@ -2275,10 +2275,6 @@ ia64*-hpux*)
|
||||
AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$HAVE_64BIT_OS"; then
|
||||
AC_DEFINE(_WIN64)
|
||||
fi
|
||||
;;
|
||||
|
||||
*-netbsd*)
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "nsCPrefetchService.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsCycleCollector.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsDocShellCID.h"
|
||||
#include "nsDOMCID.h"
|
||||
@ -4269,27 +4270,22 @@ void
|
||||
nsContentUtils::HoldJSObjects(void* aScriptObjectHolder,
|
||||
nsScriptObjectTracer* aTracer)
|
||||
{
|
||||
MOZ_ASSERT(sXPConnect, "Tried to HoldJSObjects when there was no XPConnect");
|
||||
if (sXPConnect) {
|
||||
sXPConnect->AddJSHolder(aScriptObjectHolder, aTracer);
|
||||
}
|
||||
cyclecollector::AddJSHolder(aScriptObjectHolder, aTracer);
|
||||
}
|
||||
|
||||
/* static */
|
||||
void
|
||||
nsContentUtils::DropJSObjects(void* aScriptObjectHolder)
|
||||
{
|
||||
if (sXPConnect) {
|
||||
sXPConnect->RemoveJSHolder(aScriptObjectHolder);
|
||||
}
|
||||
cyclecollector::RemoveJSHolder(aScriptObjectHolder);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/* static */
|
||||
bool
|
||||
nsContentUtils::AreJSObjectsHeld(void* aScriptHolder)
|
||||
nsContentUtils::AreJSObjectsHeld(void* aScriptObjectHolder)
|
||||
{
|
||||
return sXPConnect->TestJSHolder(aScriptHolder);
|
||||
return cyclecollector::TestJSHolder(aScriptObjectHolder);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -197,32 +197,30 @@ nsXULPrototypeCache::PutStyleSheet(nsCSSStyleSheet* aStyleSheet)
|
||||
JSScript*
|
||||
nsXULPrototypeCache::GetScript(nsIURI* aURI)
|
||||
{
|
||||
CacheScriptEntry entry;
|
||||
if (!mScriptTable.Get(aURI, &entry)) {
|
||||
JSScript* script;
|
||||
if (!mScriptTable.Get(aURI, &script)) {
|
||||
return nullptr;
|
||||
}
|
||||
return entry.mScriptObject;
|
||||
return script;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsXULPrototypeCache::PutScript(nsIURI* aURI,
|
||||
JS::Handle<JSScript*> aScriptObject)
|
||||
{
|
||||
CacheScriptEntry existingEntry;
|
||||
if (mScriptTable.Get(aURI, &existingEntry)) {
|
||||
#ifdef DEBUG
|
||||
JSScript* existingScript;
|
||||
if (mScriptTable.Get(aURI, &existingScript)) {
|
||||
nsAutoCString scriptName;
|
||||
aURI->GetSpec(scriptName);
|
||||
nsAutoCString message("Loaded script ");
|
||||
message += scriptName;
|
||||
message += " twice (bug 392650)";
|
||||
NS_WARNING(message.get());
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
CacheScriptEntry entry = {aScriptObject};
|
||||
|
||||
mScriptTable.Put(aURI, entry);
|
||||
mScriptTable.Put(aURI, aScriptObject);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -658,11 +656,10 @@ nsXULPrototypeCache::MarkInCCGeneration(uint32_t aGeneration)
|
||||
}
|
||||
|
||||
static PLDHashOperator
|
||||
MarkScriptsInGC(nsIURI* aKey, CacheScriptEntry& aScriptEntry, void* aClosure)
|
||||
MarkScriptsInGC(nsIURI* aKey, JSScript*& aScript, void* aClosure)
|
||||
{
|
||||
JSTracer* trc = static_cast<JSTracer*>(aClosure);
|
||||
JS_CallScriptTracer(trc, &aScriptEntry.mScriptObject,
|
||||
"nsXULPrototypeCache script");
|
||||
JS_CallScriptTracer(trc, &aScript, "nsXULPrototypeCache script");
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
|
@ -24,11 +24,6 @@
|
||||
|
||||
class nsCSSStyleSheet;
|
||||
|
||||
struct CacheScriptEntry
|
||||
{
|
||||
JSScript* mScriptObject; // the script object.
|
||||
};
|
||||
|
||||
/**
|
||||
* The XUL prototype cache can be used to store and retrieve shared data for
|
||||
* XUL documents, style sheets, XBL, and scripts.
|
||||
@ -130,7 +125,7 @@ protected:
|
||||
|
||||
nsRefPtrHashtable<nsURIHashKey,nsXULPrototypeDocument> mPrototypeTable; // owns the prototypes
|
||||
nsRefPtrHashtable<nsURIHashKey,nsCSSStyleSheet> mStyleSheetTable;
|
||||
nsDataHashtable<nsURIHashKey,CacheScriptEntry> mScriptTable;
|
||||
nsDataHashtable<nsURIHashKey, JSScript*> mScriptTable;
|
||||
nsRefPtrHashtable<nsURIHashKey,nsXBLDocumentInfo> mXBLDocTable;
|
||||
|
||||
nsTHashtable<nsURIHashKey> mCacheURITable;
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
|
||||
void SetIsDOMBinding()
|
||||
{
|
||||
MOZ_ASSERT(!mWrapper && !GetWrapperFlags(),
|
||||
MOZ_ASSERT(!mWrapper && !(GetWrapperFlags() & ~WRAPPER_IS_DOM_BINDING),
|
||||
"This flag should be set before creating any wrappers.");
|
||||
SetWrapperFlags(WRAPPER_IS_DOM_BINDING);
|
||||
}
|
||||
|
@ -1620,6 +1620,7 @@ addExternalIface('Counter')
|
||||
addExternalIface('CSSRule')
|
||||
addExternalIface('DeviceAcceleration', headerFile='nsIDOMDeviceMotionEvent.h', notflattened=True)
|
||||
addExternalIface('DeviceRotationRate', headerFile='nsIDOMDeviceMotionEvent.h', notflattened=True)
|
||||
addExternalIface('mozIDOMApplication', nativeType='mozIDOMApplication', headerFile='nsIDOMApplicationRegistry.h')
|
||||
addExternalIface('CSSRuleList')
|
||||
addExternalIface('DOMStringList')
|
||||
addExternalIface('RTCDataChannel', nativeType='nsIDOMDataChannel')
|
||||
|
@ -837,7 +837,7 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
|
||||
NS_ASSERTION(vgm >= 0 && vgm <= 15, "Received invalid VGM value");
|
||||
mCurrentVgm = vgm;
|
||||
} else if (msg.Find("AT+CHLD=?") != -1) {
|
||||
SendLine("+CHLD: (1,2)");
|
||||
SendLine("+CHLD: (0,1,2)");
|
||||
} else if (msg.Find("AT+CHLD=") != -1) {
|
||||
ParseAtCommand(msg, 8, atCommandValues);
|
||||
|
||||
@ -847,14 +847,16 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
|
||||
}
|
||||
|
||||
/**
|
||||
* The following two cases are supported:
|
||||
* The following three cases are supported:
|
||||
* AT+CHLD=0 - Releases all held calls or sets User Determined User Busy
|
||||
* (UDUB) for a waiting call
|
||||
* AT+CHLD=1 - Releases active calls and accepts the other (held or
|
||||
* waiting) call
|
||||
* AT+CHLD=2 - Places active calls on hold and accepts the other (held
|
||||
* or waiting) call
|
||||
*
|
||||
* The following cases are NOT supported yet:
|
||||
* AT+CHLD=0, AT+CHLD=1<idx>, AT+CHLD=2<idx>, AT+CHLD=3, AT+CHLD=4
|
||||
* AT+CHLD=1<idx>, AT+CHLD=2<idx>, AT+CHLD=3, AT+CHLD=4
|
||||
* Please see 4.33.2 in Bluetooth hands-free profile 1.6 for more
|
||||
* information.
|
||||
*/
|
||||
@ -863,9 +865,14 @@ BluetoothHfpManager::ReceiveSocketData(BluetoothSocket* aSocket,
|
||||
if (atCommandValues[0].Length() > 1) {
|
||||
NS_WARNING("No index should be included in command [AT+CHLD]");
|
||||
valid = false;
|
||||
} else if (chld == '0' || chld == '3' || chld == '4') {
|
||||
} else if (chld == '3' || chld == '4') {
|
||||
NS_WARNING("The value of command [AT+CHLD] is not supported");
|
||||
valid = false;
|
||||
} else if (chld == '0') {
|
||||
// We need to rename these dialer commands for better readability
|
||||
// and expandability.
|
||||
// See bug 884190 for more information.
|
||||
NotifyDialer(NS_LITERAL_STRING("CHLD=0"));
|
||||
} else if (chld == '1') {
|
||||
NotifyDialer(NS_LITERAL_STRING("CHUP+ATA"));
|
||||
} else if (chld == '2') {
|
||||
|
@ -227,42 +227,6 @@ GetPairedDevicesFilter(const BluetoothValue& aValue)
|
||||
return false;
|
||||
}
|
||||
|
||||
class SendDiscoveryTask : public nsRunnable
|
||||
{
|
||||
public:
|
||||
SendDiscoveryTask(const char* aMessageName,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
: mMessageName(aMessageName)
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(aMessageName);
|
||||
MOZ_ASSERT(aRunnable);
|
||||
}
|
||||
|
||||
nsresult Run()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
DBusMessage *reply =
|
||||
dbus_func_args(gThreadConnection->GetConnection(),
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath).get(),
|
||||
DBUS_ADAPTER_IFACE, mMessageName,
|
||||
DBUS_TYPE_INVALID);
|
||||
|
||||
if (reply) {
|
||||
dbus_message_unref(reply);
|
||||
}
|
||||
|
||||
DispatchBluetoothReply(mRunnable, BluetoothValue(true), EmptyString());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
const char* mMessageName;
|
||||
nsRefPtr<BluetoothReplyRunnable> mRunnable;
|
||||
};
|
||||
|
||||
class DistributeBluetoothSignalTask : public nsRunnable
|
||||
{
|
||||
public:
|
||||
@ -418,7 +382,7 @@ ExtractHandles(DBusMessage *aReply, nsTArray<uint32_t>& aOutHandles)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
// static
|
||||
bool
|
||||
BluetoothDBusService::AddServiceRecords(const char* serviceName,
|
||||
unsigned long long uuidMsb,
|
||||
@ -1832,6 +1796,23 @@ BluetoothDBusService::GetDefaultAdapterPathInternal(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
OnSendDiscoveryMessageReply(DBusMessage *aReply, void *aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
nsAutoString errorStr;
|
||||
|
||||
if (!aReply) {
|
||||
errorStr.AssignLiteral("SendDiscovery failed");
|
||||
}
|
||||
|
||||
nsRefPtr<BluetoothReplyRunnable> runnable =
|
||||
dont_AddRef<BluetoothReplyRunnable>(static_cast<BluetoothReplyRunnable*>(aData));
|
||||
|
||||
DispatchBluetoothReply(runnable.get(), BluetoothValue(true), errorStr);
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothDBusService::SendDiscoveryMessage(const char* aMessageName,
|
||||
BluetoothReplyRunnable* aRunnable)
|
||||
@ -1844,11 +1825,17 @@ BluetoothDBusService::SendDiscoveryMessage(const char* aMessageName,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsRefPtr<nsRunnable> task(new SendDiscoveryTask(aMessageName, aRunnable));
|
||||
if (NS_FAILED(mBluetoothCommandThread->Dispatch(task, NS_DISPATCH_NORMAL))) {
|
||||
NS_WARNING("Cannot dispatch firmware loading task!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsRefPtr<BluetoothReplyRunnable> runnable(aRunnable);
|
||||
|
||||
bool success = dbus_func_args_async(mConnection, -1,
|
||||
OnSendDiscoveryMessageReply,
|
||||
static_cast<void*>(aRunnable),
|
||||
NS_ConvertUTF16toUTF8(sAdapterPath).get(),
|
||||
DBUS_ADAPTER_IFACE, aMessageName,
|
||||
DBUS_TYPE_INVALID);
|
||||
NS_ENSURE_TRUE(success, NS_ERROR_FAILURE);
|
||||
|
||||
runnable.forget();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -2662,7 +2649,7 @@ public:
|
||||
mServiceUuid,
|
||||
channel,
|
||||
mManager));
|
||||
NS_DispatchToMainThread(r);
|
||||
NS_DispatchToMainThread(r);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -34,12 +34,6 @@
|
||||
"Event interface: new Event(\"foo\") must have own property \"isTrusted\"": true,
|
||||
"Event interface: new Event(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": true,
|
||||
"CustomEvent interface: existence and properties of interface object": true,
|
||||
"CustomEvent interface constructor": true,
|
||||
"CustomEvent interface: existence and properties of interface prototype object": true,
|
||||
"CustomEvent interface: existence and properties of interface prototype object's \"constructor\" property": true,
|
||||
"CustomEvent interface: attribute detail": true,
|
||||
"Stringification of new CustomEvent(\"foo\")": "debug",
|
||||
"CustomEvent interface: calling initCustomEvent(DOMString,boolean,boolean,any) on new CustomEvent(\"foo\") with too few arguments must throw TypeError": true,
|
||||
"Event interface: new CustomEvent(\"foo\") must have own property \"isTrusted\"": true,
|
||||
"Event interface: new CustomEvent(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": true,
|
||||
"MutationObserver interface: operation observe(Node,MutationObserverInit)": true,
|
||||
|
@ -8,6 +8,5 @@
|
||||
"Should throw TypeError for function \"function () { sessionStorage.getItem(); }\".": true,
|
||||
"Should throw TypeError for function \"function () { sessionStorage.setItem(); }\".": true,
|
||||
"Should throw TypeError for function \"function () { sessionStorage.setItem(\"a\"); }\".": true,
|
||||
"Should throw TypeError for function \"function () { sessionStorage.removeItem(); }\".": true,
|
||||
"Should throw TypeError for function \"function () { new StorageEvent(); }\".": true
|
||||
"Should throw TypeError for function \"function () { sessionStorage.removeItem(); }\".": true
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "nsIDOMEvent.idl"
|
||||
|
||||
/**
|
||||
* The nsIDOMCloseEvent interface is the interface to the event
|
||||
* The CloseEvent interface is the interface to the event
|
||||
* close on a WebSocket object.
|
||||
*
|
||||
* For more information on this interface, please see
|
||||
|
@ -17,5 +17,5 @@ interface nsIDOMDeviceLightEvent : nsIDOMEvent
|
||||
|
||||
dictionary DeviceLightEventInit : EventInit
|
||||
{
|
||||
double value;
|
||||
double value = Infinity;
|
||||
};
|
||||
|
@ -402,7 +402,7 @@ MmsProxyFilter.prototype = {
|
||||
// Fall-through, reutrn the MMS proxy info.
|
||||
if (DEBUG) debug("applyFilter: MMSC is matched: " +
|
||||
JSON.stringify({ url: this.url,
|
||||
roxyInfo: gMmsConnection.proxyInfo }));
|
||||
proxyInfo: gMmsConnection.proxyInfo }));
|
||||
return gMmsConnection.proxyInfo ? gMmsConnection.proxyInfo : proxyInfo;
|
||||
}
|
||||
};
|
||||
@ -460,8 +460,6 @@ XPCOMUtils.defineLazyGetter(this, "gMmsTransactionHelper", function () {
|
||||
xhr.setRequestHeader("Content-Type",
|
||||
"application/vnd.wap.mms-message");
|
||||
xhr.setRequestHeader("Content-Length", istream.available());
|
||||
} else {
|
||||
xhr.setRequestHeader("Content-Length", 0);
|
||||
}
|
||||
|
||||
// UAProf headers.
|
||||
@ -504,7 +502,8 @@ XPCOMUtils.defineLazyGetter(this, "gMmsTransactionHelper", function () {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (DEBUG) debug("xhr done, but status = " + xhr.status);
|
||||
if (DEBUG) debug("xhr done, but status = " + xhr.status +
|
||||
", statusText = " + xhr.statusText);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
|
||||
SpecialPowers.setBoolPref("dom.sms.enabled", true);
|
||||
SpecialPowers.setBoolPref("dom.sms.requestStatusReport", true);
|
||||
SpecialPowers.addPermission("sms", true, document);
|
||||
|
||||
const REMOTE = "5559997777"; // the remote number
|
||||
@ -213,7 +214,9 @@ function deleteMsgs() {
|
||||
function cleanUp() {
|
||||
sms.onreceived = null;
|
||||
SpecialPowers.removePermission("sms", document);
|
||||
SpecialPowers.setBoolPref("dom.sms.enabled", false);
|
||||
SpecialPowers.clearUserPref("dom.sms.enabled", false);
|
||||
SpecialPowers.clearUserPref("dom.sms.requestStatusReport");
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ MARIONETTE_TIMEOUT = 60000;
|
||||
|
||||
SpecialPowers.setBoolPref("dom.sms.enabled", true);
|
||||
SpecialPowers.setBoolPref("dom.sms.strict7BitEncoding", false);
|
||||
SpecialPowers.setBoolPref("dom.sms.requestStatusReport", true);
|
||||
SpecialPowers.addPermission("sms", true, document);
|
||||
|
||||
const SENDER = "15555215554"; // the emulator's number
|
||||
@ -185,6 +186,7 @@ function cleanUp() {
|
||||
SpecialPowers.removePermission("sms", document);
|
||||
SpecialPowers.clearUserPref("dom.sms.enabled");
|
||||
SpecialPowers.clearUserPref("dom.sms.strict7BitEncoding");
|
||||
SpecialPowers.clearUserPref("dom.sms.requestStatusReport");
|
||||
finish();
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
|
||||
SpecialPowers.setBoolPref("dom.sms.enabled", true);
|
||||
SpecialPowers.setBoolPref("dom.sms.requestStatusReport", true);
|
||||
SpecialPowers.addPermission("sms", true, document);
|
||||
|
||||
const SENDER = "15555215554"; // the emulator's number
|
||||
@ -152,7 +153,8 @@ function verifySmsDeleted(smsId) {
|
||||
function cleanUp() {
|
||||
sms.onsent = null;
|
||||
SpecialPowers.removePermission("sms", document);
|
||||
SpecialPowers.setBoolPref("dom.sms.enabled", false);
|
||||
SpecialPowers.clearUserPref("dom.sms.enabled", false);
|
||||
SpecialPowers.clearUserPref("dom.sms.requestStatusReport");
|
||||
finish();
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ interface nsIDOMCFStateChangeEvent : nsIDOMEvent
|
||||
/**
|
||||
* Indicates about errors while setting up the Call forwarding rule.
|
||||
*/
|
||||
readonly attribute bool success;
|
||||
readonly attribute boolean success;
|
||||
|
||||
/**
|
||||
* Indicates what to do with the rule.
|
||||
|
@ -19,6 +19,6 @@ interface nsIDOMUSSDReceivedEvent : nsIDOMEvent
|
||||
|
||||
dictionary USSDReceivedEventInit : EventInit
|
||||
{
|
||||
DOMString message;
|
||||
DOMString? message;
|
||||
boolean sessionEnded;
|
||||
};
|
||||
|
@ -213,10 +213,15 @@ WifiGeoPositionProvider.prototype = {
|
||||
if (accessToken !== "")
|
||||
providerUrl = providerUrl + "&access_token="+accessToken;
|
||||
|
||||
function sort(a, b) {
|
||||
function bySignal(a, b) {
|
||||
return b.signal - a.signal;
|
||||
};
|
||||
|
||||
function noOptOut(ap) {
|
||||
let optOut = (ap.ssid === "" || ap.ssid.endsWith("_nomap"));
|
||||
return !optOut;
|
||||
};
|
||||
|
||||
function encode(ap) {
|
||||
// make sure that the ssid doesn't contain any | chars.
|
||||
ap.ssid = ap.ssid.replace("|", "\\|");
|
||||
@ -225,7 +230,10 @@ WifiGeoPositionProvider.prototype = {
|
||||
};
|
||||
|
||||
if (accessPoints) {
|
||||
providerUrl = providerUrl + accessPoints.sort(sort).map(encode).join("");
|
||||
providerUrl += accessPoints.filter(noOptOut)
|
||||
.sort(bySignal)
|
||||
.map(encode)
|
||||
.join("");
|
||||
}
|
||||
|
||||
providerUrl = encodeURI(providerUrl);
|
||||
|
17
dom/webidl/BlobEvent.webidl
Normal file
17
dom/webidl/BlobEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface Blob;
|
||||
|
||||
[Constructor(DOMString type, optional BlobEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface BlobEvent : Event
|
||||
{
|
||||
readonly attribute Blob? data;
|
||||
};
|
||||
|
||||
dictionary BlobEventInit : EventInit
|
||||
{
|
||||
Blob? data = null;
|
||||
};
|
17
dom/webidl/BluetoothDeviceEvent.webidl
Normal file
17
dom/webidl/BluetoothDeviceEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface BluetoothDevice;
|
||||
|
||||
[Constructor(DOMString type, optional BluetoothDeviceEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface BluetoothDeviceEvent : Event
|
||||
{
|
||||
readonly attribute BluetoothDevice? device;
|
||||
};
|
||||
|
||||
dictionary BluetoothDeviceEventInit : EventInit
|
||||
{
|
||||
BluetoothDevice? device = null;
|
||||
};
|
@ -1,12 +1,26 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
dictionary CFStateChangeEventDict {
|
||||
boolean success = false;
|
||||
short action = -1;
|
||||
short reason = -1;
|
||||
DOMString? number = null;
|
||||
short timeSeconds = -1;
|
||||
short serviceClass = -1;
|
||||
[Constructor(DOMString type, optional CFStateChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface CFStateChangeEvent : Event
|
||||
{
|
||||
readonly attribute boolean success;
|
||||
readonly attribute unsigned short action;
|
||||
readonly attribute unsigned short reason;
|
||||
readonly attribute DOMString? number;
|
||||
readonly attribute unsigned short timeSeconds;
|
||||
readonly attribute unsigned short serviceClass;
|
||||
};
|
||||
|
||||
dictionary CFStateChangeEventInit : EventInit
|
||||
{
|
||||
boolean success = false;
|
||||
unsigned short action = 0;
|
||||
unsigned short reason = 0;
|
||||
DOMString number = "";
|
||||
unsigned short timeSeconds = 0;
|
||||
unsigned short serviceClass = 0;
|
||||
};
|
||||
|
17
dom/webidl/CallEvent.webidl
Normal file
17
dom/webidl/CallEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface TelephonyCall;
|
||||
|
||||
[Constructor(DOMString type, optional CallEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface CallEvent : Event
|
||||
{
|
||||
readonly attribute TelephonyCall? call;
|
||||
};
|
||||
|
||||
dictionary CallEventInit : EventInit
|
||||
{
|
||||
TelephonyCall? call = null;
|
||||
};
|
35
dom/webidl/CloseEvent.webidl
Normal file
35
dom/webidl/CloseEvent.webidl
Normal file
@ -0,0 +1,35 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*
|
||||
* The nsIDOMCloseEvent interface is the interface to the event
|
||||
* close on a WebSocket object.
|
||||
*
|
||||
* For more information on this interface, please see
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#closeevent
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional CloseEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface CloseEvent : Event
|
||||
{
|
||||
readonly attribute boolean wasClean;
|
||||
readonly attribute unsigned short code;
|
||||
readonly attribute DOMString? reason;
|
||||
|
||||
// initCloseEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initCloseEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
boolean wasClean,
|
||||
unsigned short code,
|
||||
DOMString? reason);
|
||||
};
|
||||
|
||||
dictionary CloseEventInit : EventInit
|
||||
{
|
||||
boolean wasClean = false;
|
||||
unsigned short code = 0;
|
||||
DOMString reason = "";
|
||||
};
|
@ -6,15 +6,25 @@
|
||||
* The origin of this IDL file is
|
||||
* http://www.w3.org/TR/2012/WD-dom-20120105/
|
||||
*
|
||||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional CustomEventInit eventInitDict)]
|
||||
interface CustomEvent : Event {
|
||||
[Constructor(DOMString type, optional CustomEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface CustomEvent : Event
|
||||
{
|
||||
[Throws]
|
||||
readonly attribute any detail;
|
||||
|
||||
// initCustomEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initCustomEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
any detail);
|
||||
};
|
||||
|
||||
dictionary CustomEventInit : EventInit {
|
||||
any detail;
|
||||
dictionary CustomEventInit : EventInit
|
||||
{
|
||||
any detail = null;
|
||||
};
|
||||
|
23
dom/webidl/DOMTransactionEvent.webidl
Normal file
23
dom/webidl/DOMTransactionEvent.webidl
Normal file
@ -0,0 +1,23 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional DOMTransactionEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface DOMTransactionEvent : Event
|
||||
{
|
||||
[Throws]
|
||||
readonly attribute any transactions;
|
||||
|
||||
[Throws]
|
||||
void initDOMTransactionEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
any transactions);
|
||||
};
|
||||
|
||||
dictionary DOMTransactionEventInit : EventInit
|
||||
{
|
||||
any transactions = null;
|
||||
};
|
16
dom/webidl/DataErrorEvent.webidl
Normal file
16
dom/webidl/DataErrorEvent.webidl
Normal file
@ -0,0 +1,16 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional DataErrorEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface DataErrorEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? message;
|
||||
};
|
||||
|
||||
dictionary DataErrorEventInit : EventInit
|
||||
{
|
||||
DOMString message = "";
|
||||
};
|
16
dom/webidl/DeviceLightEvent.webidl
Normal file
16
dom/webidl/DeviceLightEvent.webidl
Normal file
@ -0,0 +1,16 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional DeviceLightEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface DeviceLightEvent : Event
|
||||
{
|
||||
readonly attribute double value;
|
||||
};
|
||||
|
||||
dictionary DeviceLightEventInit : EventInit
|
||||
{
|
||||
unrestricted double value = Infinity;
|
||||
};
|
32
dom/webidl/DeviceOrientationEvent.webidl
Normal file
32
dom/webidl/DeviceOrientationEvent.webidl
Normal file
@ -0,0 +1,32 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional DeviceOrientationEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface DeviceOrientationEvent : Event
|
||||
{
|
||||
readonly attribute double alpha;
|
||||
readonly attribute double beta;
|
||||
readonly attribute double gamma;
|
||||
readonly attribute boolean absolute;
|
||||
|
||||
// initDeviceOrientationEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initDeviceOrientationEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
double alpha,
|
||||
double beta,
|
||||
double gamma,
|
||||
boolean absolute);
|
||||
};
|
||||
|
||||
dictionary DeviceOrientationEventInit : EventInit
|
||||
{
|
||||
double alpha = 0;
|
||||
double beta = 0;
|
||||
double gamma = 0;
|
||||
boolean absolute = false;
|
||||
};
|
20
dom/webidl/DeviceProximityEvent.webidl
Normal file
20
dom/webidl/DeviceProximityEvent.webidl
Normal file
@ -0,0 +1,20 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional DeviceProximityEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface DeviceProximityEvent : Event
|
||||
{
|
||||
readonly attribute double value;
|
||||
readonly attribute double min;
|
||||
readonly attribute double max;
|
||||
};
|
||||
|
||||
dictionary DeviceProximityEventInit : EventInit
|
||||
{
|
||||
unrestricted double value = Infinity;
|
||||
unrestricted double min = -Infinity;
|
||||
unrestricted double max = Infinity;
|
||||
};
|
18
dom/webidl/DeviceStorageChangeEvent.webidl
Normal file
18
dom/webidl/DeviceStorageChangeEvent.webidl
Normal file
@ -0,0 +1,18 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional DeviceStorageChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface DeviceStorageChangeEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? path;
|
||||
readonly attribute DOMString? reason;
|
||||
};
|
||||
|
||||
dictionary DeviceStorageChangeEventInit : EventInit
|
||||
{
|
||||
DOMString path = "";
|
||||
DOMString reason = "";
|
||||
};
|
@ -10,8 +10,6 @@
|
||||
interface DummyInterface {
|
||||
readonly attribute OnErrorEventHandlerNonNull onErrorEventHandler;
|
||||
FilePropertyBag fileBag();
|
||||
CFStateChangeEventDict cfstateChangeEvent();
|
||||
USSDReceivedEventDict ussdReceivedEvent();
|
||||
InspectorRGBTriple rgbTriple();
|
||||
Function getFunction();
|
||||
void funcSocketsDict(optional SocketsDict arg);
|
||||
|
23
dom/webidl/ElementReplaceEvent.webidl
Normal file
23
dom/webidl/ElementReplaceEvent.webidl
Normal file
@ -0,0 +1,23 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional ElementReplaceEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface ElementReplaceEvent : Event
|
||||
{
|
||||
readonly attribute Element? upgrade;
|
||||
|
||||
// initElementReplaceEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initElementReplaceEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Element? upgrade);
|
||||
};
|
||||
|
||||
dictionary ElementReplaceEventInit : EventInit
|
||||
{
|
||||
Element? upgrade = null;
|
||||
};
|
18
dom/webidl/GamepadAxisMoveEvent.webidl
Normal file
18
dom/webidl/GamepadAxisMoveEvent.webidl
Normal file
@ -0,0 +1,18 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional GamepadAxisMoveEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface GamepadAxisMoveEvent : GamepadEvent
|
||||
{
|
||||
readonly attribute unsigned long axis;
|
||||
readonly attribute double value;
|
||||
};
|
||||
|
||||
dictionary GamepadAxisMoveEventInit : GamepadEventInit
|
||||
{
|
||||
unsigned long axis = 0;
|
||||
double value = 0;
|
||||
};
|
16
dom/webidl/GamepadButtonEvent.webidl
Normal file
16
dom/webidl/GamepadButtonEvent.webidl
Normal file
@ -0,0 +1,16 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional GamepadButtonEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface GamepadButtonEvent : GamepadEvent
|
||||
{
|
||||
readonly attribute unsigned long button;
|
||||
};
|
||||
|
||||
dictionary GamepadButtonEventInit : GamepadEventInit
|
||||
{
|
||||
unsigned long button = 0;
|
||||
};
|
16
dom/webidl/GamepadEvent.webidl
Normal file
16
dom/webidl/GamepadEvent.webidl
Normal file
@ -0,0 +1,16 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional GamepadEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface GamepadEvent : Event
|
||||
{
|
||||
readonly attribute Gamepad? gamepad;
|
||||
};
|
||||
|
||||
dictionary GamepadEventInit : EventInit
|
||||
{
|
||||
Gamepad? gamepad = null;
|
||||
};
|
26
dom/webidl/HashChangeEvent.webidl
Normal file
26
dom/webidl/HashChangeEvent.webidl
Normal file
@ -0,0 +1,26 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface HashChangeEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? oldURL;
|
||||
readonly attribute DOMString? newURL;
|
||||
|
||||
// initHashChangeEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initHashChangeEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
DOMString? oldURL,
|
||||
DOMString? newURL);
|
||||
};
|
||||
|
||||
dictionary HashChangeEventInit : EventInit
|
||||
{
|
||||
DOMString oldURL = "";
|
||||
DOMString newURL = "";
|
||||
};
|
18
dom/webidl/IccCardLockErrorEvent.webidl
Normal file
18
dom/webidl/IccCardLockErrorEvent.webidl
Normal file
@ -0,0 +1,18 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional IccCardLockErrorEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface IccCardLockErrorEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? lockType;
|
||||
readonly attribute long retryCount;
|
||||
};
|
||||
|
||||
dictionary IccCardLockErrorEventInit : EventInit
|
||||
{
|
||||
DOMString lockType = "";
|
||||
long retryCount = 0;
|
||||
};
|
17
dom/webidl/MozApplicationEvent.webidl
Normal file
17
dom/webidl/MozApplicationEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface mozIDOMApplication;
|
||||
|
||||
[Constructor(DOMString type, optional MozApplicationEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozApplicationEvent : Event
|
||||
{
|
||||
readonly attribute mozIDOMApplication? application;
|
||||
};
|
||||
|
||||
dictionary MozApplicationEventInit : EventInit
|
||||
{
|
||||
mozIDOMApplication? application = null;
|
||||
};
|
17
dom/webidl/MozCellBroadcastEvent.webidl
Normal file
17
dom/webidl/MozCellBroadcastEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface MozCellBroadcastMessage;
|
||||
|
||||
[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozCellBroadcastEvent : Event
|
||||
{
|
||||
readonly attribute MozCellBroadcastMessage? message;
|
||||
};
|
||||
|
||||
dictionary MozCellBroadcastEventInit : EventInit
|
||||
{
|
||||
MozCellBroadcastMessage? message = null;
|
||||
};
|
18
dom/webidl/MozContactChangeEvent.webidl
Normal file
18
dom/webidl/MozContactChangeEvent.webidl
Normal file
@ -0,0 +1,18 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozContactChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozContactChangeEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? contactID;
|
||||
readonly attribute DOMString? reason;
|
||||
};
|
||||
|
||||
dictionary MozContactChangeEventInit : EventInit
|
||||
{
|
||||
DOMString contactID = "";
|
||||
DOMString reason = "";
|
||||
};
|
17
dom/webidl/MozMmsEvent.webidl
Normal file
17
dom/webidl/MozMmsEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface MozMmsMessage;
|
||||
|
||||
[Constructor(DOMString type, optional MozMmsEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozMmsEvent : Event
|
||||
{
|
||||
readonly attribute MozMmsMessage? message;
|
||||
};
|
||||
|
||||
dictionary MozMmsEventInit : EventInit
|
||||
{
|
||||
MozMmsMessage? message = null;
|
||||
};
|
19
dom/webidl/MozSettingsEvent.webidl
Normal file
19
dom/webidl/MozSettingsEvent.webidl
Normal file
@ -0,0 +1,19 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozSettingsEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozSettingsEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? settingName;
|
||||
[Throws]
|
||||
readonly attribute any settingValue;
|
||||
};
|
||||
|
||||
dictionary MozSettingsEventInit : EventInit
|
||||
{
|
||||
DOMString settingName = "";
|
||||
any settingValue = null;
|
||||
};
|
17
dom/webidl/MozSmsEvent.webidl
Normal file
17
dom/webidl/MozSmsEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface MozSmsMessage;
|
||||
|
||||
[Constructor(DOMString type, optional MozSmsEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozSmsEvent : Event
|
||||
{
|
||||
readonly attribute MozSmsMessage? message;
|
||||
};
|
||||
|
||||
dictionary MozSmsEventInit : EventInit
|
||||
{
|
||||
MozSmsMessage? message = null;
|
||||
};
|
17
dom/webidl/MozVoicemailEvent.webidl
Normal file
17
dom/webidl/MozVoicemailEvent.webidl
Normal file
@ -0,0 +1,17 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface MozVoicemailStatus;
|
||||
|
||||
[Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozVoicemailEvent : Event
|
||||
{
|
||||
readonly attribute MozVoicemailStatus? status;
|
||||
};
|
||||
|
||||
dictionary MozVoicemailEventInit : EventInit
|
||||
{
|
||||
MozVoicemailStatus? status = null;
|
||||
};
|
25
dom/webidl/MozWifiConnectionInfoEvent.webidl
Normal file
25
dom/webidl/MozWifiConnectionInfoEvent.webidl
Normal file
@ -0,0 +1,25 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozWifiConnectionInfoEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozWifiConnectionInfoEvent : Event
|
||||
{
|
||||
[Throws]
|
||||
readonly attribute any network;
|
||||
readonly attribute short signalStrength;
|
||||
readonly attribute short relSignalStrength;
|
||||
readonly attribute long linkSpeed;
|
||||
readonly attribute DOMString? ipAddress;
|
||||
};
|
||||
|
||||
dictionary MozWifiConnectionInfoEventInit : EventInit
|
||||
{
|
||||
any network = null;
|
||||
short signalStrength = 0;
|
||||
short relSignalStrength = 0;
|
||||
long linkSpeed = 0;
|
||||
DOMString ipAddress = "";
|
||||
};
|
19
dom/webidl/MozWifiStatusChangeEvent.webidl
Normal file
19
dom/webidl/MozWifiStatusChangeEvent.webidl
Normal file
@ -0,0 +1,19 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional MozWifiStatusChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface MozWifiStatusChangeEvent : Event
|
||||
{
|
||||
[Throws]
|
||||
readonly attribute any network;
|
||||
readonly attribute DOMString? status;
|
||||
};
|
||||
|
||||
dictionary MozWifiStatusChangeEventInit : EventInit
|
||||
{
|
||||
any network = null;
|
||||
DOMString status = "";
|
||||
};
|
23
dom/webidl/PageTransitionEvent.webidl
Normal file
23
dom/webidl/PageTransitionEvent.webidl
Normal file
@ -0,0 +1,23 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface PageTransitionEvent : Event
|
||||
{
|
||||
readonly attribute boolean persisted;
|
||||
|
||||
// initPageTransitionEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initPageTransitionEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
boolean persisted);
|
||||
};
|
||||
|
||||
dictionary PageTransitionEventInit : EventInit
|
||||
{
|
||||
boolean persisted = false;
|
||||
};
|
24
dom/webidl/PopStateEvent.webidl
Normal file
24
dom/webidl/PopStateEvent.webidl
Normal file
@ -0,0 +1,24 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional PopStateEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface PopStateEvent : Event
|
||||
{
|
||||
[Throws]
|
||||
readonly attribute any state;
|
||||
|
||||
// initPopStateEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initPopStateEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
any state);
|
||||
};
|
||||
|
||||
dictionary PopStateEventInit : EventInit
|
||||
{
|
||||
any state = null;
|
||||
};
|
33
dom/webidl/PopupBlockedEvent.webidl
Normal file
33
dom/webidl/PopupBlockedEvent.webidl
Normal file
@ -0,0 +1,33 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface Window;
|
||||
interface URI;
|
||||
|
||||
[Constructor(DOMString type, optional PopupBlockedEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface PopupBlockedEvent : Event
|
||||
{
|
||||
readonly attribute Window? requestingWindow;
|
||||
readonly attribute URI? popupWindowURI;
|
||||
readonly attribute DOMString? popupWindowName;
|
||||
readonly attribute DOMString? popupWindowFeatures;
|
||||
|
||||
[Throws]
|
||||
void initPopupBlockedEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
Window? requestingWindow,
|
||||
URI? popupWindowURI,
|
||||
DOMString? popupWindowName,
|
||||
DOMString? popupWindowFeatures);
|
||||
};
|
||||
|
||||
dictionary PopupBlockedEventInit : EventInit
|
||||
{
|
||||
Window? requestingWindow = null;
|
||||
URI? popupWindowURI = null;
|
||||
DOMString popupWindowName = "";
|
||||
DOMString popupWindowFeatures = "";
|
||||
};
|
20
dom/webidl/ProgressEvent.webidl
Normal file
20
dom/webidl/ProgressEvent.webidl
Normal file
@ -0,0 +1,20 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional ProgressEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface ProgressEvent : Event
|
||||
{
|
||||
readonly attribute boolean lengthComputable;
|
||||
readonly attribute unsigned long long loaded;
|
||||
readonly attribute unsigned long long total;
|
||||
};
|
||||
|
||||
dictionary ProgressEventInit : EventInit
|
||||
{
|
||||
boolean lengthComputable = false;
|
||||
unsigned long long loaded = 0;
|
||||
unsigned long long total = 0;
|
||||
};
|
16
dom/webidl/SmartCardEvent.webidl
Normal file
16
dom/webidl/SmartCardEvent.webidl
Normal file
@ -0,0 +1,16 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional SmartCardEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface SmartCardEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? tokenName;
|
||||
};
|
||||
|
||||
dictionary SmartCardEventInit : EventInit
|
||||
{
|
||||
DOMString tokenName = "";
|
||||
};
|
27
dom/webidl/SpeechRecognitionError.webidl
Normal file
27
dom/webidl/SpeechRecognitionError.webidl
Normal file
@ -0,0 +1,27 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional SpeechRecognitionErrorInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface SpeechRecognitionError : Event
|
||||
{
|
||||
const unsigned long NO_SPEECH = 0;
|
||||
const unsigned long ABORTED = 1;
|
||||
const unsigned long AUDIO_CAPTURE = 2;
|
||||
const unsigned long NETWORK = 3;
|
||||
const unsigned long NOT_ALLOWED = 4;
|
||||
const unsigned long SERVICE_NOT_ALLOWED = 5;
|
||||
const unsigned long BAD_GRAMMAR = 6;
|
||||
const unsigned long LANGUAGE_NOT_SUPPORTED = 7;
|
||||
|
||||
readonly attribute unsigned long error;
|
||||
readonly attribute DOMString? message;
|
||||
};
|
||||
|
||||
dictionary SpeechRecognitionErrorInit : EventInit
|
||||
{
|
||||
unsigned long error = 0;
|
||||
DOMString message = "";
|
||||
};
|
23
dom/webidl/SpeechRecognitionEvent.webidl
Normal file
23
dom/webidl/SpeechRecognitionEvent.webidl
Normal file
@ -0,0 +1,23 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface nsISupports;
|
||||
|
||||
[Constructor(DOMString type, optional SpeechRecognitionEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface SpeechRecognitionEvent : Event
|
||||
{
|
||||
readonly attribute unsigned long resultIndex;
|
||||
readonly attribute nsISupports? results;
|
||||
readonly attribute DOMString? interpretation;
|
||||
readonly attribute Document? emma;
|
||||
};
|
||||
|
||||
dictionary SpeechRecognitionEventInit : EventInit
|
||||
{
|
||||
unsigned long resultIndex = 0;
|
||||
nsISupports? results = null;
|
||||
DOMString interpretation = "";
|
||||
Document? emma = null;
|
||||
};
|
@ -9,10 +9,18 @@
|
||||
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
interface Event;
|
||||
|
||||
interface SpeechSynthesisEvent : Event {
|
||||
[Constructor(DOMString type, optional SpeechSynthesisEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface SpeechSynthesisEvent : Event
|
||||
{
|
||||
readonly attribute unsigned long charIndex;
|
||||
readonly attribute float elapsedTime;
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute DOMString? name;
|
||||
};
|
||||
|
||||
dictionary SpeechSynthesisEventInit : EventInit
|
||||
{
|
||||
unsigned long charIndex = 0;
|
||||
float elapsedTime = 0;
|
||||
DOMString name = "";
|
||||
};
|
||||
|
42
dom/webidl/StorageEvent.webidl
Normal file
42
dom/webidl/StorageEvent.webidl
Normal file
@ -0,0 +1,42 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*
|
||||
* Interface for a client side storage. See
|
||||
* http://dev.w3.org/html5/webstorage/#the-storage-event
|
||||
* for more information.
|
||||
*
|
||||
* Event sent to a window when a storage area changes.
|
||||
*/
|
||||
interface Storage;
|
||||
|
||||
[Constructor(DOMString type, optional StorageEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface StorageEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? key;
|
||||
readonly attribute DOMString? oldValue;
|
||||
readonly attribute DOMString? newValue;
|
||||
readonly attribute DOMString? url;
|
||||
readonly attribute Storage? storageArea;
|
||||
|
||||
// initStorageEvent is a Gecko specific deprecated method.
|
||||
[Throws]
|
||||
void initStorageEvent(DOMString type,
|
||||
boolean canBubble,
|
||||
boolean cancelable,
|
||||
DOMString? key,
|
||||
DOMString? oldValue,
|
||||
DOMString? newValue,
|
||||
DOMString? url,
|
||||
Storage? storageArea);
|
||||
};
|
||||
|
||||
dictionary StorageEventInit : EventInit
|
||||
{
|
||||
DOMString? key = null;
|
||||
DOMString? oldValue = null;
|
||||
DOMString? newValue = null;
|
||||
DOMString url = "";
|
||||
Storage? storageArea = null;
|
||||
};
|
19
dom/webidl/StyleRuleChangeEvent.webidl
Normal file
19
dom/webidl/StyleRuleChangeEvent.webidl
Normal file
@ -0,0 +1,19 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
interface CSSRule;
|
||||
|
||||
[Constructor(DOMString type, optional StyleRuleChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface StyleRuleChangeEvent : Event
|
||||
{
|
||||
readonly attribute CSSStyleSheet? stylesheet;
|
||||
readonly attribute CSSRule? rule;
|
||||
};
|
||||
|
||||
dictionary StyleRuleChangeEventInit : EventInit
|
||||
{
|
||||
CSSStyleSheet? stylesheet = null;
|
||||
CSSRule? rule = null;
|
||||
};
|
18
dom/webidl/StyleSheetApplicableStateChangeEvent.webidl
Normal file
18
dom/webidl/StyleSheetApplicableStateChangeEvent.webidl
Normal file
@ -0,0 +1,18 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional StyleSheetApplicableStateChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface StyleSheetApplicableStateChangeEvent : Event
|
||||
{
|
||||
readonly attribute CSSStyleSheet? stylesheet;
|
||||
readonly attribute boolean applicable;
|
||||
};
|
||||
|
||||
dictionary StyleSheetApplicableStateChangeEventInit : EventInit
|
||||
{
|
||||
CSSStyleSheet? stylesheet = null;
|
||||
boolean applicable = false;
|
||||
};
|
18
dom/webidl/StyleSheetChangeEvent.webidl
Normal file
18
dom/webidl/StyleSheetChangeEvent.webidl
Normal file
@ -0,0 +1,18 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional StyleSheetChangeEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface StyleSheetChangeEvent : Event
|
||||
{
|
||||
readonly attribute CSSStyleSheet? stylesheet;
|
||||
readonly attribute boolean documentSheet;
|
||||
};
|
||||
|
||||
dictionary StyleSheetChangeEventInit : EventInit
|
||||
{
|
||||
CSSStyleSheet? stylesheet = null;
|
||||
boolean documentSheet = false;
|
||||
};
|
@ -4,7 +4,15 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
dictionary USSDReceivedEventDict {
|
||||
[Constructor(DOMString type, optional USSDReceivedEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface USSDReceivedEvent : Event
|
||||
{
|
||||
readonly attribute DOMString? message;
|
||||
readonly attribute boolean sessionEnded;
|
||||
};
|
||||
|
||||
dictionary USSDReceivedEventInit : EventInit
|
||||
{
|
||||
DOMString? message = null;
|
||||
boolean sessionEnded = false;
|
||||
};
|
||||
};
|
||||
|
16
dom/webidl/UserProximityEvent.webidl
Normal file
16
dom/webidl/UserProximityEvent.webidl
Normal file
@ -0,0 +1,16 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*/
|
||||
|
||||
[Constructor(DOMString type, optional UserProximityEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
|
||||
interface UserProximityEvent : Event
|
||||
{
|
||||
readonly attribute boolean near;
|
||||
};
|
||||
|
||||
dictionary UserProximityEventInit : EventInit
|
||||
{
|
||||
boolean near = false;
|
||||
};
|
@ -32,7 +32,6 @@ webidl_files = \
|
||||
CanvasRenderingContext2D.webidl \
|
||||
CaretPosition.webidl \
|
||||
CDATASection.webidl \
|
||||
CFStateChangeEvent.webidl \
|
||||
ChannelMergerNode.webidl \
|
||||
ChannelSplitterNode.webidl \
|
||||
CharacterData.webidl \
|
||||
@ -344,7 +343,6 @@ webidl_files = \
|
||||
WheelEvent.webidl \
|
||||
UndoManager.webidl \
|
||||
URLUtils.webidl \
|
||||
USSDReceivedEvent.webidl \
|
||||
VideoStreamTrack.webidl \
|
||||
WaveShaperNode.webidl \
|
||||
WaveTable.webidl \
|
||||
@ -391,6 +389,7 @@ webidl_files += \
|
||||
SpeechSynthesisUtterance.webidl \
|
||||
SpeechSynthesisVoice.webidl \
|
||||
SpeechSynthesis.webidl \
|
||||
SpeechSynthesisEvent.webidl \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
@ -406,6 +405,69 @@ webidl_files += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
webidl_files += \
|
||||
ProgressEvent.webidl \
|
||||
StorageEvent.webidl \
|
||||
DeviceProximityEvent.webidl \
|
||||
MozSettingsEvent.webidl \
|
||||
UserProximityEvent.webidl \
|
||||
CustomEvent.webidl \
|
||||
PageTransitionEvent.webidl \
|
||||
DOMTransactionEvent.webidl \
|
||||
PopStateEvent.webidl \
|
||||
HashChangeEvent.webidl \
|
||||
CloseEvent.webidl \
|
||||
MozContactChangeEvent.webidl \
|
||||
DeviceOrientationEvent.webidl \
|
||||
DeviceLightEvent.webidl \
|
||||
MozApplicationEvent.webidl \
|
||||
SmartCardEvent.webidl \
|
||||
StyleRuleChangeEvent.webidl \
|
||||
StyleSheetChangeEvent.webidl \
|
||||
StyleSheetApplicableStateChangeEvent.webidl \
|
||||
ElementReplaceEvent.webidl \
|
||||
MozSmsEvent.webidl \
|
||||
MozMmsEvent.webidl \
|
||||
DeviceStorageChangeEvent.webidl \
|
||||
PopupBlockedEvent.webidl \
|
||||
BlobEvent.webidl \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_B2G_BT
|
||||
webidl_files += \
|
||||
BluetoothDeviceEvent.webidl \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_B2G_RIL
|
||||
webidl_files += \
|
||||
CallEvent.webidl \
|
||||
CFStateChangeEvent.webidl \
|
||||
DataErrorEvent.webidl \
|
||||
IccCardLockErrorEvent.webidl \
|
||||
MozWifiStatusChangeEvent.webidl \
|
||||
MozWifiConnectionInfoEvent.webidl \
|
||||
MozCellBroadcastEvent.webidl \
|
||||
MozVoicemailEvent.webidl \
|
||||
USSDReceivedEvent.webidl \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_GAMEPAD
|
||||
webidl_files += \
|
||||
GamepadEvent.webidl \
|
||||
GamepadButtonEvent.webidl \
|
||||
GamepadAxisMoveEvent.webidl \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_WEBSPEECH
|
||||
webidl_files += \
|
||||
SpeechRecognitionEvent.webidl \
|
||||
SpeechRecognitionError.webidl \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
test_webidl_files := \
|
||||
TestCodeGen.webidl \
|
||||
|
15
gfx/2d/2D.h
15
gfx/2d/2D.h
@ -706,6 +706,21 @@ public:
|
||||
const Pattern &aMask,
|
||||
const DrawOptions &aOptions = DrawOptions()) = 0;
|
||||
|
||||
/*
|
||||
* This takes a source pattern and a mask, and composites the source pattern
|
||||
* onto the destination surface using the alpha channel of the mask source.
|
||||
* The operation is bound by the extents of the mask.
|
||||
*
|
||||
* aSource Source pattern
|
||||
* aMask Mask surface
|
||||
* aOffset a transformed offset that the surface is masked at
|
||||
* aOptions Drawing options
|
||||
*/
|
||||
virtual void MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aOptions = DrawOptions()) { MOZ_ASSERT(0); };
|
||||
|
||||
/*
|
||||
* Push a clip to the DrawTarget.
|
||||
*
|
||||
|
@ -300,6 +300,38 @@ DrawTargetCG::DrawSurface(SourceSurface *aSurface,
|
||||
CGImageRelease(subimage);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetCG::MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aDrawOptions)
|
||||
{
|
||||
MarkChanged();
|
||||
|
||||
CGImageRef image;
|
||||
CGContextSaveGState(mCg);
|
||||
|
||||
CGContextSetBlendMode(mCg, ToBlendMode(aDrawOptions.mCompositionOp));
|
||||
UnboundnessFixer fixer;
|
||||
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
|
||||
CGContextSetAlpha(cg, aDrawOptions.mAlpha);
|
||||
|
||||
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
|
||||
image = GetImageFromSourceSurface(aMask);
|
||||
|
||||
CGContextScaleCTM(cg, 1, -1);
|
||||
|
||||
IntSize size = aMask->GetSize();
|
||||
CGContextClipToMask(cg, CGRectMake(aOffset.x, aOffset.y, size.width, size.height), image);
|
||||
|
||||
FillRect(Rect(0, 0, size.width, size.height), aSource, aDrawOptions);
|
||||
|
||||
fixer.Fix(mCg);
|
||||
|
||||
CGContextRestoreGState(mCg);
|
||||
|
||||
}
|
||||
|
||||
static CGColorRef ColorToCGColor(CGColorSpaceRef aColorSpace, const Color& aColor)
|
||||
{
|
||||
CGFloat components[4] = {aColor.r, aColor.g, aColor.b, aColor.a};
|
||||
|
@ -96,6 +96,10 @@ public:
|
||||
const Rect &aSource,
|
||||
const DrawSurfaceOptions &aSurfOptions = DrawSurfaceOptions(),
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
virtual void MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
|
||||
virtual void FillRect(const Rect &aRect,
|
||||
const Pattern &aPattern,
|
||||
|
@ -676,6 +676,55 @@ DrawTargetCairo::Mask(const Pattern &aSource,
|
||||
cairo_pattern_destroy(mask);
|
||||
cairo_pattern_destroy(source);
|
||||
}
|
||||
#if 0
|
||||
DrawTargetCairo::MaskSurface(SourceSurface *aSurface,
|
||||
const Rect &aDest,
|
||||
const Rect &aSource,
|
||||
const DrawSurfaceOptions &aSurfOptions,
|
||||
const DrawOptions &aOptions)
|
||||
{
|
||||
AutoPrepareForDrawing prep(this, mContext);
|
||||
|
||||
float sx = aSource.Width() / aDest.Width();
|
||||
float sy = aSource.Height() / aDest.Height();
|
||||
|
||||
cairo_matrix_t src_mat;
|
||||
cairo_matrix_init_translate(&src_mat, aSource.X(), aSource.Y());
|
||||
cairo_matrix_scale(&src_mat, sx, sy);
|
||||
|
||||
cairo_surface_t* surf = GetCairoSurfaceForSourceSurface(aSurface);
|
||||
cairo_pattern_t* pat = cairo_pattern_create_for_surface(surf);
|
||||
cairo_surface_destroy(surf);
|
||||
|
||||
cairo_pattern_set_matrix(pat, &src_mat);
|
||||
cairo_pattern_set_filter(pat, GfxFilterToCairoFilter(aSurfOptions.mFilter));
|
||||
cairo_pattern_set_extend(pat, CAIRO_EXTEND_PAD);
|
||||
|
||||
cairo_translate(mContext, aDest.X(), aDest.Y());
|
||||
|
||||
if (IsOperatorBoundByMask(aOptions.mCompositionOp)) {
|
||||
cairo_new_path(mContext);
|
||||
cairo_rectangle(mContext, 0, 0, aDest.Width(), aDest.Height());
|
||||
cairo_clip(mContext);
|
||||
cairo_set_source(mContext, pat);
|
||||
} else {
|
||||
cairo_push_group(mContext);
|
||||
cairo_new_path(mContext);
|
||||
cairo_rectangle(mContext, 0, 0, aDest.Width(), aDest.Height());
|
||||
cairo_set_source(mContext, pat);
|
||||
cairo_fill(mContext);
|
||||
cairo_pop_group_to_source(mContext);
|
||||
}
|
||||
|
||||
cairo_set_operator(mContext, GfxOpToCairoOp(aOptions.mCompositionOp));
|
||||
DrawPattern(aPattern, StrokeOptions(), aOptions, DRAW_FILL);
|
||||
|
||||
cairo_paint_with_alpha(mContext, aOptions.mAlpha);
|
||||
|
||||
cairo_pattern_destroy(pat);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
DrawTargetCairo::PushClip(const Path *aPath)
|
||||
|
@ -257,6 +257,63 @@ DrawTargetD2D::AddDependencyOnSource(SourceSurfaceD2DTarget* aSource)
|
||||
}
|
||||
}
|
||||
|
||||
TemporaryRef<ID2D1Bitmap>
|
||||
DrawTargetD2D::GetBitmapForSurface(SourceSurface *aSurface,
|
||||
Rect &aSource)
|
||||
{
|
||||
RefPtr<ID2D1Bitmap> bitmap;
|
||||
|
||||
switch (aSurface->GetType()) {
|
||||
|
||||
case SURFACE_D2D1_BITMAP:
|
||||
{
|
||||
SourceSurfaceD2D *srcSurf = static_cast<SourceSurfaceD2D*>(aSurface);
|
||||
bitmap = srcSurf->GetBitmap();
|
||||
}
|
||||
break;
|
||||
case SURFACE_D2D1_DRAWTARGET:
|
||||
{
|
||||
SourceSurfaceD2DTarget *srcSurf = static_cast<SourceSurfaceD2DTarget*>(aSurface);
|
||||
bitmap = srcSurf->GetBitmap(mRT);
|
||||
AddDependencyOnSource(srcSurf);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
|
||||
|
||||
if (!srcSurf) {
|
||||
gfxDebug() << "Not able to deal with non-data source surface.";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (aSource.width > mRT->GetMaximumBitmapSize() ||
|
||||
aSource.height > mRT->GetMaximumBitmapSize()) {
|
||||
gfxDebug() << "Bitmap source larger than texture size specified. DrawBitmap will silently fail.";
|
||||
// Don't know how to deal with this yet.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int stride = srcSurf->Stride();
|
||||
|
||||
unsigned char *data = srcSurf->GetData() +
|
||||
(uint32_t)aSource.y * stride +
|
||||
(uint32_t)aSource.x * BytesPerPixel(srcSurf->GetFormat());
|
||||
|
||||
D2D1_BITMAP_PROPERTIES props =
|
||||
D2D1::BitmapProperties(D2D1::PixelFormat(DXGIFormat(srcSurf->GetFormat()), AlphaMode(srcSurf->GetFormat())));
|
||||
mRT->CreateBitmap(D2D1::SizeU(UINT32(aSource.width), UINT32(aSource.height)), data, stride, props, byRef(bitmap));
|
||||
|
||||
// subtract the integer part leaving the fractional part
|
||||
aSource.x -= (uint32_t)aSource.x;
|
||||
aSource.y -= (uint32_t)aSource.y;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetD2D::DrawSurface(SourceSurface *aSurface,
|
||||
const Rect &aDest,
|
||||
@ -274,62 +331,45 @@ DrawTargetD2D::DrawSurface(SourceSurface *aSurface,
|
||||
|
||||
Rect srcRect = aSource;
|
||||
|
||||
switch (aSurface->GetType()) {
|
||||
|
||||
case SURFACE_D2D1_BITMAP:
|
||||
{
|
||||
SourceSurfaceD2D *srcSurf = static_cast<SourceSurfaceD2D*>(aSurface);
|
||||
bitmap = srcSurf->GetBitmap();
|
||||
|
||||
if (!bitmap) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SURFACE_D2D1_DRAWTARGET:
|
||||
{
|
||||
SourceSurfaceD2DTarget *srcSurf = static_cast<SourceSurfaceD2DTarget*>(aSurface);
|
||||
bitmap = srcSurf->GetBitmap(mRT);
|
||||
AddDependencyOnSource(srcSurf);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
RefPtr<DataSourceSurface> srcSurf = aSurface->GetDataSurface();
|
||||
|
||||
if (!srcSurf) {
|
||||
gfxDebug() << "Not able to deal with non-data source surface.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (aSource.width > rt->GetMaximumBitmapSize() ||
|
||||
aSource.height > rt->GetMaximumBitmapSize()) {
|
||||
gfxDebug() << "Bitmap source larger than texture size specified. DrawBitmap will silently fail.";
|
||||
// Don't know how to deal with this yet.
|
||||
return;
|
||||
}
|
||||
|
||||
int stride = srcSurf->Stride();
|
||||
|
||||
unsigned char *data = srcSurf->GetData() +
|
||||
(uint32_t)aSource.y * stride +
|
||||
(uint32_t)aSource.x * BytesPerPixel(srcSurf->GetFormat());
|
||||
|
||||
D2D1_BITMAP_PROPERTIES props =
|
||||
D2D1::BitmapProperties(D2D1::PixelFormat(DXGIFormat(srcSurf->GetFormat()), AlphaMode(srcSurf->GetFormat())));
|
||||
mRT->CreateBitmap(D2D1::SizeU(UINT32(aSource.width), UINT32(aSource.height)), data, stride, props, byRef(bitmap));
|
||||
|
||||
srcRect.x -= (uint32_t)aSource.x;
|
||||
srcRect.y -= (uint32_t)aSource.y;
|
||||
}
|
||||
break;
|
||||
bitmap = GetBitmapForSurface(aSurface, srcRect);
|
||||
if (!bitmap) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
rt->DrawBitmap(bitmap, D2DRect(aDest), aOptions.mAlpha, D2DFilter(aSurfOptions.mFilter), D2DRect(srcRect));
|
||||
|
||||
FinalizeRTForOperation(aOptions.mCompositionOp, ColorPattern(Color()), aDest);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetD2D::MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aOptions)
|
||||
{
|
||||
RefPtr<ID2D1Bitmap> bitmap;
|
||||
|
||||
ID2D1RenderTarget *rt = GetRTForOperation(aOptions.mCompositionOp, ColorPattern(Color()));
|
||||
|
||||
PrepareForDrawing(rt);
|
||||
|
||||
// FillOpacityMask only works if the antialias mode is MODE_ALIASED
|
||||
rt->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
|
||||
|
||||
IntSize size = aMask->GetSize();
|
||||
Rect maskRect = Rect(0.f, 0.f, size.width, size.height);
|
||||
bitmap = GetBitmapForSurface(aMask, maskRect);
|
||||
if (!bitmap) {
|
||||
return;
|
||||
}
|
||||
|
||||
Rect dest = Rect(aOffset.x, aOffset.y, size.width, size.height);
|
||||
RefPtr<ID2D1Brush> brush = CreateBrushForPattern(aSource, aOptions.mAlpha);
|
||||
rt->FillOpacityMask(bitmap, brush, D2D1_OPACITY_MASK_CONTENT_GRAPHICS, D2DRect(dest), D2DRect(maskRect));
|
||||
|
||||
FinalizeRTForOperation(aOptions.mCompositionOp, ColorPattern(Color()), dest);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
|
||||
const Point &aDest,
|
||||
|
@ -63,6 +63,11 @@ public:
|
||||
Float aSigma,
|
||||
CompositionOp aOperator);
|
||||
virtual void ClearRect(const Rect &aRect);
|
||||
virtual void MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
|
||||
|
||||
virtual void CopySurface(SourceSurface *aSurface,
|
||||
const IntRect &aSourceRect,
|
||||
@ -142,6 +147,9 @@ public:
|
||||
static uint64_t mVRAMUsageSS;
|
||||
|
||||
private:
|
||||
TemporaryRef<ID2D1Bitmap>
|
||||
DrawTargetD2D::GetBitmapForSurface(SourceSurface *aSurface,
|
||||
Rect &aSource);
|
||||
friend class AutoSaveRestoreClippedOut;
|
||||
friend class SourceSurfaceD2DTarget;
|
||||
|
||||
|
@ -97,6 +97,18 @@ DrawTargetDual::DrawSurfaceWithShadow(SourceSurface *aSurface, const Point &aDes
|
||||
mB->DrawSurfaceWithShadow(surface.mB, aDest, aColor, aOffset, aSigma, aOp);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetDual::MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aOptions)
|
||||
{
|
||||
DualPattern source(aSource);
|
||||
DualSurface mask(aMask);
|
||||
mA->MaskSurface(*source.mA, mask.mA, aOffset, aOptions);
|
||||
mB->MaskSurface(*source.mB, mask.mB, aOffset, aOptions);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetDual::CopySurface(SourceSurface *aSurface, const IntRect &aSourceRect,
|
||||
const IntPoint &aDestination)
|
||||
|
@ -59,7 +59,12 @@ public:
|
||||
|
||||
virtual void DrawSurface(SourceSurface *aSurface, const Rect &aDest, const Rect & aSource,
|
||||
const DrawSurfaceOptions &aSurfOptions, const DrawOptions &aOptions);
|
||||
|
||||
|
||||
virtual void MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
|
||||
virtual void DrawSurfaceWithShadow(SourceSurface *aSurface, const Point &aDest,
|
||||
const Color &aColor, const Point &aOffset,
|
||||
Float aSigma, CompositionOp aOp);
|
||||
|
@ -1397,7 +1397,6 @@ gfxContext::GetPattern()
|
||||
|
||||
|
||||
// masking
|
||||
|
||||
void
|
||||
gfxContext::Mask(gfxPattern *pattern)
|
||||
{
|
||||
@ -1463,12 +1462,10 @@ gfxContext::Mask(gfxASurface *surface, const gfxPoint& offset)
|
||||
gfxPoint pt = surface->GetDeviceOffset();
|
||||
|
||||
// We clip here to bind to the mask surface bounds, see above.
|
||||
mDT->PushClipRect(Rect(offset.x - pt.x, offset.y - pt.y, sourceSurf->GetSize().width, sourceSurf->GetSize().height));
|
||||
mDT->Mask(GeneralPattern(this),
|
||||
SurfacePattern(sourceSurf, EXTEND_CLAMP,
|
||||
Matrix(1.0f, 0, 0, 1.0f, Float(offset.x - pt.x), Float(offset.y - pt.y))),
|
||||
mDT->MaskSurface(GeneralPattern(this),
|
||||
sourceSurf,
|
||||
Point(offset.x - pt.x, offset.y - pt.y),
|
||||
DrawOptions(1.0f, CurrentState().op, CurrentState().aaMode));
|
||||
mDT->PopClip();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1776,7 +1776,7 @@ class BuildProcessGraph(TcheckVisitor):
|
||||
if parentSideActor is not None:
|
||||
self.error(bridges.loc,
|
||||
"ambiguous bridge `%s' between `%s' and `%s'",
|
||||
bridgeProto.type.name(),
|
||||
bridgeProto.name(),
|
||||
parentSideProto.name(),
|
||||
childSideProto.name())
|
||||
else:
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "assembler/wtf/SegmentedVector.h"
|
||||
#include "assembler/wtf/Assertions.h"
|
||||
|
||||
#include "jsnum.h"
|
||||
#define ASSEMBLER_HAS_CONSTANT_POOL 1
|
||||
|
||||
namespace JSC {
|
||||
|
@ -4,12 +4,12 @@
|
||||
* 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/. */
|
||||
|
||||
#include "builtin/RegExp.h"
|
||||
|
||||
#include "jscntxt.h"
|
||||
|
||||
#include "vm/StringBuffer.h"
|
||||
|
||||
#include "builtin/RegExp.h"
|
||||
|
||||
#include "jsobjinlines.h"
|
||||
|
||||
#include "vm/RegExpObject-inl.h"
|
||||
|
@ -4,22 +4,20 @@
|
||||
* 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/. */
|
||||
|
||||
#include "builtin/TestingFunctions.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsbool.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsobj.h"
|
||||
#include "jsprf.h"
|
||||
#include "jswrapper.h"
|
||||
|
||||
#include "builtin/TestingFunctions.h"
|
||||
#include "ion/AsmJS.h"
|
||||
#include "vm/ForkJoin.h"
|
||||
|
||||
#include "jsobjinlines.h"
|
||||
|
||||
#include "vm/Stack-inl.h"
|
||||
#include "vm/ObjectImpl-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace JS;
|
||||
|
@ -7,6 +7,8 @@
|
||||
#ifndef TestingFunctions_h__
|
||||
#define TestingFunctions_h__
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
namespace js {
|
||||
|
||||
bool
|
||||
|
@ -416,15 +416,20 @@ ifdef MOZ_UPDATE_XTERM
|
||||
UPDATE_TITLE = printf "\033]0;%s in %s\007" $(1) $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2) ;
|
||||
endif
|
||||
|
||||
define SUBMAKE # $(call SUBMAKE,target,directory)
|
||||
# Static directories are largely independent of our build system. But, they
|
||||
# could share the same build mechanism (like moz.build files). We need to
|
||||
# prevent leaking of our backend state to these independent build systems. This
|
||||
# is why MOZBUILD_BACKEND_CHECKED isn't exported to make invocations for static
|
||||
# directories.
|
||||
define SUBMAKE # $(call SUBMAKE,target,directory,static)
|
||||
+@$(UPDATE_TITLE)
|
||||
+$(MAKE) $(if $(2),-C $(2)) $(1)
|
||||
+$(if $(3), MOZBUILD_BACKEND_CHECKED=,) $(MAKE) $(if $(2),-C $(2)) $(1)
|
||||
|
||||
endef # The extra line is important here! don't delete it
|
||||
|
||||
define TIER_DIR_SUBMAKE
|
||||
@echo "BUILDSTATUS TIERDIR_START $(2)"
|
||||
$(call SUBMAKE,$(1),$(2))
|
||||
$(call SUBMAKE,$(1),$(2),$(3))
|
||||
@echo "BUILDSTATUS TIERDIR_FINISH $(2)"
|
||||
|
||||
endef # Ths empty line is important.
|
||||
@ -441,11 +446,6 @@ LOOP_OVER_PARALLEL_DIRS = \
|
||||
$(foreach dir,$(PARALLEL_DIRS),$(call SUBMAKE,$@,$(dir)))
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
LOOP_OVER_STATIC_DIRS = \
|
||||
$(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,$@,$(dir)))
|
||||
endif
|
||||
|
||||
ifneq (,$(strip $(TOOL_DIRS)))
|
||||
LOOP_OVER_TOOL_DIRS = \
|
||||
$(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,$@,$(dir)))
|
||||
@ -671,7 +671,7 @@ else
|
||||
|
||||
default all::
|
||||
ifneq (,$(strip $(STATIC_DIRS)))
|
||||
$(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir)))
|
||||
$(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir),1))
|
||||
endif
|
||||
$(MAKE) export
|
||||
$(MAKE) libs
|
||||
@ -715,7 +715,7 @@ endif
|
||||
@echo "BUILDSTATUS DIRS $$($$@_dirs)"
|
||||
ifneq (,$(tier_$(1)_staticdirs))
|
||||
@echo "BUILDSTATUS SUBTIER_START $(1) static"
|
||||
$$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir)))
|
||||
$$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir),1))
|
||||
@echo "BUILDSTATUS SUBTIER_FINISH $(1) static"
|
||||
endif
|
||||
ifneq (,$(tier_$(1)_dirs))
|
||||
|
@ -188,7 +188,7 @@ if test -n "$gonkdir" ; then
|
||||
;;
|
||||
esac
|
||||
|
||||
CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic $CPPFLAGS -I$gonkdir/external/valgrind"
|
||||
CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic $CPPFLAGS -I$gonkdir/external/valgrind/fxos-include"
|
||||
CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
|
||||
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions -Wno-psabi $CXXFLAGS $STLPORT_CPPFLAGS"
|
||||
LIBS="$LIBS $STLPORT_LIBS"
|
||||
@ -1819,10 +1819,6 @@ ia64*-hpux*)
|
||||
AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$HAVE_64BIT_OS"; then
|
||||
AC_DEFINE(_WIN64)
|
||||
fi
|
||||
;;
|
||||
|
||||
*-netbsd*)
|
||||
|
@ -268,7 +268,7 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain,
|
||||
TokenStream::Position pos(parser.keepAtoms);
|
||||
parser.tokenStream.tell(&pos);
|
||||
|
||||
ParseNode *pn = parser.statement();
|
||||
ParseNode *pn = parser.statement(canHaveDirectives);
|
||||
if (!pn) {
|
||||
if (parser.hadAbortedSyntaxParse()) {
|
||||
// Parsing inner functions lazily may lead the parser into an
|
||||
|
@ -2521,7 +2521,7 @@ Parser<ParseHandler>::statements()
|
||||
}
|
||||
break;
|
||||
}
|
||||
Node next = statement();
|
||||
Node next = statement(canHaveDirectives);
|
||||
if (!next) {
|
||||
if (tokenStream.isEOF())
|
||||
tokenStream.setUnexpectedEOF();
|
||||
@ -4501,7 +4501,7 @@ Parser<ParseHandler>::expressionStatement()
|
||||
|
||||
template <typename ParseHandler>
|
||||
typename ParseHandler::Node
|
||||
Parser<ParseHandler>::statement()
|
||||
Parser<ParseHandler>::statement(bool canHaveDirectives)
|
||||
{
|
||||
Node pn;
|
||||
|
||||
@ -4781,7 +4781,14 @@ Parser<ParseHandler>::statement()
|
||||
case TOK_ERROR:
|
||||
return null();
|
||||
|
||||
case TOK_NAME: {
|
||||
case TOK_STRING:
|
||||
if (!canHaveDirectives && tokenStream.currentToken().atom() == context->names().useAsm) {
|
||||
if (!report(ParseWarning, false, null(), JSMSG_USE_ASM_DIRECTIVE_FAIL))
|
||||
return null();
|
||||
}
|
||||
return expressionStatement();
|
||||
|
||||
case TOK_NAME:
|
||||
if (tokenStream.peekToken() == TOK_COLON)
|
||||
return labeledStatement();
|
||||
if (tokenStream.currentToken().name() == context->names().module
|
||||
@ -4789,8 +4796,7 @@ Parser<ParseHandler>::statement()
|
||||
{
|
||||
return moduleDecl();
|
||||
}
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
return expressionStatement();
|
||||
|
||||
default:
|
||||
return expressionStatement();
|
||||
|
@ -372,7 +372,7 @@ struct Parser : private AutoGCRooter, public StrictModeGetter
|
||||
public:
|
||||
|
||||
/* Public entry points for parsing. */
|
||||
Node statement();
|
||||
Node statement(bool canHaveDirectives = false);
|
||||
bool maybeParseDirective(Node pn, bool *cont);
|
||||
|
||||
// Parse a function, given only its body. Used for the Function constructor.
|
||||
|
@ -7,41 +7,28 @@
|
||||
/*
|
||||
* JS lexical scanner.
|
||||
*/
|
||||
#include <stdio.h> /* first to avoid trouble on some systems */
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#ifdef HAVE_MEMORY_H
|
||||
#include <memory.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "frontend/TokenStream.h"
|
||||
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#include "jstypes.h"
|
||||
#include "jsutil.h"
|
||||
#include "jsprf.h"
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsatom.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jsversion.h"
|
||||
#include "jsexn.h"
|
||||
#include "jsnum.h"
|
||||
#include "jsopcode.h"
|
||||
#include "jsscript.h"
|
||||
|
||||
#include "frontend/BytecodeCompiler.h"
|
||||
#include "frontend/Parser.h"
|
||||
#include "frontend/TokenStream.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "vm/Keywords.h"
|
||||
#include "vm/RegExpObject.h"
|
||||
#include "vm/StringBuffer.h"
|
||||
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::frontend;
|
||||
using namespace js::unicode;
|
||||
|
@ -4,7 +4,6 @@
|
||||
* 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/. */
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
@ -19,7 +18,6 @@
|
||||
#include "frontend/BytecodeCompiler.h"
|
||||
#include "gc/GCInternals.h"
|
||||
#include "gc/Marking.h"
|
||||
#include "ion/IonCode.h"
|
||||
#ifdef JS_ION
|
||||
# include "ion/IonMacroAssembler.h"
|
||||
# include "ion/IonFrameIterator.h"
|
||||
|
@ -12,18 +12,12 @@
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jscrashformat.h"
|
||||
#include "jscrashreport.h"
|
||||
#include "jsprf.h"
|
||||
#include "jsutil.h"
|
||||
#include "prmjtime.h"
|
||||
#include "gc/Memory.h"
|
||||
|
||||
#include "jscntxtinlines.h"
|
||||
#include "gc/Barrier-inl.h"
|
||||
#include "vm/Probes-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::gcstats;
|
||||
|
||||
|
@ -7,15 +7,11 @@
|
||||
#ifndef jsgc_statistics_h___
|
||||
#define jsgc_statistics_h___
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/GuardObjects.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
#include "jspubtd.h"
|
||||
#include "jsutil.h"
|
||||
|
||||
#include "js/GCAPI.h"
|
||||
|
||||
|
@ -6,17 +6,13 @@
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsprf.h"
|
||||
#include "jsutil.h"
|
||||
#include "jswatchpoint.h"
|
||||
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "js/HashTable.h"
|
||||
#include "gc/GCInternals.h"
|
||||
|
||||
#include "jsgcinlines.h"
|
||||
#include "gc/Zone.h"
|
||||
|
||||
#ifdef MOZ_VALGRIND
|
||||
# include <valgrind/memcheck.h>
|
||||
|
@ -4,14 +4,10 @@
|
||||
* 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/. */
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsprf.h"
|
||||
|
||||
#include "vm/Debugger.h"
|
||||
#include "js/HashTable.h"
|
||||
#include "gc/GCInternals.h"
|
||||
|
||||
#ifdef JS_ION
|
||||
#include "ion/BaselineJIT.h"
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "jsmath.h"
|
||||
#include "jsworkers.h"
|
||||
#include "prmjtime.h"
|
||||
|
||||
#include "frontend/ParseNode.h"
|
||||
#include "ion/AsmJS.h"
|
||||
@ -13,21 +14,20 @@
|
||||
|
||||
#include "frontend/ParseNode-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::frontend;
|
||||
using namespace mozilla;
|
||||
|
||||
#include "ion/PerfSpewer.h"
|
||||
#include "ion/CodeGenerator.h"
|
||||
#include "ion/MIR.h"
|
||||
#include "ion/MIRGraph.h"
|
||||
|
||||
using namespace js::ion;
|
||||
|
||||
#ifdef MOZ_VTUNE
|
||||
# include "jitprofiling.h"
|
||||
#endif
|
||||
|
||||
using namespace js;
|
||||
using namespace js::frontend;
|
||||
using namespace js::ion;
|
||||
using namespace mozilla;
|
||||
|
||||
/*****************************************************************************/
|
||||
// ParseNode utilities
|
||||
|
||||
|
@ -7,14 +7,17 @@
|
||||
#ifdef DEBUG
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "IonBuilder.h"
|
||||
#include "Ion.h"
|
||||
#include "C1Spewer.h"
|
||||
#include "MIRGraph.h"
|
||||
#include "LIR.h"
|
||||
#include "jsscriptinlines.h"
|
||||
#include "LinearScan.h"
|
||||
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::ion;
|
||||
|
||||
|
@ -4714,7 +4714,7 @@ IonBuilder::jsop_call(uint32_t argc, bool constructing)
|
||||
|
||||
// Acquire known call target if existent.
|
||||
AutoObjectVector originals(cx);
|
||||
bool gotLambda;
|
||||
bool gotLambda = false;
|
||||
types::StackTypeSet *calleeTypes = current->peek(calleeDepth)->resultTypeSet();
|
||||
if (calleeTypes) {
|
||||
if (!getPolyCallTargets(calleeTypes, originals, 4, &gotLambda))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user