Граф коммитов

95 Коммитов

Автор SHA1 Сообщение Дата
alwu ef9e1890ec Bug 1550633 - part4 : no need to run text track selection in stable state. r=bzbarsky
According to spec [1], it doesn't mention that we have to run text track selection in stable state, it just said "the user agent must queue a task to run the following steps".

[1] https://html.spec.whatwg.org/multipage/media.html#honor-user-preferences-for-automatic-text-track-selection

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:33 +00:00
Alastor Wu 102628f8e2 Bug 1551385 - part1 : let 'processCue()' handle cleaning cues div. r=heycam
We can actually let `processCue()` to handle rendering cues or cleaning displayed cues, no need to use another way to clear the cue.

The advantages is to make the code cleaner and easier to read, now we just need to know JS side would handle all rendering stuffs for us. We don't need to have different behavior when there is no showing cue.

The way we clear displayed cues are intuitive, we would remove all child nodes under the overlay, which are used to display cues.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 21:25:14 +00:00
Andreea Pavel ed8cf51b98 Backed out 23 changesets (bug 1550633) for causing bug 1548454 to permafail on a CLOSED TREE
Backed out changeset ce4a146da49d (bug 1550633)
Backed out changeset e1a33576d6ad (bug 1550633)
Backed out changeset bbd8f62b9bff (bug 1550633)
Backed out changeset 583d4e0945ad (bug 1550633)
Backed out changeset 29487a59512d (bug 1550633)
Backed out changeset 0f6ddd898e89 (bug 1550633)
Backed out changeset fd1afdd721e3 (bug 1550633)
Backed out changeset d4a6c1337f89 (bug 1550633)
Backed out changeset 2d4773f2dc6c (bug 1550633)
Backed out changeset e9dea69efffe (bug 1550633)
Backed out changeset 4265dd65cec3 (bug 1550633)
Backed out changeset 2aaaa42c409b (bug 1550633)
Backed out changeset d85485f76233 (bug 1550633)
Backed out changeset b6e8370b6efb (bug 1550633)
Backed out changeset afaef937598b (bug 1550633)
Backed out changeset 470d8fae0461 (bug 1550633)
Backed out changeset 8024fcefe8b1 (bug 1550633)
Backed out changeset 224eadc5ef27 (bug 1550633)
Backed out changeset 26c3c521ce27 (bug 1550633)
Backed out changeset def294ad0efb (bug 1550633)
Backed out changeset b15cc6e689e7 (bug 1550633)
Backed out changeset be178934cbbb (bug 1550633)
Backed out changeset 9893ccf1f8ad (bug 1550633)
2019-05-24 03:38:26 +03:00
Andreea Pavel 21ad779f6a Backed out 3 changesets (bug 1551385) for breaking reftests at vtt_overlapping_time.html on a CLOSED TREE
Backed out changeset 4268e661e741 (bug 1551385)
Backed out changeset fb20dcf3c072 (bug 1551385)
Backed out changeset 883151b42d88 (bug 1551385)
2019-05-24 00:23:19 +03:00
alwu 49164193d6 Bug 1550633 - part4 : no need to run text track selection in stable state. r=bzbarsky
According to spec [1], it doesn't mention that we have to run text track selection in stable state, it just said "the user agent must queue a task to run the following steps".

[1] https://html.spec.whatwg.org/multipage/media.html#honor-user-preferences-for-automatic-text-track-selection

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:04:58 +00:00
Alastor Wu ceefe2a70a Bug 1551385 - part1 : let 'processCue()' handle cleaning cues div. r=heycam
We can actually let `processCue()` to handle rendering cues or cleaning displayed cues, no need to use another way to clear the cue.

The advantages is to make the code cleaner and easier to read, now we just need to know JS side would handle all rendering stuffs for us. We don't need to have different behavior when there is no showing cue.

