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

51 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Alastor Wu 9a32fc38c2 Bug 1537554 - part3 : do not collect negative length cue for other cues. r=jya
Cue might have negative length because user can set cue's end time via `TextTrackCue`'s API and the spec doesn't have strong restriction that the end time should be equal or larger than the start time of the cue.

As the negative length cue won't be displayed, we have no need to add it to the `other cues`.

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

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

--HG--
extra : moz-landing-system : lando
2019-03-27 04:02:35 +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 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 5f410f2fce Bug 1531863 - part2 : handle text track mode changed in MediaElement. r=jya
In order to make the implementation more fitting with the spec, move the implementation of `pending-text-track-change-notification-flag` from text track list to media element.

In addition, it also help us not to expose the internal flag `show-poster` (which will be implemented in patch3) of media element when doing the related algorithm.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 00:32:21 +00:00
Alastor Wu 955915bb2a Bug 1531863 - part1 : implement 'GetMediaElement()' function wrapper. r=jya
To create a function wrapper which would automatically check whether track list exists, in order to reduce unnecessary checking for TextTrackList.

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

--HG--
extra : moz-landing-system : lando
2019-03-08 18:22:24 +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 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
Brindusan Cristian 01e26ea3df Backed out 4 changesets (bug 1531863) for mochitest failures at test_videocontrols_vtt.html. CLOSED TREE
Backed out changeset e2e2b325344f (bug 1531863)
Backed out changeset 5be609c16665 (bug 1531863)
Backed out changeset 21bafd01b438 (bug 1531863)
Backed out changeset c9628b2b89b2 (bug 1531863)

--HG--
extra : histedit_source : 869452c42d3539867f34e64be52b7afba5463235
2019-03-08 02:34:45 +02:00
Alastor Wu 64ab84e0bc Bug 1531863 - part2 : handle text track mode changed in MediaElement. r=jya
In order to make the implementation more fitting with the spec, move the implementation of `pending-text-track-change-notification-flag` from text track list to media element.

In addition, it also help us not to expose the internal flag `show-poster` (which will be implemented in patch3) of media element when doing the related algorithm.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 15:26:20 +00:00
Alastor Wu 01fa5895a1 Bug 1531863 - part1 : implement 'GetMediaElement()' function wrapper. r=jya
To create a function wrapper which would automatically check whether track list exists, in order to reduce unnecessary checking for TextTrackList.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 21:00:59 +00:00
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

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

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07: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
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07: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
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 e613c38f5c Bug 1372715 - TimeMarchesOn step 1, fix the EndTime check for "current cue". r=rillian
Cue whose start times are less than or equal to the current playback position and
whose end times are greater than the current playback position.

MozReview-Commit-ID: 2I5lgjUUtgB

--HG--
extra : rebase_source : 5396f932da54cf175fe330f0caf85472ac9f7e42
2017-06-16 10:48:14 +08:00
bechen 74b3bef8a5 Bug 1343796 - Label runnables in TextTrack.cpp. r=jwwang
MozReview-Commit-ID: GvqwG181R4i

--HG--
extra : rebase_source : 85ddbdcf2ef7bc040b7c7774e54f25a64d5318a6
2017-03-15 11:58:50 +08:00
bechen da4381687d Bug 1334112 -part3 : Trigger UpdateReadyState after unbind TrackElement's and TextTrack::SetReadyState. r=rillian
MozReview-Commit-ID: pEeOzZSpak

--HG--
extra : rebase_source : cf7759c746f3fa9221dcda03327fd6b3c5997ee7
2017-02-21 15:44:10 +08:00
bechen 5bd89ec1d3 Bug 1334112 - part1: Add IsLoaded functions for TextTrack, TextTrackList, TextTrackManager. r=rillian
MozReview-Commit-ID: GBEKZvLUiPn

--HG--
extra : rebase_source : 9c3e5ba8a7ac6b9e3bb99fe9ae10e554422ff268
2017-02-20 15:27:06 +08:00
bechen abdee013ae Bug 1319486 - Remove the old relation when adding cue to a new TextTrack. r=rillian
MozReview-Commit-ID: GScxPQWMUTR

--HG--
extra : rebase_source : 2aeb67215202860b7a62a6669d79aaaf99e6d53a
2016-11-24 15:30:52 +08:00
bechen 1d54633f83 Bug 1304948 - Part 1: Check the target cue belongs to corresponding TextTrack. r=rillian
MozReview-Commit-ID: 3X3FjYw2p26

--HG--
extra : rebase_source : 76a3e453d8edde947d7e32134121ba94e91c7a7e
2016-09-29 17:47:35 +08:00
bechen c610f50aae Bug 1285897 - Async dispatch cuechange event on TextTrack object. r=rillian
MozReview-Commit-ID: DKWCAEaT58J

--HG--
extra : transplant_source : %F4%CAT%AD%05v%A4%94%B8%13%2C%8E%9Ex%DDg%89Q%CFR
2016-07-12 17:41:41 +08:00
Carsten "Tomcat" Book 202195f87d Backed out changeset 5c7dda18ec02 (bug 1285897)
--HG--
extra : rebase_source : 6a116dd44fa98910566178693e2d318e66f7011e
2016-07-21 08:03:10 +02:00
bechen 291a5d1475 Bug 1285897 - Async dispatch cuechange event on TextTrack object. r=rillian
MozReview-Commit-ID: DKWCAEaT58J

