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

174 Коммитов

Автор SHA1 Сообщение Дата
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Simon Giesecke 92347a9513 Bug 1676346 - Add missing include directives etc. r=andi,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D99323
2020-12-10 11:09:01 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
alwu 7a92a1e5ef Bug 1675326 - part5 : move webvtt related crashtest to `dom/media/webvtt/test/crashtests`. r=bryce
Depends on D96106

Differential Revision: https://phabricator.services.mozilla.com/D96107
2020-11-09 15:47:30 +00:00
alwu ff629c2074 Bug 1675326 - part4 : move webvtt related reftest to `dom/media/webvtt/test/reftest`. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D96106
2020-11-09 15:47:14 +00:00
alwu 2cbf7b3920 Bug 1675326 - part3 : move webvtt related plain mochitests to `dom/media/webvtt/test/mochitest`. r=bryce
Depends on D96104

Differential Revision: https://phabricator.services.mozilla.com/D96105
2020-11-09 15:47:12 +00:00
alwu 9594ca92fc Bug 1675326 - part2 : move webvtt related xpcshell test to `dom/media/webvtt/test/xpcshell` r=bryce
Depends on D96103

Differential Revision: https://phabricator.services.mozilla.com/D96104
2020-11-09 15:47:10 +00:00
alwu 9d84da2096 Bug 1675326 - part1 : move webvtt related files into `dom/media/webvtt`. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D96103
2020-11-09 15:47:07 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
James Teh 18d9c07c0b Bug 1622995: Expose video controls to a11y even when visually hidden. r=MarcoZ,Gijs,heycam
This required a change to vtt.jsm because it previously used clientHeight to determine whether the controls were showing.
Now that the controls are visually hidden but not display: none, that doesn't work because clientHeight can be > 0 even when the controls are visually hidden.
The hidden attribute is now used instead.

Differential Revision: https://phabricator.services.mozilla.com/D87403
2020-08-20 09:06:09 +00:00
Kris Maglione 9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Mark Banner 15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Mark Banner 2b7e2e5f7b Bug 1607172 - Move dom third-party entries across to ThirdPartyPaths.txt, and clean up .eslintignore for dom. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D59694

--HG--
extra : moz-landing-system : lando
2020-01-21 20:46:28 +00:00
Mark Banner 3596e824db Bug 1607172 - Automatically fix ESLint issues in non-third party dom/media/webvtt/ files. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D59693

--HG--
extra : moz-landing-system : lando
2020-01-21 20:46:20 +00:00
Mihai Alexandru Michis 2dab66d06e Backed out 9 changesets (bug 1607172, bug 1609998, bug 1608799) for causing xpcshell failures in test_parser.js
CLOSED TREE

Backed out changeset 7753083b67dd (bug 1609998)
Backed out changeset e6f5aac734ab (bug 1608799)
Backed out changeset 90ea35966b73 (bug 1608799)
Backed out changeset 6fafa451b3f9 (bug 1608799)
Backed out changeset e07a4aea2ae1 (bug 1608799)
Backed out changeset d69d6dfdccad (bug 1607172)
Backed out changeset 93023b1b6153 (bug 1607172)
Backed out changeset 99ce7a56080e (bug 1607172)
Backed out changeset 20aa5934c785 (bug 1607172)
2020-01-21 21:44:03 +02:00
Mark Banner 1856b4108d Bug 1607172 - Move dom third-party entries across to ThirdPartyPaths.txt, and clean up .eslintignore for dom. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D59694

--HG--
extra : moz-landing-system : lando
2020-01-21 17:00:27 +00:00
Mark Banner bbe399b932 Bug 1607172 - Automatically fix ESLint issues in non-third party dom/media/webvtt/ files. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D59693

--HG--
extra : moz-landing-system : lando
2020-01-21 17:00:25 +00:00
alwu 104f98fb8c Bug 1580015 - part1 : do not reentry function 'processCues()'. r=heycam
Accessing `offsetXXX` attributes of element, it would trigger reflow, and sometime it would result in a re-entry of `processCue()` because we would call `processCue()` when `resizecaption` occurs.

