Commit Graph

1985 Commits

Author SHA1 Message Date
ctai
dea6f82442 Bug 1325053 - Remove media attribute code and set the currentSrc attribute to urlString after type checking in HTMLMediaElement. r=jwwang
According to current WhatWG HTML spec, the checking of media attribute in SourceElement is removed. Fix the Gecko code to reflect current spec.

MozReview-Commit-ID: 43d9zL9Fvih

--HG--
extra : rebase_source : beb87387cb1d55eb42713fbb0d344c0c64a0b6da
2016-12-21 20:42:48 +08:00
Carsten "Tomcat" Book
e8b62ac15b merge mozilla-inbound to mozilla-central a=merge 2016-12-21 16:57:08 +01:00
Michael Layzell
0fa642800b Bug 1315105 - Part 2: Implement <link rel=prerender> behind a pref, r=smaug
MozReview-Commit-ID: ARET98o1FTU

--HG--
extra : rebase_source : fd549baa1a4a180db1ca6701191f081033811d0f
2016-12-19 15:05:31 +08:00
Cameron McCormack
d4d8ba1d5f Bug 1324624 - stylo: Mark currently failing crashtests with asserts-if(stylo,...). r=xidorn
MozReview-Commit-ID: 7iiwRwiQ8s4
2016-12-21 15:42:36 +08:00
ctai
3ce829affc Bug 1323369 - Make HTMLMediaElement::UnbindFromTree to follow WhatWG HTML spec. r=jwwang
W3C HTML5 spec isn't very actively maintained now. WhatWG HTML spec:
When a media element is removed from a Document, the user agent must run the following steps:
Below is the related statement in WhatWG HTML spec:
Await a stable state, allowing the task that removed the media element from the Document to continue. The synchronous section consists of all the remaining steps of this algorithm. (Steps in the synchronous section are marked with .)
 If the media element is in a document, abort these steps.
 Run the internal pause steps for the media element.

MozReview-Commit-ID: H4EgPqj2YxD

--HG--
extra : rebase_source : 2c15adaaadd955662797dcf1c5158927f16bab97
2016-12-13 15:34:14 +08:00
Wes Kocher
0b3c388b2f Merge m-c to autoland, a=merge 2016-12-20 11:48:21 -08:00
Wes Kocher
584a2f0f62 Merge inbound to central, a=merge
MozReview-Commit-ID: Cr9L1dhIzP2
2016-12-20 11:41:57 -08:00
Jessica Jong
556aae19f0 Bug 1286182 - Implement the layout for <input type=date>. r=mconley,smaug
--HG--
rename : dom/html/test/forms/test_input_time_focus_blur_events.html => dom/html/test/forms/test_input_datetime_focus_blur_events.html
2016-12-19 00:50:00 +08:00
Jean-Yves Avenard
5203c55c49 Bug 1319992: P5. Don't attempt to estimate readyState when ended. r=jwwang
Buffered range is now calculated asynchronously. It may not be up to date by the time the MDSM has entered ended mode.
There's no point estimating readyState in ended mode anyway: we know what it is...

MozReview-Commit-ID: ErGsAwBzeXI

--HG--
extra : rebase_source : db3bde99b21f5b4377ce88509979f1499b1cd677
2016-12-14 17:35:36 +11:00
Masayuki Nakano
7436f01057 Bug 564411 Move all methods/attributes of nsIEditorIMESupport to nsIEditor r=smaug
Doing QI from nsIEditor to nsIEditorIMESupport doesn't make sense because editor should always support all methods and attributes of nsIEditorIMESupport (it does NOT mean that all nsIEditor implementation need to support IME).

This patch moves all of them to nsIEditor for avoiding redundant QIs.

MozReview-Commit-ID: DzIKuGHG4iy

