Commit Graph

893 Commits

Author SHA1 Message Date
Videet
01ad0f3438 Bug 547707: replaced hardcoded strings by definitions in nsMimeTypes.h r=gerald
MozReview-Commit-ID: 6f85pRUe8Tg

--HG--
extra : rebase_source : f41797530bf9211f3fe875a5da860132f5bd2c7c
2018-03-06 17:43:57 +01:00
Emilio Cobos Álvarez
2988d4e66d Bug 1442207: Remove unneeded arguments to nsIMutationObserver. r=smaug
aDocument is always content->OwnerDoc().
aContainer is always content->GetParent().

Differential Revision: https://phabricator.services.mozilla.com/D664

MozReview-Commit-ID: 4xwPCOnhyIL
2018-03-01 22:45:17 +01:00
Dan Glastonbury
80cd024fd7 Bug 1440555 - P1: Allow setVisible to take effect before decoder creation. r=cpearce
MozReview-Commit-ID: GSNM6esm0fW

--HG--
extra : rebase_source : 89a9836a48a93f7dfc5ce78bc6fd8b2c11da9c0e
2018-02-27 14:33:41 +10:00
Ben Kelly
75bf35692e Bug 1440407 P2 Remove some unnecessary nsPIDOMWindowInner QI to nsIGlobalObject. r=mystor 2018-02-22 14:28:39 -08:00
Chris Pearce
0c49e7e1c3 Bug 1439473 - Improve logging of HTMLMediaElement JS API calls. r=kamidphish
To make it easier to tell what HTMLMediaElement API functions sites' JS is
calling, we should add more mozlogs. This will make it easier to figure out why
things aren't playing.

MozReview-Commit-ID: 9eVvkagGNgf

--HG--
extra : rebase_source : 153a68f27ec5c2b17c3c5a9e31d54b98ccc1a1ea
2018-02-15 16:39:44 +13:00
Csoregi Natalia
0380e6fef4 Backed out changeset 2d7a7976ee3a (bug 1439473) for bustage HTMLMediaElement.cpp:4032. CLOSED TREE 2018-02-22 04:43:29 +02:00
Chris Pearce
c1c1fadb94 Bug 1439473 - Improve logging of HTMLMediaElement JS API calls. r=kamidphish
To make it easier to tell what HTMLMediaElement API functions sites' JS is
calling, we should add more mozlogs. This will make it easier to figure out why
things aren't playing.

MozReview-Commit-ID: 9eVvkagGNgf

--HG--
extra : rebase_source : 6f117a036fc5ce10413660fb9fd5d418d74e159d
2018-02-15 16:39:44 +13:00
Adrian Wielgosik
244e676451 Bug 1438956 - Modify HTMLMediaElement::Seek to avoid undefined behavior. r=bz
Previously, in IsInRanges, aIntervalIndex could have values between -1..length-1.
After the change, the values are in range 0..length, which makes it possible to use unsigned ints and avoid UB.

MozReview-Commit-ID: 39SIzXRHv91

--HG--
extra : rebase_source : d0efebb4bc13694eb7d2048cd2eae2d6386238cf
2018-02-17 19:29:43 +01:00
Adrian Wielgosik
8cb213f738 Bug 1438956 - Add inline Start/End TimeRanges methods for C++ users. r=bz
MozReview-Commit-ID: DcLsYyKV7WX

--HG--
extra : rebase_source : 1891f87a72380ed6f57d1790659c10ea416ccf15
2018-02-16 19:36:40 +01:00
Adrian Wielgosik
d729e5e045 Bug 1438956 - Remove nsIDOMTimeRanges. r=bz
MozReview-Commit-ID: DAgQ0OkSxkq

--HG--
extra : rebase_source : e995b4d76186032fc048bc7b63f4e1e2aee046b4
2018-02-16 19:34:28 +01:00
Kyle Machulis
4040ae7b11 Bug 1407040 - Remove C++ usage of nsIDOMHTMLMediaElement; r=bz
MozReview-Commit-ID: 6MGS4UqKwrU

--HG--
extra : rebase_source : 19fe880afb9a7a0a7ff2405c8144cdb96b9fd5aa
2018-02-14 21:22:38 -08:00
Kyle Machulis
b8e88868d6 Bug 1407040 - Change HTMLMediaElement QIs to FromContent calls; r=bz
MozReview-Commit-ID: JoHA0LbJnu9