One specifical case is that, assigning CSS properties `min-width` and `max-width` at the same video element, in thise case, when we re-enter the `processCues()` and access `offsetXXX`. It seems that the layout system would reprocess those properites again and again and dispatch `resizecaption` when we access `offsetXXX`, which causes an infinite loop, starting from receving `resizecaption`, then calling `processCue()`, accessing `offSetXXX`, triggering reflow, sending `resizecaption` event again.

Therefore, we should stop revisiting `processCues()` if we're already running a processing, we should run a processing once at a time.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 08:13:46 +00:00
Alastor Wu 2e47becfef Bug 1571908 - part6 : add debug logs. r=heycam
Add debug logs to show which mode we're using to adjust cue's position.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 07:10:27 +00:00
Alastor Wu b43ac32ce9 Bug 1571908 - part4 : remove redudant function. r=heycam
We have already had a exactly same function, so can remove a redundant one.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 07:10:26 +00:00
Alastor Wu 139cf6cc13 Bug 1571908 - part3 : optimize the result of adjusting position for cues with 'snapToLines=false'. r=heycam
When adjusting cues with `snapToLines=false`, first we would generate an array with all different axises which we would use to move cue on the specific direction.

However, for the different writing directions, we should have different priority for the moving directions.
For example, if the wriring direction is `horizontal`, which means cues will grow from the top to the bottom, then moving cues along the `y` axis should be more important than moving cues along the `x` axis, and vice versa for those cues growing from the left to right, or from the right to the left.

After decided the moving direction, then we have to decide the moving offset. Now we use line box's Bsize as a basic moving unit.

Moving cues, however, by such as large distance as a time would cause too many redudant space between cue boxes, which doesn't provide a good enough visual arrangement result. Therefore, we divide the Bsize by a factor, which can control the granularity of the moving unit and can still preverse a reasonable space between boxes. That can provide way better visual result than the one we had used before, and still has certain good performance comparing with moving 1px at a time.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 07:10:26 +00:00
Alastor Wu f5fee479ba Bug 1571908 - part2 : return null if we can't place the cue box inside the video rendering area. r=heycam
When adjusting the position of the cue box, if we can't find a proper place to display the cue within the video rendering area, we should return `null` and not to show it on the screen.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 07:10:25 +00:00
Alastor Wu 80cb50a3a9 Bug 1571908 - part1 : use correct width and height to compute position percentage. r=heycam
When calculating position percentage, `top` should divide the height of the video rendering area, and `left` should divide the width of the video rendering area.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 07:10:31 +00:00
alwu ae4242d665 Bug 1305732 - part7 : remove duplicated declaration. r=heycam
We have declared `supportPseudo`, remove the duplicated declaration.

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

--HG--
extra : moz-landing-system : lando
2019-07-08 04:47:46 +00:00
alwu c2ca57258b Bug 1305732 - part5 : set CSS properties directly on '::cue'. r=heycam,emilio
According to the spec [1], we have to set those CSS properties on the root node, and then this root node would have a child node, background box [2], which would contain all other child nodes.

In our case, the background box is `cueDiv` [3].

In theory, all those properties set on the root node should be inherited by the background box. However, when the background box is a pseudo element `::cue`, they won't be directly inherit from the the background box's parent, inherited styles would acutally come from video instead.

Therefore, we have to directly set these properties on the pseudo element and mark them as `!important` to avoid being overrided by user style script.

[1] https://www.w3.org/TR/webvtt1/#ref-for-list-of-webvtt-node-objects-9
[2] https://www.w3.org/TR/webvtt1/#webvtt-cue-background-box
[3] https://searchfox.org/mozilla-central/rev/11712bd3ce7454923e5931fa92eaf9c01ef35a0a/dom/media/webvtt/vtt.jsm#533-534

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

--HG--
extra : moz-landing-system : lando
2019-07-09 01:42:45 +00:00
alwu fdde30fdd6 Bug 1305732 - part4 : background box should be a inline node. r=heycam
According to the spec [1], the background box should be `display:inline`.