--HG--
extra : rebase_source : cc5e9a6ae4572ebe461d9770ffa5c23d33dc8526
2016-12-20 21:47:31 +09:00
Carsten "Tomcat" Book
51614d31e4 Backed out changeset 059753ec9117 (bug 1315105) for test failures in own test
--HG--
extra : rebase_source : de2846d1205d3e885c1040379f2816629a925d22
2016-12-19 15:59:14 +01:00
Olli Pettay
2f85471cc3 Bug 1323815, FocusEvent.relatedTarget should work consistently with MouseEvent.relatedTarget, r=masayuki
--HG--
extra : rebase_source : ee11583116bd52618f6bfba063e920e8064c1ec3
2016-12-19 13:36:48 +02:00
Michael Layzell
b5fd619e72 Bug 1315105 - Part 2: Implement <link rel=prerender> behind a pref, r=smaug
MozReview-Commit-ID: ARET98o1FTU
2016-12-19 15:05:31 +08:00
Carsten "Tomcat" Book
a244c7fb4a merge mozilla-inbound to mozilla-central a=merge 2016-12-16 16:04:50 +01:00
Carsten "Tomcat" Book
8ac85b373f Backed out changeset f982627067f7 (bug 1319992) 2016-12-16 12:41:05 +01:00
Cameron McCormack
366f6eb24d Bug 1323892 - Disable currently crashing stylo crashtests. r=xidorn
MozReview-Commit-ID: 2BNjdBWdT5V
2016-12-16 18:54:41 +08:00
Henri Sivonen
32a79394c1 Bug 1322455 - When cloning an <input>, avoid re-initializing checkedness in DoneCreatingElement. r=smaug.
MozReview-Commit-ID: wlbZ7grT2M

--HG--
extra : rebase_source : e8e8335b7a478c83a629c6692deae932a4edcc67
2016-12-15 18:25:02 +02:00
Xidorn Quan
0053eb4c08 Bug 1323919 - Rename nsIMediaList.h to nsMediaList.h. r=heycam
MozReview-Commit-ID: Ake5srkKJbf

--HG--
rename : layout/style/nsIMediaList.h => layout/style/nsMediaList.h
extra : rebase_source : 05de33770a7bf0b5d01672571bde00506853fcfe
2016-12-16 14:50:36 +11:00
Jean-Yves Avenard
d2f0d0608b Bug 1319992: P5. Don't attempt to estimate readyState when ended. r=jwwang
Buffered range is now calculated asynchronously. It may not be up to date by the time the MDSM has entered ended mode.
There's no point estimating readyState in ended mode anyway: we know what it is...

MozReview-Commit-ID: ErGsAwBzeXI

--HG--
extra : rebase_source : bd8cecca96e93114e970e09faf09a80f56bf4c98
2016-12-14 17:35:36 +11:00
Edgar Chen
2f500c507d Bug 1274159 - Part 2-1: Include the name of relevant interface in nsHTMLTagList.h; r=bz
MozReview-Commit-ID: 8D29JfJcMG7
2016-11-08 15:45:28 +08:00
ctai
3a16a07779 Bug 1222980 - Dispatch |QueueLoadFromSourceTask| to main thread. And end the synchronous section and asynchronously await a stable state when the src is not set. r=jwwang.
Dispatch |QueueLoadFromSourceTask| to main thread to make sure the task will be executed later than loadstart event. And when the src get errors, we need to end the synchronous section.

MozReview-Commit-ID: EQ0jVIMnqoZ

--HG--
extra : rebase_source : 876c62669f56581e903830beddbf0ce4435366e2
2016-12-13 15:45:59 +08:00
Edgar Chen
8a160d47da Bug 1318630 - Part 2: Create correct html element object when "is" is specified for custom element; r=wchen
MozReview-Commit-ID: B7cEhy5ZqL3
2016-12-08 09:33:44 -10:00
Alastor Wu
ce4c37a7ff Bug 1320005 - don't show the 'play tab' icon for the media element without audio track. r=baku
MozReview-Commit-ID: K42I0yWaI7N