--HG--
extra : rebase_source : c33c0d456ec5aeb7fec9867f5a55a401ec5ddf1e
2018-02-14 21:17:45 -08:00
Kyle Machulis
9e159ac69d Bug 1407040 - Change HTMLMediaElement XPCOM Enums to WebIDL Enums; r=bz
MozReview-Commit-ID: 55GnbaL2HKl

--HG--
extra : rebase_source : 5bb6c927443bf6adcfe594e69bd70c3b597b9ea4
2018-02-14 19:23:32 -08:00
Chris Pearce
595dccd4e7 Bug 1431674 - Backed out changeset 9d197f1860e6. r=backout
MozReview-Commit-ID: wP0aucXgzA

--HG--
extra : rebase_source : ad67234e7dff431c875bce5aac5b88e3c497dc78
2018-02-07 15:28:48 +13:00
Chris Pearce
6609188b9e Bug 1431674 - Backed out changeset 3e22200b7e83. r=backout
The changes in bug 1324883 regressed YouTube, so back them out.

The changes in bug 1324883 were trying to cause the media cache to be cleared
on tab close and on CTRL+F5 reload (i.e. a bypass cache-reload) but they are
causing problems on YouTube,  which doesn't use the media cache and instead
uses MSE.

MozReview-Commit-ID: Hx2cehZ2wm1

--HG--
extra : rebase_source : fa0bd85570746e60341e8e2d3f874f9bd30c0232
2018-02-07 15:28:07 +13:00
Andreas Pehrson
85ded5b958 Bug 1299515 - Plumb MediaStreamTrack enabled state to sources. r=jib
MozReview-Commit-ID: Eg1g9JtLmOz

--HG--
extra : rebase_source : 73057e1093d487736f69addca346b05c48d8d280
2017-11-10 15:55:42 +01:00
Andrea Marchesini
c6da271117 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Brindusan Cristian
368c3d5b6b Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Andrea Marchesini
6480b95ba3 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Honza Bambas
c3f3b8d161 Bug 1391277 - Investigative logging in CSP: log when 'upgrade-insecure-requests' CSP is added to the CSP context, r=bz 2018-01-11 10:57:00 +02:00
Kilik Kuo
811a2496ae Bug 1429284 - Expose compositor dropped frame count to HTMLMediaElement's debug info. r=jwwang
MozReview-Commit-ID: GYtHxdsGSk1

--HG--
extra : rebase_source : 2ba90d5899c2a268879722476da81e9a07b83a88
2018-01-10 12:07:47 +08:00
Emilio Cobos Álvarez
c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez
ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez
c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Gerald Squelart
1b357db99b Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0

--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
2017-10-10 17:55:27 +11:00
Gerald Squelart
16a9a0b9d7 Bug 1407810 - Implement HTMLMediaElement::Moz{Enable,Request}DebugLog - r=jwwang
MozReview-Commit-ID: 7Hhy6qBVjDk

--HG--
extra : rebase_source : 5eb33db2c13a4add3bef693af1e558b256732599
2017-10-16 16:18:58 +11:00
JW Wang
2f2083875c Bug 1422677. P2 - remove the side effect of MediaDecoder::CanPlayThrough(). r=bechen,gerald
We calculate 'canplaythrough' in ChannelMediaDecoder::DownloadProgressed() and
send updates to MDSM.

MozReview-Commit-ID: KAeDciPAUKs

--HG--
extra : rebase_source : 64d7705fb5ca6b1003664ac313ad1ae0ab1bbea6
2017-12-01 14:34:58 +08:00
Andreas Pehrson
8d4be05939 Bug 1419363 - Switch to WeakPtr. r=jib
--HG--
extra : rebase_source : 7148328b61e25c3eac983e41f1ece633bf2206bf
2017-12-01 10:52:18 -05:00
Alastor Wu
d7ce5bde2b Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH

--HG--
extra : rebase_source : 83e53a0035d72984494948f131a5d6e516baa577
2017-11-30 10:50:21 +08:00
Alastor Wu
258e1d56df Bug 1420488 - part1 : bless media if media has started playing before. r=jwwang
If the media has started playing before, bless it and it would always be allowed
to autoplay.

MozReview-Commit-ID: 4GqMARLXULU