--HG--
extra : transplant_source : %F4%CAT%AD%05v%A4%94%B8%13%2C%8E%9Ex%DDg%89Q%CFR
2016-07-12 17:41:41 +08:00
bechen a54b4b6946 Bug 1281999 - Update the display when we remove an active cue by changing the texttrackmode to disabled. r=rillian
MozReview-Commit-ID: GeF5Icd9jLu

--HG--
extra : transplant_source : %D40%3Ed%07%F1%17%5B%9FG%EC%C5%80%C3f%EDJ%22%7Bd
2016-07-18 15:39:14 +08:00
bechen 427f588be2 Bug 1280373 - Fix the label and language attribute in TextTrack object. r=rillian
MozReview-Commit-ID: 2NFJ5fCCkDy

--HG--
extra : transplant_source : s%94%C1%CB%B3%AF%1E%95%FEV%2C%CE%B9N%92xPv%FA%1D
2016-06-30 13:36:31 +08:00
bechen 30cae3d32d Bug 1279865 - Don't run TimeMarchesOn if the MediaElement is not played. r=rillian
1. If mHasUserInteraction MediaElement is false, don't run the TimeMarchesOn because the element is not played. 2. Update the activeCueList only in TimeMarchesOn(). 3. Run TimeMarchesOn() at the beginning of play. r=rillian

MozReview-Commit-ID: BhwsIfRm3B2

--HG--
extra : rebase_source : 9713d4f467f1d708f65a25e54435d0c6e8ff1816
2016-06-30 13:31:56 +08:00
bechen 727ebe7fcf Bug 1277192 - Correct the association between Cue and TextTrack. r=rillian
MozReview-Commit-ID: 2B2swKL4iM2

--HG--
extra : transplant_source : %C9%C2%EE%A9%2A%FA%80v%7D%B2s%01%B4%A5%B4%98%F2z%06%D0
2016-06-27 10:41:20 +08:00
bechen 5f7ef9b5d7 Bug 882717 - Invoke TimeMarchesOn when the startTime/endTime/pauseOnExit be changed of TextTrackCue. r=rillian
MozReview-Commit-ID: 7Xol9x83lLx

--HG--
extra : transplant_source : %DD%5C%E9%5C%98Y4%7B%AE%24%E1%7C%9F%F8%60C%85%0D%D5W
2016-06-08 16:53:30 +08:00
bechen 6193b9598d Bug 1274884 - Add/Remove cue into MediaElement when TextTrack::mMode changed. r=rillian
MozReview-Commit-ID: 9PGEV5g8iv3

--HG--
extra : transplant_source : b%06Jsa%B8%08%A3%A2aS%0F%5C%C5T%9B%C9y%B5%C8
2016-06-02 16:08:32 +08:00
bechen e355a8b526 Bug 882718 - 1. Fix testcase crash/failed . 2. The cuechange event should be fired in TimeMarchesOn. r=rillian
MozReview-Commit-ID: EYi9iZ1mfjg

--HG--
extra : rebase_source : 2f652a3d4f072c87ba44de3650ff1358694444c1
2016-06-01 15:13:43 +08:00
bechen 30214bd891 Bug 882718 - triggerTimeMarchesOn. r=rillian
MozReview-Commit-ID: 2OOqr1Z6X9

--HG--
extra : rebase_source : 33b12ef88c838cab247d0267f5195edfee02560c
2016-06-01 13:35:58 +08:00
bechen fd405c9532 Bug 882718 - Implement ActiveFlag at TextTrackCue object. r=rillian
MozReview-Commit-ID: 4FksCKzB0Ep

--HG--
extra : rebase_source : 3b900dd9f23e1ec961f8c554cd260b7cd44f25c5
2016-06-01 13:35:53 +08:00
Sebastian Hengst 5a8c6aa494 Backed out changeset 453431d7a2c8 (bug 882718) for crashing in track.html with nsXBLPrototypeBinding::GetRuleProcessor(). r=backout 2016-05-31 18:54:41 +02:00
Sebastian Hengst 200b6282f2 Backed out changeset 7f61a6bd8a3d (bug 882718) 2016-05-31 18:54:41 +02:00
Sebastian Hengst de05b7902e Backed out changeset 883bfabfde46 (bug 882718) 2016-05-31 18:54:41 +02:00
bechen db0d961dac Bug 882718 - 1. Fix testcase crash/failed . 2. The cuechange event should be fired in TimeMarchesOn. r=rillian
MozReview-Commit-ID: EYi9iZ1mfjg

--HG--
extra : transplant_source : %B3%A1%B5g%D1s%08%18%25%8A%09%C0%A1%D7%7C%E9%D7F%97%A1
2016-05-26 11:45:43 +08:00
bechen bb5b50f7ee Bug 882718 - triggerTimeMarchesOn. r=rillian
MozReview-Commit-ID: 2OOqr1Z6X9

--HG--
extra : transplant_source : %A8%E2KG%82%29M%8EVA%20%9BJ%D1u%9B%85%8C%1D%1E
2016-05-25 16:11:28 +08:00
bechen 4968e533af Bug 882718 - Implement ActiveFlag at TextTrackCue object. r=rillian
MozReview-Commit-ID: 4FksCKzB0Ep

--HG--
extra : transplant_source : j%D413W%98%E7%9Es%7D%E9%A4A%FE%AD%8F%D4X%3C%7E
2016-05-24 11:30:22 +08:00
Ruxton 24b291374f Bug 1033144 - Part 1: Dispatch 'cuechange' event on TextTracks. r=rillian,bz 2016-03-02 11:35:09 -08:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00