--HG--
extra : rebase_source : 6b2cd50bb327a644f9092c1e018203854d3d899f
2016-12-13 22:47:13 +08:00
Carsten "Tomcat" Book
eb5f79ce29 Merge mozilla-central to autoland 2016-12-13 16:53:28 +01:00
Emilio Cobos Álvarez
d791eef979 Bug 1029867: Remove useless nsCSSParser::mHTMLMediaMode. r=heycam
MozReview-Commit-ID: AFtd0G4oP3R
2016-12-13 11:39:32 +01:00
Andrew McCreight
fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd
826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight
e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Xidorn Quan
92e0c75164 Bug 1323153 - Not include ElementInlines in headers. r=smaug
MozReview-Commit-ID: Gusow6LTiJI

--HG--
extra : rebase_source : 89f6c2b02dda7d216dfe6ff4ed27e8d70cd064f3
2016-12-13 18:11:04 +11:00
Kaku Kuo
f3b6c19f63 Bug 1244768 part 9 - modify the play() method; r=alwu,bz,jwwang
4.8.12.8
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play

MozReview-Commit-ID: 5r4xOIQwOEr

--HG--
extra : rebase_source : a603e8865b8873a31fafdc7004d01bc2cd840d2c
2016-12-01 14:54:33 +08:00
Kaku Kuo
daf1b64ef4 Bug 1244768 part 8 - extract the HTMLMediaElement::CreateDOMPromise() utility; r=jwwang
MozReview-Commit-ID: 28NopfA8lgV

--HG--
extra : rebase_source : d1ff22945e40a3df99319fe6e712494906163551
extra : intermediate-source : b409ef682a189ffa0bbb79e84fa0b6bca84f145b
extra : source : 7b00c027ee6e7b85dcc65bb4e304f048aa85a944
2016-08-08 16:53:20 +08:00
Kaku Kuo
89e7d04f16 Bug 1244768 part 7 - refactor the Play() and PlayInternal() methods; r=jwwang
MozReview-Commit-ID: CP00vERdWMv

--HG--
extra : rebase_source : 87a269a7183ad73b703aad6e3e873df7d79e4c62
extra : intermediate-source : 339778ed6f0b202d03b87436845fe0046e1ccc2c
extra : source : 3c3d972cd4a09ca6e3ec1ef60fdf679023229208
2016-08-08 14:52:00 +08:00
Kaku Kuo
a68e2e663c Bug 1244768 part 6 - modify the internal pause steps; r=jwwang
4.8.12.8
https://html.spec.whatwg.org/multipage/embedded-content.html#internal-pause-steps

MozReview-Commit-ID: Dt0VVbXLrhw

--HG--
extra : rebase_source : 1ed05897e67cd96de544e7f53c5f9ad1223aa27b
extra : intermediate-source : f6772d737e12b27f049e5d6235ecbbfbfc22f283
extra : source : 8e299b404ff6924f81e3bd3b0afdbe44a8dc957b
2016-08-18 20:05:13 +08:00
Kaku Kuo
599fed6bd5 Bug 1244768 part 5 - reject pending play promises while the playback reaching the end; r=jwwang
4.8.12.8
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-ended

MozReview-Commit-ID: H7Tw0XGzpW0

--HG--
extra : rebase_source : 409c1bb62baf1dbffff4d22c8d0494dc8a41147e
extra : intermediate-source : b5347204487023cdee9c04ef735addafa2124887
extra : source : f89758cbd1109ab92db1a644caa7c450a45757c0
2016-08-19 11:52:04 +08:00
Kaku Kuo
85f1c5b29d Bug 1244768 part 4 - call NotifyAboutPlaying() while ready state is changed; r=jwwang
4.8.12.7
https://html.spec.whatwg.org/multipage/embedded-content.html#ready-states

MozReview-Commit-ID: 1RUIU6Rw2SF

