Commit Graph

352 Commits

Author SHA1 Message Date
Nika Layzell
eb17a37caa Bug 1416384 - Part 3: Remove nsPIDOMWindow<nsISupports>, r=smaug
This was needed before as the base to nsGlobalWindow, but now that
nsGlobalWindow doesn't exist, and we only have specific versions, we no longer
need this type.

MozReview-Commit-ID: 6IJmJtnSkMr
2017-11-15 11:34:04 -05:00
Nika Layzell
d6a5aaff0c Bug 1416384 - Part 2c: Get nsGlobalWindowInner.cpp building, r=smaug
MozReview-Commit-ID: CmKx5jtvtrT
2017-11-15 11:33:39 -05:00
Nika Layzell
fc738f734d Bug 1401379 - Part 3: Make nsGlobalWindow's reference to nsDocShell strong, r=smaug
MozReview-Commit-ID: DxCjgWGRR0G
2017-11-01 11:06:28 -04:00
Stephen A Pohl
a7719429b5 Bug 1373581: Make transition into and out of native fullscreen smoother on macOS. r=mstange 2017-10-18 21:50:47 -04:00
Sebastian Hengst
cfc08a475a Backed out changeset 4249adc2593a (bug 1401379) 2017-10-02 19:57:27 +02:00
Nika Layzell
a78e0db4db Bug 1401379 - Part 3: Make nsGlobalWindow's reference to nsDocShell strong, r=smaug
MozReview-Commit-ID: DxCjgWGRR0G
2017-10-02 11:58:02 -04:00
Andreas Farre
c0153ce59d Bug 1403586 - Don't disble budget throttling due to gUM. r=smaug,padenot 2017-09-29 15:21:45 +02:00
Andreas Farre
6f11932021 Bug 1396368 - Update mTopInnerWindow before unlinking it. r=bkelly 2017-09-07 10:15:48 +02:00
Andreas Farre
f912b82fb5 Bug 1393359 - Register active user media on top level window. r=smaug,jib 2017-09-04 14:40:30 +02:00
Andreas Farre
0478fbfcb2 Bug 1393056 - Make it possible to count open WebSockets on the main thread. r=smaug 2017-09-01 10:36:49 +02:00
Henri Sivonen
e3e3eb5695 Bug 1378123 - Make inner window track whether there is an active PeerConnection. r=jib
MozReview-Commit-ID: 98Hwhnxtt1T
2017-08-04 13:28:15 +03:00
Eric Rahm
0c7237960f Bug 1386825 - Part 1: Remove MOZ_B2G from dom. r=bkelly
MozReview-Commit-ID: 1zzP2r01B7U
2017-08-08 14:41:05 -07:00
Blake Kaplan
7eaf7651f9 Bug 1374460 - Remove all code related to showModalDialog. r=smaug
MozReview-Commit-ID: GCGwBfIx2SJ
2017-07-13 16:42:03 -07:00
Kestrel
cb30f12dc8 Bug 918780 - Add new PopupControlState for permitting file/color picker popup regardless of dom_allowed_events. r=smaug
MozReview-Commit-ID: 1GbjQ6IkMsv
2016-04-24 04:49:00 +01:00
Ryan VanderMeulen
2ba426cf36 Backed out changesets f4378a5e6c7f and b7d81fea0b33 (bug 1159003) for causing bug 1383553. 2017-07-25 21:50:06 -04:00
Nicholas Nethercote
1a15a0b18a Bug 1382099 - Remove MOZ_WIDGET_GONK from dom/{base,ipc,plugins}. r=mccr8. 2017-07-21 10:52:30 +10:00
Andrea Marchesini
ffe7b0ef3b Bug 1159003 - setResourceTimingBufferSize shouldn't affect user timing, but we should clean user markers if we have memory pressure, r=bz 2017-07-20 12:57:08 +02:00
Alastor Wu
dab348aa6e Bug 1347791 - part2 : the tab would always be resumed when it goes to foreground first time. r=baku
Since now we move the block/resume logic to front-end side, we can remove
the changing from bug1319771 and other related bugs which are used to ensure the
pinned tab should be blocked successfully after session restore.