The way we clear displayed cues are intuitive, we would remove all child nodes under the overlay, which are used to display cues.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 05:39:40 +00:00
Mihai Alexandru Michis 6026c240e3 Backed out 22 changesets (bug 1550633) for browser-chrome failure at browser_cache.js. CLOSED TREE
Backed out changeset 87067f045e1e (bug 1550633)
Backed out changeset a42883570179 (bug 1550633)
Backed out changeset bf1426571565 (bug 1550633)
Backed out changeset 97f61668f78c (bug 1550633)
Backed out changeset e22ef6f848aa (bug 1550633)
Backed out changeset 22213d6f047c (bug 1550633)
Backed out changeset 27e03b195718 (bug 1550633)
Backed out changeset 9a5e3e6b8c21 (bug 1550633)
Backed out changeset d338d667dcbd (bug 1550633)
Backed out changeset abc099f50543 (bug 1550633)
Backed out changeset ed0f76cca0d9 (bug 1550633)
Backed out changeset 4b193e156faa (bug 1550633)
Backed out changeset fefc8d667b9c (bug 1550633)
Backed out changeset e4128df1406b (bug 1550633)
Backed out changeset 9ad7d7b5ef6d (bug 1550633)
Backed out changeset d8fdfd9505bf (bug 1550633)
Backed out changeset 679ce0bdbf18 (bug 1550633)
Backed out changeset f75c225dc273 (bug 1550633)
Backed out changeset 4346465d73b1 (bug 1550633)
Backed out changeset 4c8fd0720cc2 (bug 1550633)
Backed out changeset 81545b2c0b58 (bug 1550633)
Backed out changeset 12fc5abcd066 (bug 1550633)
2019-05-23 11:54:26 +03:00
alwu 23bcbc20f7 Bug 1550633 - part4 : no need to run text track selection in stable state. r=bzbarsky
According to spec [1], it doesn't mention that we have to run text track selection in stable state, it just said "the user agent must queue a task to run the following steps".

[1] https://html.spec.whatwg.org/multipage/media.html#honor-user-preferences-for-automatic-text-track-selection

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

--HG--
extra : moz-landing-system : lando
2019-05-20 17:34:41 +00:00
Alastor Wu f5fd3008d6 Bug 1552081 - part1. Sometimes we should run 'TimeMarchesOn' only when the media element's show poster flag is false. r=jya
In the following situations, we should only run `TimeMarchesOn` when the media element's `show-poster` flag is false.

- add cue : https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-2
- remove cue : https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-3
- track mode changes : https://html.spec.whatwg.org/multipage/media.html#text-track-model:time-marches-on
- cue's startTime changes : https://html.spec.whatwg.org/multipage/media.html#text-track-api:time-marches-on
- cue's endTime changes : https://html.spec.whatwg.org/multipage/media.html#text-track-api:time-marches-on-2

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

--HG--
extra : moz-landing-system : lando
2019-05-17 01:59:34 +00:00
Alastor Wu 73b7b12f0d Bug 1550585 - no need to check whether media is playing when dispatching 'TimeMarchesOn' and 'UpdateCueDisplay'. r=jya
The spec [1] doesn't mention that we should run `TimeMarchesOn` or `UpdateCueDisplay` only after media starts playing.

Removing the checking can help us to render the cue correctly no matter media starts or not.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-05-17 01:12:37 +00:00
alwu 4be0d5b867 Bug 1548923 - part5 : run `TimeMarchesOn` in correct order r=jya
To run `TimeMarchesOn` in correct spec's steps order.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 01:34:57 +00:00
alwu 2b345c4263 Bug 1548923 - part4 : prevent run `TimeMarchesOn` before media has any data. r=jya
In patch2, whenever the media element's readyState is changed back to HAVE_NOTHING, we would reset all cues' active flag and update cue display in order to hide them.

It also means that we should not set any cue's flag when media element's readyState is `HAVE_NOTHING`, so we should abort the `TimeMarchesOn` in this situation.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 01:33:36 +00:00
alwu dfb849b238 Bug 1548923 - part2 : reset cues' active flag when media element's ready state becomes 'HAVE_NOTHING' r=jya
According to the spec [1], whenever the media element's readyState is changed back to `HAVE_NOTHING`, we have to reset all cues' active flag and update cue display in order to hide them.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-cue-active-flag

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

--HG--
extra : moz-landing-system : lando
2019-05-08 17:46:39 +00:00
alwu 70e585dd96 Bug 1548923 - part1 : abort 'TimeMarchesOn' algorithm during seeking. r=jya
In the spec [1], it doesn't mention that we should only run `TimeMarchesOn` after media has started. Therefore, we should remove this return condition in order to update cue's state correctly no matter the media starts or not.