Therefore, we should create a `<span>`, which already is an inline element, for the background box, not a `<div>`, which is a block element.

In addition, when the pseudo element is enabled, even though the element is currently a `div`, it doesn't match the div `{ display: block; }` rule from the UA style sheet because the pseudo element only matches `::cue` rules. It also has the initial value of display which is `inline`.

[1] https://www.w3.org/TR/webvtt1/#webvtt-cue-background-box

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

--HG--
extra : moz-landing-system : lando
2019-07-08 18:02:53 +00:00
alwu 044a87f6e8 Bug 1305732 - part3 : remove redundent properties setting on non-pseudo background node. r=heycam
If the background node is not a pseudo element, these properties would actually be inherited, so we have no need to set them again.

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

--HG--
extra : moz-landing-system : lando
2019-07-08 04:45:01 +00:00
alwu 85d9f025b6 Bug 1305732 - part2 : list all properties set on the root node in one place to make them clear. r=heycam
In order to clearly see what properties are applied on the root node, create a function to list all of them together.

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

--HG--
extra : moz-landing-system : lando
2019-07-08 04:44:47 +00:00
Alastor Wu 540674f2db Bug 1305732 - part1 : don't show the box with zero width or height. r=heycam
Setting cue's position would also affect cue box's size which would be determined by cue's position alignment as well. If the cue box's width or height is zero, it means that this box should not be display on the screen and we should clear cue's display state as well.

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

--HG--
extra : moz-landing-system : lando
2019-07-03 23:07:43 +00:00
Alastor Wu fd5355860a Bug 1562021 - part3 : cancel old VTT listener when we start a new load. r=jya,baku
When we start a new load, all previous data fetching from the previous listener and all state changing applied to track element should be ignored.

Therefore, we add a new method `Cancel()` which owner of the listener should call when we would like to discard current listener.

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

--HG--
extra : moz-landing-system : lando
2019-07-03 23:23:29 +00:00
alwu c7b361e5b5 Bug 1556079 - part1 : hide cue if we can't find a good place to put it fully inside the rendering area. r=heycam
According to the spec 7.2.10.17 [1], if we have tried both direction and there is no place to put the cue inside the rendering area without overlapping with other cues or the boundary of rendering area, then we have to discard all CSS boxes, which means that we should not display this cue.

[1] https://www.w3.org/TR/webvtt1/#processing-cue-settings

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

--HG--
extra : moz-landing-system : lando
2019-06-14 00:26:54 +00:00
alwu ecdd9d203f Bug 1557182 - part4 : add fuzzy for the boundary comparision. r=heycam
When the check whether boxes are overlapping or box is placing out side the container boundary, we should use fuzzy for this checking if the difference is small enough to be ignored.

When two boxes just overlapped a little bit (like < 0.01 px), which user can't be aware of it and looks like just placing side by side, we acutally don't need to adjust box position again.

Otherwise, it would result in an obvious space between two boxes which makes it look more weird because the basic moving unit for adjusting boxes is the Bsize of the first line box.

In addition, adding fuzzy can also ensure rendering testing can be more robust, because on some platform the cues would overlap a really tiny amount of pixels and causes box moving up more than our expectation, which result in incorrect rendering comparasion.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 01:47:45 +00:00
alwu 493294ac94 Bug 1555849 - part1 : use 'computeLine' to adjust cue's position when 'snap-to-lines' is false. r=heycam
According to the spec 7.2.6 [1], we should use `computed line`, not `computed position`.

[1] https://www.w3.org/TR/webvtt1/#ref-for-cue-computed-line-2

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

--HG--
extra : moz-landing-system : lando
2019-06-13 23:08:54 +00:00
Narcis Beleuzu 4d0ca3dce9 Backed out changeset a7c18cfb94b3 (bug 1556079) for assertion failures at parserWrapper. CLOSED TREE
--HG--
extra : rebase_source : b3e0b049a6d18081242eb40ff7fce8e80d04c700
2019-06-14 00:59:22 +03:00
alwu 986c5f9738 Bug 1556079 - part1 : hide cue if we can't find a good place to put it fully inside the rendering area. r=heycam
According to the spec 7.2.10.17 [1], if we have tried both direction and there is no place to put the cue inside the rendering area without overlapping with other cues or the boundary of rendering area, then we have to discard all CSS boxes, which means that we should not display this cue.