--HG--
extra : rebase_source : 81cb3107414d30d487e386519670e0f1864e3a6a
extra : intermediate-source : 4f51bbd1f1d68a6fa18f1502712a168171ba64ce
extra : source : 5c2b8029b3be04c739fca36b3e617c9996928a69
2016-08-05 16:42:31 +08:00
Kaku Kuo
bfa7d7c710 Bug 1244768 part 3 - modify the resource selection algorithm; r=jwwang
4.8.12.5
https://html.spec.whatwg.org/multipage/embedded-content.html#concept-media-load-algorithm
https://html.spec.whatwg.org/multipage/embedded-content.html#dedicated-media-source-failure-steps

MozReview-Commit-ID: DKFQC4v92Vi

--HG--
extra : rebase_source : ad5d4e782ce0af9879242d1c2830cf7c4461faac
extra : intermediate-source : e823b33657216c0ae0bf082c2d0820e9b6258eec
extra : source : 649a119bf21c1cd89d0d147604892147ab6692fc
2016-08-18 20:04:27 +08:00
Kaku Kuo
210ff4354f Bug 1244768 part 2 - modify media element load algorith; r=jwwang
4.8.12.5
https://html.spec.whatwg.org/multipage/embedded-content.html#media-element-load-algorithim

The living WHATWG spec has been changed since I implemented this patch.
Will update to the latest spec later.

MozReview-Commit-ID: 7U1AC2Ua83Z

--HG--
extra : rebase_source : d4b7c5103b29271cfdde5d180d7e7c8a65d89b2f
extra : intermediate-source : 616bc473295c8673e3cfae726b8a19c64b2906f1
extra : source : 69d8b411ee5f85139f3f40ce4bc7a4d7ad018b8d
2016-08-18 20:03:48 +08:00
Kaku Kuo
3cc7546ff4 Bug 1244768 part 1 - implement utilities which are the foundation of promise-based play operation; r=jwwang
In this patch, the following utilities are implemented:
(1) A list to keep pending promises of a HTMLMediaElement.
(2) A method to take pending promises out from the HTMLMediaElement.
(3) A global function to resolve the passed promises.
(4) A global function to reject the passed promises with an error code.
(5) A method to asynchronously resolve all pending promises of a HTMLMediaElement.
(6) A method to asynchronously reject all pending promises of a HTMLMediaElement.
(7) A method to dispatch a 'playing' event and resolve all the pending play promises.

All the above functionalities are defined at WHATWG 4.8.12.8:
https://html.spec.whatwg.org/multipage/embedded-content.html#list-of-pending-play-promises

This patch also implements two MediaEvent classes, nsResolveOrRejectPendingPlayPromisesRunner and nsNotifyAboutPlayingRunner, which help (5), (6) and (7).

This patch also implements a list of already-dispatched nsResolveOrRejectPendingPlayPromisesRunner; we keep tracing these tasks because the load algorithm resolves/rejects all already-dispatched pending play promises (in patch 2).

MozReview-Commit-ID: EUirNqDfttk

--HG--
extra : rebase_source : e48196e77341926900747b3f9477c5ee9ed28f62
extra : intermediate-source : 9b349c0e9eedad8822a1b8e8ef375ac6cb0b635a
extra : source : 75ee3b084edb68709503c98ad7b72850af7bb9c8
2016-12-08 14:34:39 -10:00
JW Wang
a7e9648832 Bug 1322087. Part 2 - move readyState to HAVE_ENOUGH_DATA when we have no more data to fetch. r=cpearce
http://searchfox.org/mozilla-central/rev/dc8cf05768b83a6ef0b4039edd6efddd56ee4109/dom/media/MediaDecoderStateMachine.cpp#1065
Changing nextFrameStatus to UNAVAILABLE might change readyState to HAVE_CURRENT_DATA and cause 'waiting' to fire.
It doesn't make sense to fire 'waiting' at the end of playback.

http://searchfox.org/mozilla-central/rev/dc8cf05768b83a6ef0b4039edd6efddd56ee4109/dom/html/HTMLMediaElement.cpp#5423
Note the check for Ended() doesn't work as expected to prevent 'waiting' from firing at the end of playback
because of the way how TailDispatcher schedules stateChange tasks.