--HG--
extra : rebase_source : 2fdb3937156147755f8e387b1d84311ae1d37ce4
2017-11-29 18:59:56 +08:00
Sebastian Hengst
c4e3d3a858 Backed out 2 changesets (bug 1420488) for eslint failures in toolkit/content/tests/browser/browser_autoplay_policy_play_twice.js. r=backout
Backed out changeset 92bd0fcb67d5 (bug 1420488)
Backed out changeset 0f211029517c (bug 1420488)
2017-11-29 17:31:28 +02:00
Alastor Wu
28c25979d7 Bug 1420488 - part1 : bless media if media has started playing before. r=jwwang
If the media has started playing before, bless it and it would always be allowed
to autoplay.

MozReview-Commit-ID: 28X4TmG25aJ

--HG--
extra : rebase_source : 3fd7cb16da9e7f925ad7020fb74c48537e08a996
2017-11-29 18:05:56 +08:00
Kilik Kuo
fea69fe34f Bug 1419897 - Crash in mozilla::dom::HTMLMediaElement::RemoveMediaKeys. r=jwwang
The process of |TryRemoveMediaKeysAssociation()| is a 2-step async procedue in mainthread.
mMediaKeys might be set to null inside |NotifyOwnerDocumentActivityChanged()| in between
|TryRemoveMediaKeysAssociation| and |RemoveMediaKeys|.

MozReview-Commit-ID: HtiADt3UTvp

--HG--
extra : rebase_source : 9eff95040b3e900fb778187e4e432bce0b41396b
2017-11-28 23:06:34 +08:00
Sebastian Hengst
706ac3aea0 Backed out 3 changesets (bug 1415478) for frequently asserting in own test test_autoplay_policy.html at MediaDecoderStateMachine.cpp:989. r=backout
Backed out changeset 6ba103fe1caf (bug 1415478)
Backed out changeset df6721a3584f (bug 1415478)
Backed out changeset 8a802839959b (bug 1415478)

--HG--
extra : rebase_source : be4296b1b36005195897de5544941b58895de661
2017-11-27 19:57:34 +02:00
Alastor Wu
a6a6078915 Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH

--HG--
extra : rebase_source : 97315d90fa46a16289135ac7490bd0dab651d682
2017-11-27 19:20:15 +08:00
Alastor Wu
62e836ef58 Bug 1420192 - when disable autoplay, allow script calls play() once user triggered load() or seek(). r=jwwang
This patch is mainly reverting the changing of bug1382574 part3, but not all the same.

Since youtube would call load() when user clicks to play, and then call play()
later. For the old pref (checking user-input-play), we should still allow the
following play() even it's not triggered via user input. It's also same for
seeking, Youtube would call play() after seeking completed.

In this patch, we would allow the script-calling once play() if user has called load()
or seek() before that.

MozReview-Commit-ID: 1UcxRCVfhnR

--HG--
extra : rebase_source : c72212ebf29ea624128a8190dab67e1197f1f198
2017-11-27 10:55:02 +08:00
dluca
85d0512151 Backed out 3 changesets (bug 1415478) for frequently asserting at dom/media/MediaDecoderStateMachine.cpp:1009 on a CLOSED TREE
Backed out changeset 447d895b350d (bug 1415478)
Backed out changeset d855c032c823 (bug 1415478)
Backed out changeset 6739012c4bdf (bug 1415478)
2017-11-24 18:50:53 +02:00
Alastor Wu
35a99cd8d3 Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH

--HG--
extra : rebase_source : fa8d1bfd2fb667e974dbe499d7f8215273d4fa10
2017-11-24 11:14:26 +08:00
Kris Maglione
1c66345e09 Bug 1415352: Part 1a - Pass subject principal through to ParseAttribute. r=bz
This is necessary in order to parse style attributes using the subject
principal of the caller, rather than defaulting to the page principal.

MozReview-Commit-ID: GIshajQ28la

--HG--
extra : rebase_source : 5dba46f61d70ec647cae16383b62961ac72d2f47
2017-11-01 20:35:52 -07:00
JW Wang
60838e86a4 Bug 1417869. P2 - abort the load algorithm early if media not allowed to load. r=jya
MozReview-Commit-ID: DUxyo4ywCPW

--HG--
extra : rebase_source : 8a33ac2d50e4fc7a1ccad6447063745c77744aeb
2017-11-21 14:02:13 +08:00
Alastor Wu
fe30dc5702 Bug 1382574 - part3 : remove HTMLMediaElement::mHasUserInteraction. r=jwwang
We won't need to check the whether the media element is interacted with user for
autoplay anymore.