[1] https://www.w3.org/TR/webvtt1/#processing-cue-settings

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

--HG--
extra : moz-landing-system : lando
2019-06-13 20:10:53 +00:00
Alastor Wu 0b9fc3bd0f Bug 1557882 - part1 : delay setting 'unicode-bidi' until finishing the position calculation. r=heycam
Because of bug1558431, now the text alignment for `bidi` won't take effect on the initial reflow of the document, so we have to delay setting 'unicode-bidi' in order to trigger reflow again as a workaround.

It would make the `bidi` text showing correctly after reflow.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 18:59:35 +00:00
alwu 7ff878afe4 Bug 1555836 - use the pref to dynamically switch vtt debug log. r=heycam
It would be more convenient to use the pref to dynamically switch vtt debug log on/off without changing any code.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 18:43:08 +00:00
alwu 4b5ebae438 Bug 1555197 - part3 : modify log. r=jya
Add and modify some log content in order to help debugging.

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

--HG--
extra : moz-landing-system : lando
2019-05-30 07:39:40 +00:00
alwu de12be8c5d Bug 1555197 - part2 : handle state `REUSE AND CLEAR`. r=heycam
According to the spec [1] step 13, if we won't reset cues' display state, we should reuse them.

If the amount of displaying cues changes, which means some cues should disappear from the screen and some of them should still be showed, we have to clear the screen and resume displaying cues' display state.

As the amount of displaying cues might affect the computed result of cues' display state, if we recompute cues' display state in this situaion, the result would be different from the one we had last time.

For example, there are two cues, Cue0 [0:2], Cue1 [1:5]. When Cue0 disappears, Cue1 should stay in the same position.

```
  [playing at 1s]
*-------------------*
|        Cue1       |
|        Cue0       |
*-------------------*

  [playing at 3s] (correct)
*-------------------*
|        Cue1       |
|                   |
*-------------------*

  [playing at 3s] (incorrect)
*-------------------*
|                   |
|        Cue1       |
*-------------------*
```

[1] https://w3c.github.io/webvtt/#rules-for-updating-the-display-of-webvtt-text-tracks

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

--HG--
extra : moz-landing-system : lando
2019-06-13 18:03:32 +00:00
alwu 5e558f7e28 Bug 1555197 - part1 : introduce new state to distinguish different situations for showing cues' display state. r=heycam
Cue's display state is a DIV element with corresponding CSS style to display cue on the screen. When the cue is being displayed first time, we will compute its display state.

After that, we could reuse its state until following conditions happen.
(1) control changes : it means the rendering area changes so we should recompute cues' position.
(2) cue's `hasBeenReset` flag is true : it means cues' line or position property has been modified, we also need to recompute cues' position.
(3) the amount of showing cues changes : it means some cue would disappear but other cues should stay at the same place without recomputing, so we can resume their display state.

The new state includes `REUSE`, `REUSE AND CLEAR` and `COMPUTE AND CLEAR`, our current behavior doesn't handle `REUSE AND CLEAR, which would be implemented in next patch.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 17:56:43 +00:00
alwu 42a422a332 Bug 1555825 - part1 : append a text node with empty value when input is an empty string. r=heycam
According to the spec [1], text node has a value to represent its text, even when its text is an empty string.

Therefore, we should append a text node with a value for empty text string on the DocumentFragment we return, when input sting is an empty string.

[1] https://w3c.github.io/webvtt/#webvtt-text-object

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

--HG--
extra : moz-landing-system : lando
2019-06-13 15:42:11 +00:00
Alastor Wu 0195200d42 Bug 1551385 - part2 : recompute display state when display cues amount is different from the one we rendered last time. r=heycam
If the amount of cues which are going to be displayed is different from the one we displayed last time, we have to compute cues' display state again because cue's position might be affected by other cues.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 21:25:13 +00:00