MozReview-Commit-ID: Ixe7tOvCEhv
2017-06-29 04:52:02 -07:00
Bevis Tseng
d05ffe5ac0 Bug 1352401 - Part 1: Define IndexedDB Counters in TabGroup and nsGlobalWindow. r=smaug
MozReview-Commit-ID: 4UCPvNv1paD
2017-04-18 18:21:34 +08:00
Olli Pettay
b52ee413c5 Bug 1374416 - don't dispatch the selectionchange event for pages that don't have such a listener registered, r=mystor 2017-06-22 21:01:27 +03:00
Bevis Tseng
38b75abc22 Backed out changeset 70d068cc946d (Bug 1374675) 2017-06-21 11:02:48 +08:00
Bevis Tseng
56add7c29b Bug 1352401 - Part 1: Define IndexedDB Counters in TabGroup and nsGlobalWindow. r=smaug
MozReview-Commit-ID: 4UCPvNv1paD
2017-04-18 18:21:34 +08:00
Bill McCloskey
85355b4f89 Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly)
MozReview-Commit-ID: Kchg4kqBERt
2017-06-15 20:16:25 -07:00
Ryan Hunt
8647454930 Bug 1373285 - Remove keyboard apz telemetry probes. r=smaug
These are no longer needed as we have the data we were looking for.

MozReview-Commit-ID: 3WlPng3mAwt
2017-06-15 13:55:26 -05:00
Michael Layzell
0cf1b46232 Bug 1367458 - Manage TabGroup::IsBackground passively to avoid Runnable overhead, r=ehsan
MozReview-Commit-ID: 9HVvV1omF8G
2017-06-13 12:49:30 -04:00
Carsten "Tomcat" Book
2fc015db6f Backed out changeset be04f96bf78b (bug 1347791) 2017-05-17 08:11:09 +02:00
Alastor Wu
2f0347a5b4 Bug 1347791 - part2 : the tab would always be resumed when it goes to foreground first time. r=baku
Since now we move the block/resume logic to front-end side, we can remove
the changing from bug1319771 and other related bugs which are used to ensure the
pinned tab should be blocked successfully after session restore.

MozReview-Commit-ID: Ixe7tOvCEhv
2017-05-17 11:56:03 +08:00
Andrea Marchesini
5af136db77 Bug 1363395 - nsGlobalWindow::GetLocation should support to be called on the outer window, r=smaug 2017-05-09 22:41:19 +02:00
Andrea Marchesini
43341968d2 Bug 1362003 - nsGlobalWindow::GetLocation doesn't need to receive an ErrorResult param, r=bz
Renaming nsGlobalWindow::GetLocation() to Location().
2017-05-08 15:49:31 +02:00
Ryan Hunt
760eb21393 Bug 1357880 - Add a telemetry probe for mousemove event listeners r=smaug, data-review=bsmedberg
This commit adds a telemetry probe to determine the percentage of pages
that ever have a 'mousemove' event listener added to the DOM. This is for
determining how often APZ key scrolling could handle interleaved mousemove
events.

A flag is added to nsPIDOMWindow to track whether a qualifying event
listener was ever added to the DOM for this window, and is updated by
EventListenerManager. There are several other similar flags to this.

The probe is reported in nsGlobalWindow::FreeInnerObjects() so that it
can be compared exactly with the non-passive keyboard listener APZ probe.

MozReview-Commit-ID: DqqCfrdRCGp
2017-04-26 18:56:51 -04:00
Andreas Farre
341eb7be49 Bug 1339909 - More eagarly clear throttle tracking timer. r=bkelly
Clear the throttle tracking timer in ClearAllTimeouts. Also clear it
in Suspend, and if mThrottleTrackingTimeouts isn't set restart the
timer if the document hasn't loaded.
2017-04-25 05:20:00 -04:00
L. David Baron
d1b825be2d Bug 1307134 - Rename nsGlobalWindow::EnsureSizeUpToDate to EnsureSizeAndPositionUpToDate. r=tnikkel
This is because it does ensure both, and some of the callers care about
size and some care about position.