In addition, according to the spec [2], `TimeMarchesOn` should be executed after seeking completed, we shouldn't not run it during seeking.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on
[2] https://html.spec.whatwg.org/multipage/media.html#seeking:time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-05-08 17:33:36 +00:00
Alastor Wu b8c30ffe3c Bug 1535005 - part1 : no need to update 'mLastTimeMarchesOnCalled' in 'DidSeek()' r=jya
According to spec [1],  `mLastTimeMarchesOnCalled` is used to represent the `last time` in step3. It's used to record last time we run `TimeMarchOn()`, so there is no need to upate it on `DidSeek()`.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-05-01 23:16:42 +00:00
Alastor Wu 2cd2a3b167 Bug 1537554 - part2 : let track track handle adding `current cue` and `other cue` if it's not disable. r=jya
According to the spec [1], `current cues` and `other cues` should only contain cues from `hidden` or `showing` text tracks.

In this patch, text track would be responsible to add `current cues` and `other cues` to the cues list by calling `GetCurrentCuesAndOtherCues()`.

If the text track is disabled, then it won't add any cues to the cues list.

In addition, in order to reduce the size of `other cues` (as actually we don't need to process all cues in the `other cues`), we use the time interval to only get the cues which are overlapping with the time interval.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-03-26 07:50:50 +00:00
Alastor Wu 90bc3f5218 Bug 1537554 - part1 : add debug logs. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D24473

--HG--
extra : moz-landing-system : lando
2019-03-26 02:52:22 +00:00
Alastor Wu f8ebdadc67 Bug 1535223 - part3 : add log in TextTrack and TextTrackCue. r=jya
It would be helpful if we can also print the information in `TextTrack` and `TextTrackCue`.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:25:10 +00:00
Alastor Wu 0b66618ffc Bug 1535223 - part2 : update TextTrackManager's logs. r=jya
Automatically print `TextTrackManager`'s address for the log marco, also update some exist logs.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:24:32 +00:00
Alastor Wu a0d0d81ceb Bug 1535223 - part1 : rename log module's name. r=jya
Use more general name `WebVTT` for this log module, which will include other debug logs in other files later.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:21:28 +00:00
Alastor Wu b399b16f25 Bug 1533909 - part2 : add assertion to ensure we should always get a valid TextTrackCueList. r=jya
In this comparison, we only process `hidden` or `showing` track which should not return null TextTrackCueList.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 05:28:44 +00:00
Alastor Wu 4c5f747109 Bug 1533909 - part1 : 'current cues' should not contain cues which are in the disable track. r=jya
According to the spec [1] step1, `current cues` should only contain cues which are in `hidden` or `showing` track.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-03-13 05:33:30 +00:00
Alastor Wu cfaf9c9586 Bug 1509446 - part6 : update cues display without checking whether cue is active or not. r=jya
We should update cue display everytime when the cues list changed.

In addition, we shouldn't check whether cue is active when we update display, because it's always inactive when the cue has been removed from `TextTrack::RemoveCue()`.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 19:48:31 +00:00
Alastor Wu b4902e9582 Bug 1509446 - part4 : remove set dirty. r=jya
As the `active cues list` would be automatically contruct when there are any active cues being added or inactive cues being removed, we have no need to use dirty to reset the `active cues list`.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 19:24:02 +00:00
Alastor Wu cb43f6e8f8 Bug 1509446 - part3 : run 'TimeMarchesOn' directly, instead of queuing a task. r=jya
According to the spec [1], we should run `TimeMarchesOn` algorithm directly when the specific situations happen, the spec doesn't say that we need to queue a task for it.

In addition, all the call sites for `TimeMarchesOn` are on the main thread, so we don't need to worry about race condition.

[1]
https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-2
https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-3
https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-4

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

--HG--
extra : moz-landing-system : lando
2019-03-08 03:12:42 +00:00
Alastor Wu d7fead1380 Bug 1509446 - part2 : use current cue in 'TimeMarchesOn' algorithm. r=jya
According to the spec [1], the `current cue` is not equal with the `active cue`, because it might contain non active cues, which might be set to active later during the `TimeMarchesOn`.

The `current cue` should be a list of cues, initialized to contain all the cues of all the hidden or showing text tracks of the media element (not the disabled ones) whose start times are less than or equal to the current playback position and whose end times are greater than the current playback position.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-03-07 19:21:22 +00:00
Alastor Wu 65679bbfa8 Bug 1509446 - part1 : update active cues list when cue's active state changed. r=jya
According to spec [1], `activeCues` should represent a subset of the text track cues whose active flag was set when the script started.

We should only depend on the `TimeMarchesOn` algorithm which will change cue's active state, and then add or remove cue to `activeCues`.

[1] https://html.spec.whatwg.org/multipage/media.html#dom-texttrack-activecues

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

--HG--
extra : moz-landing-system : lando
2019-03-08 03:10:45 +00:00
Peter Van der Beken fd3d6252af Bug 1521848 - Replace nsTArrayToJSArray with ToJSValue. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17263

--HG--
extra : moz-landing-system : lando
2019-01-22 18:36:07 +00:00
Jean-Yves Avenard b6b646428c Bug 1443429 - P1. Ensure that we don't run JS wrapper while in stable state. r=pehrsons
Due to the state watcher logic, mirror tasks can be dispatched while in stable state. We must not have visible aJS change during such stable state.

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

--HG--
extra : moz-landing-system : lando
2018-12-13 20:04:46 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrew McCreight 55cef5b2ab Bug 1504365 - Clear weak pointers in shutdown observers. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D12348

--HG--
extra : moz-landing-system : lando
2018-11-19 23:16:24 +00:00
Timothy Guan-tin Chien 9455e67e2c Bug 1491066 - Allow TextTrackManager to pass cue without videocontrols r=alwu
With UA Widget, the videocontrols container is created lazily.
It won't be a problem for WebVTT.processCues() in vtt.jsm, so
TextTrackManager::UpdateCueDisplay() should not early return there, but pass
nullptr to it.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 22:38:43 +00:00
Timothy Guan-tin Chien 8cc930296b Bug 1431255 - Part II, Create a Shadow Root in HTMLMediaElement when enabled, skipping <xul:videocontrols> r=dholbert,smaug
This prevents XBL binding from being attached, and create the Shadow Root to
host controls to be created by the script.

Shadow Root and the JS controls are lazily constructed when the controls
attribute is set.

Set nsVideoFrame as dynamic-leaf so it will ignore content child frames when
the controls are XBL anonymous content, and handles child frames from controls
in the Shadow DOM. The content nodes are still ignored since there is no
<slot>s in our Shadow DOM.

MozReview-Commit-ID: 3hk41iMa07n

--HG--
extra : rebase_source : f6f8a3facc9d83f5626cf5f3b4e3fa27438a8a8f
2018-06-27 11:12:38 -07:00
Boris Zbarsky 597b4545d2 Bug 1429903 part 4. Remove nsIDOMEventTarget. r=mccr8
MozReview-Commit-ID: 9XuenUHxfPx
2018-04-20 00:49:30 -04:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Andrea Marchesini b8bb98af8c Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +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
Alastor Wu 3a53368682 Bug 1382574 - part2 : remove HTMLMediaElement::GetHasUserInteraction(). r=bechen
MozReview-Commit-ID: 3MaumQvcR1q

--HG--
extra : rebase_source : d3dedf365b002680531ffd5e99fc0c0f66547e0f
2017-11-22 00:33:20 +08:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Bevis Tseng 5652aa4c4a Bug 1394349 - Label dom::SimpleTextTrackEvent with its associated inner window. r=billm 2017-08-28 17:22:20 +08:00
bechen@mozilla.com 264c2a6732 Bug 1385092 - Null check for the sParserWrapper. r=alwu
From the crash report and code logic, it is possible that the KillClearOnShutdown comes and the NS_XPCOM_SHUTDOWN_OBSERVER_ID never comes when getting obsercerService fail.
So add null check for the sParserWrapper and combine mShutdown to a new function.

MozReview-Commit-ID: Cj5ph2JrO7v

--HG--
extra : rebase_source : 4f9982a3e44e6f1a4db48739af92dc04cb0112d6
2017-08-09 17:30:52 +08:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
bechen e915d55250 Bug 1368489 - Fixing TimeMarchesOn step 13, sort the tasks by "text track cue order". r=rillian.
1. Sort by TextTrack. 2. Sort by time. 3. Sort by the order of added to TextTrack.

MozReview-Commit-ID: 4nwx6U5dMpy

--HG--
extra : rebase_source : 2998c48982e40604b068ffca525691c5b69ae2cf
2017-06-13 09:52:27 +08:00