Commit Graph

8051 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
94dab00e58 Bug 1191178 - Part 0.2: Include nsBaseHashTable in nsScriptNameSpaceManager.h explicitly to avoid unified build errors. r=njn 2015-08-20 14:20:06 -07:00
Hiroyuki Ikezoe
1be555f823 Bug 1191178 - Part 0.1: GetSriLog() is needed to avoid unified build failure. r=francois 2015-08-20 14:19:53 -07:00
Hiroyuki Ikezoe
d5a979ffaa Bug 1191178 - Part 0: Fix unified build in dom/base. Add missing headers and sorting them. r=smaug 2015-08-20 14:18:57 -07:00
Wei-Cheng Pan
da9b9d9f75 Bug 1050749 - Expose BatteryManager via getBattery() returning a Promise r=bz,baku 2015-08-20 15:39:47 +08:00
Wes Kocher
23f350eb4a Merge m-c to inbound, a=merge 2015-08-20 12:51:40 -07:00
Mats Palmgren
481ecf7d23 Bug 1189814. r=enndeakin@gmail.com 2015-08-20 18:45:18 +02:00
Olli Pettay
eafe4d64df Bug 1196317 - Optimize CallbackObject::mCreationStack out from cycle collection graph when possible, r=mccr8 2015-08-20 18:36:06 +03:00
Cameron McCormack
2dd0932fbb Bug 968923 - part 4 - hook up use counters to WebIDL bindings; r=bz 2015-02-05 12:53:01 -05:00
Cameron McCormack
2cb5b9b157 Bug 968923 - part 3d - record use counter information from the CSS parser; r=dbaron 2015-06-03 15:21:24 -04:00
Cameron McCormack
4a236adb80 Bug 968923 - part 3b - propagating use counters from SVG images into owning/parent documents; r=seth 2015-06-03 13:42:07 -04:00
Cameron McCormack
bc3d82ad01 Bug 968923 - part 3a - add core DOM use counter functionality; r=smaug
This patch gives ns{I,}Document the ability to track use counters and
also to send those to telemetry at document destruction time.  We push
things to telemetry lazily because we're can't definitively say whether
something has been used until the document is torn down.
2015-06-03 12:39:18 -04:00
Ryan VanderMeulen
cd959e19f8 Merge b2g-inbound to m-c. a=merge 2015-08-18 10:41:52 -04:00
Ryan VanderMeulen
0370f8dc4c Backed out changesets df6e7f025c65, 3e5d45dcd5c6, and e00a383520f6 (bug 952456) for B2G test_browserElement_inproc_CopyPaste.html failures.
CLOSED TREE
2015-08-18 07:54:19 -04:00
Andrew Osmond
8af41a352f Bug 1186273 - Part 2. Improve reuse of and releasing of device storage objects where appropriate. r=dhylands 2015-08-18 07:42:14 -04:00
Wes Kocher
d56847e545 Merge m-c to b2ginbound, a=merge 2015-08-17 17:15:50 -07:00
Boris Chiou
f38cb18883 Bug 952456 - Part 3: Enable test_copyimage.html on gonk/cocoa r=fabrice
Enable dom/base/test/test_copyimage.html on b2g emulators and macos
2015-08-17 15:49:30 -07:00
Ryan VanderMeulen
e32420bdb9 Merge inbound to m-c. a=merge 2015-08-17 09:06:59 -04:00
Ben Tian
cac4eb9266 Bug 1192693 - [02] Remove bluetooth1 folder and rename webidl files, r=joliu, r=mrbkap 2015-08-17 15:30:34 +08:00
Robert Longson
ae991f3a9c Bug 1194619 - fix comment r=dholbert 2015-08-14 19:22:22 +01:00
William Chen
161ace8311 Bug 1181130 - Part 3: Keep track of editable descendants per node and prevent NS_STYLE_USER_SELECT_ALL selection for nodes with editable descendants. r=bz 2015-08-14 10:52:38 -07:00
Ryan VanderMeulen
52de1e274f Backed out changeset c2c0405ddf93 (bug 1180916) for causing various e10s mochitest failures. 2015-08-14 11:27:25 -04:00
Aryeh Gregor
1d1b2d1359 Bug 874838 - Make CreateElem return Element. r=khuey 2015-08-13 07:50:00 -04:00
Brad Lassey
490eccaa57 bug 1180916 - witching tab generates 4 frames (4 full runs of the RefreshDriver), freeze the refresh driver while switching tabs r=mconley, mrbkap 2015-08-14 09:18:37 -04:00
Aryeh Gregor
7aa3c7ff38 Bug 1179451 - Part 2: Fix incorrect return type. r=ehsan 2015-08-13 15:22:48 +03:00
Aryeh Gregor
a0d8e26be1 Bug 1179451 - Part 1: Rewrite some ternary operators as if/else. r=froydnj 2015-08-13 15:22:48 +03:00
Ryan VanderMeulen
0e0af6dbb2 Merge m-c to inbound. a=merge 2015-08-17 09:07:43 -04:00
Ehsan Akhgari
7903b4c320 Bug 1195051 - Part 3: Test changes; r=padenot 2015-08-17 08:55:01 -04:00
Daniel Holbert
f6d74823b0 Bug 1195123: Restructure logic (pulling out "!") for SVG image rejection, to make it clearer that it matches the comment. r=longsonr 2015-08-16 13:37:56 -07:00
Matt Woodrow
2b310a6e30 Bug 1178098 - Report why DXVA initialization failed to about:support. r=cpearce 2015-07-13 16:12:23 -04:00
Mike Conley
cfd5c1fa5a Bug 1141337 - Update nsIWebBrowserPersistable to allow subframe targeting for Save Frame As. r=jld
This alters nsIWebBrowserPersistable so that startPersistence takes an
outerWindowID. This allows us to target a particular subframe from
beneath an nsFrameLoader, which is useful when attempting to Save
Frame As a remote browser.
2015-08-06 10:44:16 -04:00
Ryan VanderMeulen
e0b88fb05b Backed out changeset 4a8f45990368 (bug 1185640) for causing serviceworker w-p-t permacrashes.
CLOSED TREE
2015-08-13 10:13:55 -04:00
Andrea Marchesini
3d48cb2424 Bug 1185640 - Passing a scope or scriptURL to register() with escaped '/' or '\' should fail, r=bkelly 2015-08-13 11:34:52 +01:00
Francois Marier
6349d3c212 Bug 992096 - Implement Sub Resource Integrity [1/2]. r=baku,r=ckerschb
Code changes
2015-08-12 20:19:11 -07:00
Tom Tromey
a609b68474 Bug 1013814 - add inIDOMUtils.getRelativeRuleLine; r=heycam,pbrosset 2015-08-17 15:19:21 -07:00
Hiroyuki Ikezoe
5ba082b6c2 Bug 1165796 - Part 3: Fix PerformanceObserverEntryList::GetEntries filtering for initiatorType. r=baku 2015-08-17 15:13:26 -07:00
Hiroyuki Ikezoe
040cf3439b Bug 1165796 - Part 2: Implement PerformanceObserver.r=baku 2015-08-17 15:13:20 -07:00
Hiroyuki Ikezoe
c8c6ffd0d0 Bug 1165796 - Part 1: Make PrefEnabledRunnable usable for other preference names. r=baku 2015-08-17 15:13:13 -07:00
Hiroyuki Ikezoe
45482c1f65 Bug 1165796 - Part 0: Unified build fix. r=baku 2015-08-17 15:13:06 -07:00
Arnaud Bienner
d99c4429a7 Bug 1190086 - Use new String::Contains(char) method more widely r=froydnj 2015-08-14 00:49:15 +02:00
Aryeh Gregor
f5961e4a6b Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
Benoit Girard
6e8f2c1528 Bug 1191412 - Fix logic and text for the WillChange warning. r=roc 2015-08-07 16:05:19 -04:00
Christoph Kerschbaumer
6005a1a10c Bug 1187165 - Use channel->ascynOpen2 in dom/base/ImportManager (r=sicking) 2015-08-10 10:25:20 -07:00
Kyle Machulis
92528e4385 Bug 1192787 - Readd performance enabled test to ResponseEndHighRes; r=baku 2015-08-11 08:54:52 -07:00
Terrence Cole
ae96ebf942 Bug 1193032 - Part 2: Make unlimited SliceBudget initialization explicit; r=ehoogeveen,r=mccr8 2015-08-11 08:42:24 -07:00
Kyle Huey
84e3cc2dea Bug 1179909: Build fix. r=me CLOSED TREE 2015-08-11 07:38:01 -07:00
Kyle Huey
eb04361eb9 Bug 1179909: Build fix. r=me CLOSED TREE 2015-08-11 06:54:49 -07:00
Kyle Huey
1ffb03e8dc Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Jeff Walden
8ef6024e61 Bug 1158399 - Expose the [[DateValue]] field in Date objects only through a ClippedTime class that enforces prior TimeClip-ing on the given value. r=evilpie, r=bz, r=dhylands, r=mt, r=froydnj, r=khuey, r=baku, r=smaug 2015-05-01 19:12:52 -07:00
Andrea Marchesini
b72f4855c1 Bug 1188612 - Transferable errors should become NS_DOM_DATA_CLONE_ERR, r=sfink 2015-08-10 16:13:24 +01:00
Nicholas Nethercote
e27e95ebeb Bug 1192128 - In DOM memory reporter, handle WindowID() being a uint64_t. r=mccr8. 2015-08-06 22:09:30 -07:00
Wes Kocher
92270b58f4 Merge m-c to fx-team, a=merge 2015-08-07 17:36:14 -07:00
Brian Grinstead
b65accb826 Bug 1186925 - Convert tests using bad-content notification to use gIdentityHandler;r=tanvi 2015-08-07 15:22:52 -07:00
Ehsan Akhgari
b5fe53ab03 Bug 1192252 - Add a helper RAII class for managing the cleanup in nsFrameLoader::SwapWithOtherLoader; r=smaug 2015-08-07 12:36:57 -04:00
Ehsan Akhgari
380cdc7d57 Bug 1191491 - Do not dispatch an audio-playback notification when swapping browsers; r=smaug
We send a pagehide event during swapping docshell frame loaders, and
before this patch we would not be able to differentiate this event with
the one that we send when navigating away from a page, so we would
incorrectly dispatch an audio-playback notification indicating that
audio playback has stopped.  This patch adds a flag to the root docshell
when the frame loader swapping is in progress and disables the above
behavior when that flag is set.
2015-08-07 12:18:24 -04:00
Wes Kocher
470f734e39 Merge m-c to inbound, a=merge 2015-08-06 18:11:16 -07:00
Christoph Kerschbaumer
d26294b1b5 Bug 1191107 - Split TYPE_XMLHTTPREQUEST and TYPE_DATAREQUEST for EventSource (r=sicking,ehsan) 2015-08-06 11:17:24 -07:00
Kyle Machulis
f402cf55a5 Bug 1186582 - AskPermission should check for prompt exceptions; r=fabrice 2015-08-06 08:53:23 -07:00
Ehsan Akhgari
3699ea040a Bug 1190040 - Part 1: Do not dispatch media-playback notifications for media elements that do not have an audio track; r=cpearce 2015-08-06 10:25:38 -04:00
Aryeh Gregor
e1f9227fe6 Bug 1191305 - Alphabetize some includes; r=froydnj 2015-08-06 15:45:21 +03:00
Carsten "Tomcat" Book
3dfe591c94 Backed out 2 changesets (bug 1191107, bug 1180273) for causing xpcshell and m-oth testfailures on a CLOSED TREEi IGNORE IDL
Backed out changeset c5f710ed8718 (bug 1191107)
Backed out changeset d98d82f9981b (bug 1180273)
2015-08-06 08:39:05 +02:00
Xidorn Quan
64a348bc1f Bug 1191148 - Don't count fullscreen request handled if we don't change the document state. r=smaug 2015-08-06 15:37:48 +10:00
Xidorn Quan
071bdd5f2c Bug 1190669 part 3 - Introduce new fullscreen reason which exits fullscreen without fullscreen transition, and use it for ExitFullscreenInDocTree. r=smaug 2015-08-06 15:37:48 +10:00
Xidorn Quan
5b9c6c4c54 Bug 1190669 part 2 - Move the part which runs script from ExitFullscreenInDocTree to a runnable, and protect it with AddScriptRunner. r=smaug 2015-08-06 15:37:48 +10:00
Xidorn Quan
5f68d21816 Bug 1190669 part 1 - Remove helper function SetWindowFullScreen and its helper runnable. r=smaug
All of the callsites of this helper function has a synchronous event
dispatch which indicates the AddScriptRunner in that helper function
makes no sense.