MozReview-Commit-ID: 3e8II6Lf72X
2017-04-18 11:28:52 +09:00
L. David Baron
97cf276734 Bug 1307134 - Only flush in ancestor documents for window.mozInnerScreenX/Y. r=tnikkel
This reduces the amount of flushing we do when these APIs are called on
the root document, but increases the amount of flushing we do (probably
fixing existing bugs) when these APIs are called in a document at depth
three or more (if you consider the root depth one).

I considered the idea of adding a EnsurePositionUpToDate alias, but it
seems that some of the existing users of EnsureSizeUpToDate actually
care about position (e.g.,
nsLayoutUtils::GetDeviceContextForScreenInfo), so I just added a comment
instead.

MozReview-Commit-ID: B3L5DDQ5krc
2017-04-18 11:28:50 +09:00
Alastor Wu
c49d1c3d44 Bug 1347758 - part1 : window should know whehter there is any alive media component and decide to resume the tab or not. r=Ehsan
We should let window decide whether resume the media component, not document.
Because we might have media component which is not in DOM tree, but we still
want to play it.

Window should be resumed when all following conditions are true,
(1) the tab is in the foreground
(2) there is any alive media component (MediaElement/WebAudio/PlugIn...)
(3) the window is blocked (nsISuspendedTypes::SUSPENDED_BLOCK)

MozReview-Commit-ID: JXw5MA4FCxF
2017-03-24 14:43:26 +08:00
Iris Hsiao
a501d530f1 Backed out 6 changesets (bug 1347758) for eslint failure
Backed out changeset 9becd55242c1 (bug 1347758)
Backed out changeset 2abce19f5001 (bug 1347758)
Backed out changeset 80232d4c85d5 (bug 1347758)
Backed out changeset 1fd084ec34d4 (bug 1347758)
Backed out changeset cafb3c12027b (bug 1347758)
Backed out changeset 85846edfe957 (bug 1347758)
2017-03-24 16:58:08 +08:00
Alastor Wu
70f4131dc4 Bug 1347758 - part1 : window should know whehter there is any alive media component and decide to resume the tab or not. r=Ehsan
We should let window decide whether resume the media component, not document.
Because we might have media component which is not in DOM tree, but we still
want to play it.

Window should be resumed when all following conditions are true,
(1) the tab is in the foreground
(2) there is any alive media component (MediaElement/WebAudio/PlugIn...)
(3) the window is blocked (nsISuspendedTypes::SUSPENDED_BLOCK)

MozReview-Commit-ID: JXw5MA4FCxF
2017-03-24 12:01:43 +08:00
Ben Kelly
9d775ade42 Bug 1340201 Expose IsTopLevelWindow() and HadOriginalOpener() on nsPIDOMWindowOuter. r=bz 2017-02-16 14:39:28 -05:00
Bill McCloskey
4a1cd90b0e Bug 1337537 - Move Dispatcher.{cpp,h} to xpcom/threads (r=froydnj)
MozReview-Commit-ID: AYyKynUv4bX
2017-02-13 17:02:48 -08:00
Ehsan Akhgari
2a63a861b1 Bug 1336484 - Don't throttle timeouts in background tabs that are playing audio; r=baku
In websites such as Facebook Live, timeout chains are used to drive the
playback of a video or something similar in JavaScript.  Throttling the
minimum timeout values a tab playing a video from such websites in the
background could make the timeout based scheduling of video playback to
not work correctly, and cause audio buffer under-runs that are audible.