MozReview-Commit-ID: 2tll9LtGyVR

--HG--
extra : rebase_source : 0047f482c2932e7063fc556ce8c306ff276efbfd
2017-11-22 00:33:23 +08:00
Alastor Wu
5acb978a09 Bug 1382574 - part1 : create new class AutoplayPolicy to handle autoplay logic. r=jwwang
AutoplayPolicy is used to manage autoplay logic for all kinds of media,
including MediaElement, Web Audio and Web Speech.

MozReview-Commit-ID: R1TxMkarIw

--HG--
extra : rebase_source : 8c608a1d12c8e205391a91f22e1532bc4f2c8f16
2017-11-22 00:33:16 +08:00
Andreas Pehrson
d29c6d7f9e Bug 1208378 - Distinguish track sinks on whether their presence allows a source to stop. r=jib
There are currently two types of sinks for a MediaStreamTrackSource.
Actual MediaStreamTracks and HTMLMediaElement::StreamCaptureTrackSource.
A source needs actual tracks as sinks to not stop() the underlying source.

A StreamCaptureTrackSource, however, should not count toward keeping a source
alive (otherwise HTMLMediaElement.mozCaptureStream() would prevent track.stop()
from working on the track feeding the media element).

MozReview-Commit-ID: 9MBAyZFZUIQ

--HG--
extra : rebase_source : a73f182b95281baf4f44f7ae82158e4a6bce42eb
2017-11-10 15:08:02 +01:00
Andreas Pehrson
167e43c316 Bug 1208378 - Implement MediaStreamTrack's muted state and events. r=jib,smaug
MozReview-Commit-ID: 1Sp9utMnWXI

--HG--
extra : rebase_source : f2d1036ab37ed9882c0bb9aa1d7b7d68eb7799e4
2017-11-06 19:03:52 +01:00
Andreas Pehrson
2b9f5cc3cc Bug 1208378 - Make HTMLMediaElement register its Sink. r=jib
This is a drive-by fix in that it is not directly related to what the bug is
solving. However, making HTMLMediaElement register as a sink is important,
and pairing it with the WeakPtr<Sink> patch reduces risk greatly.

MozReview-Commit-ID: 7pMDw3MG0ZB

--HG--
extra : rebase_source : e2f2b3a12b9921373518d94a083adda23bfe853b
2017-11-06 18:08:26 +01:00
Timothy Guan-tin Chien
93fb9c8b32 Bug 1327097 - Part III, Trap mouse/touch/pointer events in audio/video element, r=smaug
This patch implements HTMLMediaElement::GetEventTargetParent and set
aVisitor.mCanHandle to false to mouse/touch/pointer events, when
the media control is present. This tells the event dispatcher that
these events are supposed to be handled exclusively by the
videocontrol binding within the media element, and should not
dispatch nor consumed by the content.

MozReview-Commit-ID: BXWZX9SYsuC

--HG--
extra : rebase_source : 5d6633a2e1a456d2d619b6f68498065d94c68c40
2017-11-17 11:07:12 +08:00
JW Wang
1f62c1d92b Bug 1417869. P3 - pass descriptive messages to NetworkError(). r=jya
MozReview-Commit-ID: 6yaFJvXG3g8

--HG--
extra : rebase_source : 2d1c851098be7eb880a01432c504c6db96d86756
extra : source : a30f9699f49687b23d4ccf955d7a0af8ce0c7653
2017-11-17 11:07:30 +08:00
JW Wang
5e22f505ad Bug 1417869. P2 - pass descriptive messages to NotifyLoadError(). r=jya
MozReview-Commit-ID: JGPOsLvUJFX

--HG--
extra : rebase_source : dd69055ba99457b83b7a55dc95c7eb39483ca0cb
extra : source : aac781526979f1c57b19f839fc90638a998e204d
2017-11-17 10:46:33 +08:00
JW Wang
232dbce4f6 Bug 1417869. P1 - show more descriptive messages for MEDIA_ERR_SRC_NOT_SUPPORTED when SelectResource() fails. r=jya
MozReview-Commit-ID: CySbHaJCaC5

--HG--
extra : rebase_source : fa907c6347b7c65e0b3196bbd370e7154307e645
extra : source : a393280da765a4602aa1486db8f891cf0fe188ee
2017-11-17 10:32:41 +08:00