Also it seems that most of the callsites are actually safe to run
script, except ExitFullscreenInDocTree() which may be called from
Element::UnbindFromTree(). It'll be fixed in the following patch.
2015-08-06 15:37:48 +10:00
Xidorn Quan
ffc2d06d4b Bug 1191112 part 3 - Don't touch the widget anymore if it has been destroyed during the fullscreen transition. r=smaug 2015-08-06 15:37:48 +10:00
Xidorn Quan
4e62bfa274 Bug 1191112 part 1 - Clear pending fullscreen requests on page close. r=smaug 2015-08-06 15:37:48 +10:00
Christoph Kerschbaumer
02919da4b2 Bug 1191107 - Split TYPE_XMLHTTPREQUEST and TYPE_DATAREQUEST for EventSource - IGNORE IDL (r=sicking,ehsan) 2015-08-05 12:58:05 -07:00
Jed Davis
68210f3fab Bug 1101100 - Multiprocess-enable nsWebBrowserPersist. r=billm
The high-level overview is that the parts of nsWebBrowserPersist which
access the DOM have been factored out (as WebBrowserPersistLocalDocument)
and abstracted (nsIWebBrowserPersistDocument) such that they can be
implemented in the cross-process case using IPC.
2015-08-05 14:25:39 -07:00
Aryeh Gregor
a3c0771347 Bug 1190823 - Move OwningNonNull.h to xpcom/base/; r=froydnj 2015-08-05 15:28:27 +03:00
Carsten "Tomcat" Book
e34067fdd0 merge mozilla-inbound to mozilla-central a=merge 2015-08-05 13:12:59 +02:00
Ehsan Akhgari
3ff03c96fd Backout bug 1190040 for test failures 2015-08-05 01:12:05 -04:00
Christoph Kerschbaumer
ab39908a60 Bug 1188637 - Use channel->ascynOpen2 in dom/base/EventSource.cpp (r=sicking) 2015-08-04 20:06:19 -07:00
Ehsan Akhgari
445de25825 Bug 1190082 - Rename media-playback and the related stuff to audio-playback; r=smaug
Given that we only dispatch this for audio, media-playback sounds
like a misnomer.
2015-08-04 21:07:41 -04:00
Ehsan Akhgari
d784878849 Bug 1190023 - Ensure that muting a media element dispatches the media-playback event, and also include the muted state in computing whether a media element is actively playing audio; r=cpearce 2015-08-04 20:07:41 -04:00
Ehsan Akhgari
09c21cd547 Bug 1190040 - Do not dispatch media-playback notifications for media elements that do not have an audio track; r=baku 2015-08-04 19:38:51 -04:00
Birunthan Mohanathas
9b6236a10a Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Nicholas Nethercote
845b474b3c Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)
2015-07-30 21:19:57 -07:00
Nicholas Nethercote
f23a15f104 Bug 1189156 (part 2) - Don't use enumeration style for nsTHashtable::SizeOf{In,Ex}cludingThis(). r=erahm.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