In order to address this, other major browsers don't throttle timeouts
in tabs that are playing audio.  This brings us to parity to other
browsers (even though we already do this for websites that use Web Audio
since we've had similar bug reports using the Web Audio API.)

The current audio agent setup that drives the tab audio notification
icons is currently tracking whether a Window is playing audio.  We use
this setup to decide whether to throttle timeouts when a window goes
into background.
2017-02-10 12:08:25 -05:00
Alastor Wu
f221f7b8c8 Bug 1328058 - part1 : notify block-stop event when the tab was resumed. r=baku
In present design, the tab would hide the unblocking icon when receives
the audio-playback event, but it means we can't hide the icon if the media isn't
audible.

For example, we won't show the unblocking icon for audio with audio track, but
we show the icon for audio with silent audio track which can only be detected
after starting decoding.

In this case, we can't receive the audio-playback after resuming that media.
Therefore, we should dispatch the different event to notify tab UI that the
tab has already been resumed.

MozReview-Commit-ID: 3xCWQU7nVCl
2017-02-03 14:47:08 +08:00
Phil Ringnalda
54d1f898e0 Backed out 5 changesets (bug 1328058) for timing out in browser_block_silentAudioTrack_media.js
CLOSED TREE

Backed out changeset 0c48cff3db5d (bug 1328058)
Backed out changeset 37d35ca95b1f (bug 1328058)
Backed out changeset 0c177bdf5ec3 (bug 1328058)
Backed out changeset b369d9999b8a (bug 1328058)
Backed out changeset 61dbcbe35565 (bug 1328058)
2017-02-02 20:59:34 -08:00
Alastor Wu
e88f65c8de Bug 1328058 - part1 : notify block-stop event when the tab was resumed. r=baku
In present design, the tab would hide the unblocking icon when receives
the audio-playback event, but it means we can't hide the icon if the media isn't
audible.

For example, we won't show the unblocking icon for audio with audio track, but
we show the icon for audio with silent audio track which can only be detected
after starting decoding.

In this case, we can't receive the audio-playback after resuming that media.
Therefore, we should dispatch the different event to notify tab UI that the
tab has already been resumed.

MozReview-Commit-ID: 3xCWQU7nVCl
2017-02-03 11:25:04 +08:00
Alastor Wu
9b3c33d251 Bug 1319771 - part2 : resume foreground window if it was still be blocked. r=baku
In previous patch, we modify the behavior of nsDocument, now it would only resume
window when document has active media components.

However, it causes another issue. If the tab really goes to foreground, but
there is no active media component, the tab would still be blocked and it won't
be resumed anymore.

Therefore, we need to resume it by ourself if the tab is on the foreground but
doesn't be resumed yet.

MozReview-Commit-ID: EdnQ7sRkSJK
2017-02-03 10:50:07 +08:00
Michael Layzell
f41da1d9f2 Bug 1331087 - Part 1: Disable the largeAllocation header by default outside of Win32 builds, r=ehsan
MozReview-Commit-ID: 4jUFLv4fMZa
2017-01-31 14:08:20 -05:00
Bill McCloskey
be49fc768f Bug 1332494 - Move TaskCategory definition to xpcom/threads/TaskCategory.h (r=froydnj)
MozReview-Commit-ID: ET43PbGRgxl
2017-01-26 14:45:58 -08:00
Kate McKinley
0277b62d89 Bug 1329940 - Ignore window.opener for password manager warnings r=baku,jwatt,MattN
MozReview-Commit-ID: KiIR6WEddgO
2017-01-12 16:57:44 -08:00
Michael Layzell
578b151b40 Bug 1331525 - Send the Large-Allocation success message to the correct document, r=ehsan
MozReview-Commit-ID: E44hlMI2EE3
2017-01-19 15:26:28 -05:00
Bill McCloskey
d34d4e1c67 Bug 1320753 - Make TabGroup event target be a ThrottledEventQueue for timers, workers (r=bkelly)
MozReview-Commit-ID: FCfYz02r8yI
2016-12-23 11:48:13 -08:00
Boris Zbarsky
3873abb4ad Bug 1320801 part 5. Switch from ShouldResistFingerprinting to ResistFingerprinting (use the caller type, not the document principal) in nsGlobalWindow's devicePixelRatio getter. r=bkelly 2016-12-22 11:05:54 -08:00
Ehsan Akhgari
3684e4e8de Bug 1323203 - Devirtualize nsPIDOMWindow::IsRunningTimeout(); r=bkelly 2016-12-13 14:27:03 -05:00