This patch keeps readyState in HAVE_ENOUGH_DATA when playback is near the end for wanting no more data.
readyState will change to HAVE_CURRENT_DATA when the playing state of MediaDecoder is changed to PLAY_STATE_ENDED.

MozReview-Commit-ID: 6EspaD2hhx

--HG--
extra : rebase_source : 345aad2757d684e24863ae2daf506b035955efe7
extra : source : 56736efbab04a5c2d66faf2514bac93acf4c79f7
2016-12-07 10:41:33 -10:00
JW Wang
8e49c2b21d Bug 1322087. Part 1 - move |if (!mFirstFrameLoaded)| up to save some duplicate checks. r=cpearce
MozReview-Commit-ID: 77duxxtEAQP

--HG--
extra : rebase_source : 19810302dff31bdc02f12d79d1518ad9793fabc0
extra : source : bd86f44a0c38b8d60fafd8bdb26bdb786662c90f
2016-12-06 15:54:51 -10:00
Kaku Kuo
36f4bc694f Bug 1321497 - correct the logic of resuming from AudioChannel; r=alwu,jwwang
MozReview-Commit-ID: JxeqdzADlrU

--HG--
extra : rebase_source : 0263f14e4cdf482150af2a1697c201cedbe5ddcb
2016-12-01 16:30:18 +08:00
Alastor Wu
24c6192cfe Bug 1321410 - stop agent after cycle collection. r=jwwang
The crash reason seems the mOwner has been released, so we shouldn't call any method which would call mOwner.
The AudioChannelAgentCallback could only be called from two parts, one is from mOwner, another is from AudioChannelService (via AudioChannelAgent).
We don't want this class be called after mOwner was released, we should disconnect it from AudioChannelService.
Calling NotifyStoppedPlaying() can unregister agent from service, so service won't call agent anymore.
Therefore, no one would call AudioChannelAgentCallback after CC happened.

MozReview-Commit-ID: 7HY4KpciacB

--HG--
extra : rebase_source : 228c4988cd5aaae7b8b5c10463eb8445a8771d62
2016-12-04 11:02:10 +08:00
Wes Kocher
b9a8598f48 Merge m-c to inbound, a=merge 2016-12-01 15:46:23 -08:00
Wes Kocher
d360bdebf5 Merge inbound to central, a=merge 2016-12-01 15:31:47 -08:00
Bill McCloskey
2336b52695 Bug 1318506 - Label some common runnables with a DocGroup (r=ehsan)
MozReview-Commit-ID: 19gyZRfbzXP
2016-12-01 15:00:13 -08:00
Sebastian Hengst
fbf9d0b2f9 Backed out changeset 1c6c9a6c9b16 (bug 1321497) for failing browser_mediaPlayback_suspended_multipleAudio.js. r=backout 2016-12-01 17:09:29 +01:00
Kaku Kuo
90fd151cc8 Bug 1321497 - correct the logic of resuming from AudioChannel; r=alwu,jwwang
MozReview-Commit-ID: JxeqdzADlrU

--HG--
extra : rebase_source : 9bee2b418ef221c33c77cdc39a48105bca70f1ac
2016-12-01 16:30:18 +08:00
Ryan VanderMeulen
9bd4ab78e6 Merge m-c to inbound. a=merge 2016-12-01 09:33:46 -05:00
Sebastian Hengst
bc90f7a8c9 Backed out changeset ee28526a9033 (bug 1318506) for frequent failure in clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.html. r=backout 2016-12-01 13:36:31 +01:00
Kaku Kuo
16e7762061 Bug 1321196 part 2 - rework the IsAllowedToPlay policy; r=alwu,jwwang
MozReview-Commit-ID: 8mrXoLRK42y

--HG--
extra : rebase_source : 1198c795e10476a696cf1a7046dd1d48dea7e44b
2016-11-30 16:01:36 +08:00