And we still have the existing single-arg SizeOf{In,Ex}cluding() functions,
which work if the entry type itself defines SizeOfExcludingThis().
2015-07-29 01:50:52 -07:00
Kan-Ru Chen
88c47ec3d2 Bug 1190245 - Make frame script loading and browser-api initialization easier to follow. r=smaug
Load frame script and initialize browser-api at the end of (1) DocShell
creation (2) RemoteBrowser creation (3) SetRemoteBrowser
2015-08-04 11:10:50 +08:00
Kan-Ru Chen
a5cef91d92 Bug 1190245 - Make the MaybeCreateDocShell using code path easier to follow. r=smaug
Don't rely on MaybeCreateDocShell to set mRemoteFrame so we don't have
to call MaybeCreateDocShell in weird places. Instead we set mRemoteFrame
early in the nsFrameLoader constructor. This should still allow us to
switch default remoteness dynamically.
2015-08-04 11:10:50 +08:00
Kan-Ru Chen
afec2af40b Bug 1190245 - Separate mMessageManager creation and FrameScript loading. r=smaug 2015-08-04 11:10:49 +08:00
Robert O'Callahan
a0a56fc159 Bug 1184842. Preparse class attribute values in Element::BeforeSetAttr. r=peterv 2015-08-01 17:46:15 +12:00
Robert O'Callahan
3e3003e4ce Bug 1184842. Add aNewValue to nsIMutationObserver::AttributeWillChange. r=peterv 2015-07-25 18:05:19 +12:00
Robert O'Callahan
9fb2247b78 Bug 1184842. Pass preparsed attribute values to nsNodeUtils::AttributeWillChange. r=peterv 2015-07-22 15:53:35 +12:00
Robert O'Callahan
99701808fc Bug 1184842. Allow BeforeSetAttr to preparse aValue. r=peterv
We will pass the preparsed value into AttributeWillChange.
2015-08-01 17:14:06 +12:00
Robert O'Callahan
53c0044a87 Bug 1184842. Pass aOldValue to all mutation observers. r=peterv 2015-07-25 18:01:19 +12:00
Robert O'Callahan
1feb908b60 Bug 1184842. Add aOldValue parameter to nsNodeUtils::AttributeChanged. r=peterv 2015-07-21 16:13:53 +12:00
Robert O'Callahan
b7cc251745 Bug 1184842. Make SetAttrAndNotify use the real old value instead of aOldValue when possible. r=bz 2015-07-25 17:57:13 +12:00
Robert O'Callahan
5fc079e9ea Bug 1184842. Change nsAttrAndChildArray::SetAndTakeAttr to nsAttrAndChildArray::SetAndSwapAttr. r=peterv 2015-07-22 14:09:41 +12:00
Bill McCloskey
c229b0c580 Bug 1189550 - In parent process, cpmm.initialProcessData should be same as ppmm.initialProcessData (r=smaug) 2015-08-03 10:41:24 -07:00
Carsten "Tomcat" Book
26d634a982 Backed out changeset 427cfffcb5b7 (bug 1000870) 2015-08-03 16:37:18 +02:00
Russ Nicoletti
efada9f806 Bug 1177226 - Support User Timing API events in the Developer HUD. r=ehsan, r=jryans 2015-07-31 15:40:08 -07:00
Maksim Lebedev
8fbc5386cc Bug 1000870 - Add some features in testing system. r=smaug 2015-05-19 07:03:00 +02:00
Carsten "Tomcat" Book
a36be276a2 Backed out changeset b821b18a1bfb (bug 1189550) for breaking GU Tests 2015-08-03 09:38:27 +02:00
Bill McCloskey
b0ad0cc207 Bug 1189550 - In parent process, cpmm.initialProcessData should be same as ppmm.initialProcessData (r=smaug) 2015-08-02 17:29:55 -07:00
Nikhil Marathe
7a5ae58993 Bug 1183954 - Fix Notification.data structured cloning on workers. r=robertbindar,mccr8
Rather than store a non-thread-safe refcounted nsIStructuredCloneContainer, store the base64 representation.
Caches a jsval the first time an attempt to access data is made from content script.
2015-07-30 12:44:14 -07:00
Xidorn Quan
454ad3b7a1 Bug 1164725 - Convert flags in nsIDocument into bit fields. r=smaug 2015-08-01 10:49:19 +10:00
Eric Rahm
d7b3e5fee6 Bug 1183845 - Only send activation event if document is non-null. r=bz 2015-07-31 13:23:15 -07:00
Christoph Kerschbaumer
0ea778f8c3 Bug 1182539 - Use channel->ascynOpen2 in dom/base/nsDocument.cpp (r=sicking) 2015-07-31 08:58:14 -07:00
Kyle Huey
19e891a252 Bug 1152574: Fix console service discarding to run when it is actually safe to do so (off of inner-window-destroyed). Also add a backstop at xpcom-shutdown to discard any cycle collected messages before it is too late. r=froydnj 2015-07-31 06:49:27 -07:00