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

123 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Mihai Alexandru Michis ee28f3da05 Backed out changeset f2508a6e4c53 (bug 1636572) for causing wpt failures in track-element/cors/*
CLOSED TREE
2020-05-11 10:47:22 +03:00
alwu a997790dad Bug 1636572 - prevent start a non-necessary new load if we're running another load for the same URL. r=jya
This patch will do :
- prevent starting another new load if that load is the same as the currently running load

The advantage of doing so is to avoid running same process again, which is unnecessary

More details :
When applying patches from bug1633935, it exposed an issue of the previous load interfering the track element when a new load was started.
It happens on `test_texttrack_mode_change_during_loading.html`. In that test, the first load happens when we set the src to the track element [1] and the second load happens when we change the mode of the track element [2].

In this situation, the first load an the second load is actually the same, they are going to fetch data from the same resource. According to the step 1 in the spec [3], we should prevent running another load if there is another same running occurrence of this algorithm.

[1] https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/dom/media/test/test_texttrack_mode_change_during_loading.html#53
[2] https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/dom/media/test/test_texttrack_mode_change_during_loading.html#62
[3] https://html.spec.whatwg.org/multipage/media.html#start-the-track-processing-model

Differential Revision: https://phabricator.services.mozilla.com/D74514
2020-05-09 10:42:53 +00:00
Sean Feng 2d1f2db82e Bug 1377999 - Make HTML Element to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57699

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:08 +00:00
Simon Giesecke 1ed2ba9764 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/html. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63171

--HG--
extra : moz-landing-system : lando
2020-02-20 16:19:15 +00:00
alwu 478a75705e Bug 1613329 - part1 : append text track to media element when binding track element to DOM tree. r=bzbarsky
This change ensures that we always remember to add a text track to media element's track list.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 00:41:14 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Emilio Cobos Álvarez e1918d8385 Bug 1600353 - Make TextTrackSource and TextTrackReadyState enum classes. r=bzbarsky
To avoid defining `Loading`, `Loaded`, etc. in the mozilla::dom namespace. Also
it is a bit cleaner and saves some memory in the TextTrack objects by specifying
the size to be smaller.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:13:11 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Alastor Wu 8c92fdce8f Bug 1562021 - part5 : add test 'test_texttrack_mode_change_during_loading.html'. r=jya
In order to simulate the specific running order, we have to add a test event 'mozStartedLoadingTextTrack', which would be controlled under a pref.

This test is used to ensure that we won't get `error` event when we change track's  mode during loading.

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

--HG--
extra : moz-landing-system : lando
2019-07-03 23:28:31 +00:00
Alastor Wu 5113a3b94b Bug 1562021 - part4 : wrap channel and listener clean-up to a function. r=jya
There are several places doing channel or listenr clean up, all these places should do channel and listener clean-up together because they are being used as a pair.

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

--HG--
extra : moz-landing-system : lando
2019-07-03 23:27:12 +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
Alastor Wu 53e5ea1cdf Bug 1562021 - part2 : using same log module as other VTT related files. r=jya
This log module should be merged into a part of `WebVTT` log module because it's useless to check this log module independently.

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

--HG--
extra : moz-landing-system : lando
2019-07-03 06:50:04 +00:00
Logan Smyth a1de03c27b Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30565

--HG--
extra : moz-landing-system : lando
2019-06-17 04:36:29 +00:00
Alastor Wu 5b19389470 Bug 1464012 - part1 : directly check media element's crossorigin attribute. r=jya
As `GetCORSMode()` would only be valid after media element starts loading, so we would fail to get the CORS mode if media's preload is `none`.

Therefore, according to the spec [1], we should directly check parent media element's `crossorigin` attribute in order to decide the `corsAttributeState`.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:attr-media-crossorigin

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

--HG--
extra : moz-landing-system : lando
2019-06-14 17:56:33 +00:00
Emilio Cobos Álvarez 6917a38081 Bug 1555216 - Change the signature of BindToTree to be (BindContext&, nsINode& aParentNode). r=bzbarsky
BindContext was going to have way more information at first, but then I realized
that most of the things I wanted to know were basically a flag away using the
parent node.

Still I think it's worth it, now experimenting with BindToTree will only mean
adding a field to a struct that's included from a couple cpp files, instead of a
massive pain.

I also think this is clearer, and doing this highlights quite a few
inconsistencies in our code which I've left untouched, but commented with
FIXMEs.

Steps are:

$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsresult BindToTree(Document\* aDocument, nsIContent\* aParent,#nsresult BindToTree(BindContext\&, nsINode\& aParent)#g' $file; done
$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#                      nsIContent\* aBindingParent) override#override#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(Document\* aDocument, nsIContent\* aParent,#::BindToTree(BindContext\& aContext, nsINode\& aParent)#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsIContent\* aBindingParent)##g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(aDocument, aParent, aBindingParent)#::BindToTree(aContext, aParent)#g' $file; done
$ ./mach clang-format

Then manual fixups.

Depends on D32948

Differential Revision: https://phabricator.services.mozilla.com/D32949
2019-05-31 23:31:52 +02:00
Emilio Cobos Álvarez ff732c2cdf Bug 1555143 - Remove unused aDeep argument from UnbindFromTree. r=bzbarsky
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(bool aDeep = true,#UnbindFromTree(#g' $file; done
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(bool aDeep,#UnbindFromTree(#g' $file; done
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(aDeep,#UnbindFromTree(#g' $file; done
$ ./mach clang-format

And fix the two callers and little use of the aDeep argument (see the "Manual
changes" patch attached to bug).

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

--HG--
extra : moz-landing-system : lando
2019-05-28 22:47:08 +00:00
alwu 53b352f32f Bug 1550633 - part15 : return error when we failed to create channel. r=jya
The channel might not be created correctly if we pass invaild url (eg. "invalid://url"), we should handle this error.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:40:58 +00:00
alwu fcc2ffd6d9 Bug 1550633 - part10 : automatically capture and print the address of track element in debug log and add new log. r=jya
To reduce non-neccesary input, we can always capture `this` and print the address in the log, and use same log level for all of them.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:21 +00:00
alwu e233315d02 Bug 1550633 - part9 : capture 'this' in lambda. r=jya
There are too many `self` used in the lambda, we can just capture `this` to remove redudant `self`.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:25 +00:00
alwu 93f917aacf Bug 1550633 - part8 : no need to reload if the new url is the same. r=jya
Accoding to spec [1], after loading finished, the start the track processing model would stop at step12 and wait until the track URL changes to the URL which is not equal to the URL we have loaded before. That means, if we change track URL to the same URL we loaded before, we won't have to reload the resource.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:track-url-5

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:23 +00:00
alwu 6a27441f17 Bug 1550633 - part7 : change ready state to 'FAILED_TO_LOAD' and dispatch 'error' event when we have no 'src' or have an empty url. r=jya
`Failed to load` [1] indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way.

According to the spec [2], if fetching fails for any reason (network error, the server returns an error code, CORS fails, etc), or if URL is the empty string, then queue a task to first change the text track readiness state to `failed to load` and then fire an event named `error` at the track element. And spec [3] also mention that, if the track URL changes so that it is no longer equal to URL while fetching is ongoing, we also need to change the text track readiness state to`failed to load` and dispatch `error`.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-readiness-state
[2] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-failed-to-load
[3] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-failed-to-load-3

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:27 +00:00
alwu 973b2aec17 Bug 1550633 - part6 : clear track's cues list whenever track element's src attribute set, changed or removed. r=jya,baku
According to the spec [1], we should empty track's cue list whenever a track element has its src attribute set, changed, or removed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:attr-track-src

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:29 +00:00
alwu ee122028fb Bug 1550633 - part2 : maybe start loading resource when the track's mode changes. r=jya
According to the spec [1], the user agent must start the track processing model when text track has its text track mode changed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:38 +00:00
alwu dbb90759a6 Bug 1550633 - part1 : HTMLTrackElement should not load resource when its text track is disable. r=jya
According to the spec step2 [1], we should not load resource for the track element which text track is disabled.

[1] https://html.spec.whatwg.org/multipage/media.html#start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-24 00:41:40 +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
alwu c96313eb80 Bug 1550633 - part15 : return error when we failed to create channel. r=jya
The channel might not be created correctly if we pass invaild url (eg. "invalid://url"), we should handle this error.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:03:08 +00:00
alwu dde1d1908f Bug 1550633 - part10 : automatically capture and print the address of track element in debug log and add new log. r=jya
To reduce non-neccesary input, we can always capture `this` and print the address in the log, and use same log level for all of them.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:03:31 +00:00
alwu 4114ea44bb Bug 1550633 - part9 : capture 'this' in lambda. r=jya
There are too many `self` used in the lambda, we can just capture `this` to remove redudant `self`.

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:03:33 +00:00
alwu 7e5bb0ce04 Bug 1550633 - part8 : no need to reload if the new url is the same. r=jya
Accoding to spec [1], after loading finished, the start the track processing model would stop at step12 and wait until the track URL changes to the URL which is not equal to the URL we have loaded before. That means, if we change track URL to the same URL we loaded before, we won't have to reload the resource.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:track-url-5

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:03:35 +00:00
alwu ab8de37693 Bug 1550633 - part7 : change ready state to 'FAILED_TO_LOAD' and dispatch 'error' event when we have no 'src' or have an empty url. r=jya
`Failed to load` [1] indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way.

According to the spec [2], if fetching fails for any reason (network error, the server returns an error code, CORS fails, etc), or if URL is the empty string, then queue a task to first change the text track readiness state to `failed to load` and then fire an event named `error` at the track element. And spec [3] also mention that, if the track URL changes so that it is no longer equal to URL while fetching is ongoing, we also need to change the text track readiness state to`failed to load` and dispatch `error`.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-readiness-state
[2] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-failed-to-load
[3] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-failed-to-load-3

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:03:37 +00:00
alwu da6ab8db25 Bug 1550633 - part6 : clear track's cues list whenever track element's src attribute set, changed or removed. r=jya,baku
According to the spec [1], we should empty track's cue list whenever a track element has its src attribute set, changed, or removed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:attr-track-src

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:03:40 +00:00
alwu 47597aeb6b Bug 1550633 - part2 : maybe start loading resource when the track's mode changes. r=jya
According to the spec [1], the user agent must start the track processing model when text track has its text track mode changed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:05:02 +00:00
alwu 7ba57e42c0 Bug 1550633 - part1 : HTMLTrackElement should not load resource when its text track is disable. r=jya
According to the spec step2 [1], we should not load resource for the track element which text track is disabled.

[1] https://html.spec.whatwg.org/multipage/media.html#start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-23 09:05:04 +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 19f06c523e Bug 1550633 - part15 : return error when we failed to create channel. r=jya
The channel might not be created correctly if we pass invaild url (eg. "invalid://url"), we should handle this error.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 22:22:54 +00:00
alwu c1b951f1af Bug 1550633 - part10 : automatically capture and print the address of track element in debug log and add new log. r=jya
To reduce non-neccesary input, we can always capture `this` and print the address in the log, and use same log level for all of them.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 09:38:08 +00:00
alwu 6bd5f329ef Bug 1550633 - part9 : capture 'this' in lambda. r=jya
There are too many `self` used in the lambda, we can just capture `this` to remove redudant `self`.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 09:37:44 +00:00
alwu 58d248f6f0 Bug 1550633 - part8 : no need to reload if the new url is the same. r=jya
Accoding to spec [1], after loading finished, the start the track processing model would stop at step12 and wait until the track URL changes to the URL which is not equal to the URL we have loaded before. That means, if we change track URL to the same URL we loaded before, we won't have to reload the resource.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:track-url-5

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

--HG--
extra : moz-landing-system : lando
2019-05-22 01:49:35 +00:00
alwu d93f54a6a0 Bug 1550633 - part7 : change ready state to 'FAILED_TO_LOAD' and dispatch 'error' event when we have no 'src' or have an empty url. r=jya
`Failed to load` [1] indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way.

According to the spec [2], if fetching fails for any reason (network error, the server returns an error code, CORS fails, etc), or if URL is the empty string, then queue a task to first change the text track readiness state to `failed to load` and then fire an event named `error` at the track element. And spec [3] also mention that, if the track URL changes so that it is no longer equal to URL while fetching is ongoing, we also need to change the text track readiness state to`failed to load` and dispatch `error`.

[1] https://html.spec.whatwg.org/multipage/media.html#text-track-readiness-state
[2] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-failed-to-load
[3] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-failed-to-load-3

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

--HG--
extra : moz-landing-system : lando
2019-05-21 13:37:15 +00:00
alwu 330ae399ba Bug 1550633 - part6 : clear track's cues list whenever track element's src attribute set, changed or removed. r=jya,baku
According to the spec [1], we should empty track's cue list whenever a track element has its src attribute set, changed, or removed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:attr-track-src

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

--HG--
extra : moz-landing-system : lando
2019-05-21 09:21:16 +00:00
alwu fa25e850f3 Bug 1550633 - part2 : maybe start loading resource when the track's mode changes. r=jya
According to the spec [1], the user agent must start the track processing model when text track has its text track mode changed.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-20 09:30:01 +00:00
alwu 0c572a7d67 Bug 1550633 - part1 : HTMLTrackElement should not load resource when its text track is disable. r=jya
According to the spec step2 [1], we should not load resource for the track element which text track is disabled.

[1] https://html.spec.whatwg.org/multipage/media.html#start-the-track-processing-model

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

--HG--
extra : moz-landing-system : lando
2019-05-20 09:29:38 +00:00
dlee 9878ae650d Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 12:47:57 +00:00
Gurzau Raul 2666e16a53 Backed out 7 changesets (bug 1522412) for xpcshell failures at test_shouldclassify.js on a CLOSED TREE.
Backed out changeset 7c998456e1fd (bug 1522412)
Backed out changeset ebb581ddf1d1 (bug 1522412)
Backed out changeset 850e1c68d978 (bug 1522412)
Backed out changeset fe288a48cecb (bug 1522412)
Backed out changeset 5399bca472b1 (bug 1522412)
Backed out changeset 91e5b339fe11 (bug 1522412)
Backed out changeset b80098d0a5c4 (bug 1522412)
2019-03-21 11:02:09 +02:00
Dimi Lee 8f1caf4049 Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 07:30:51 +00:00
Jonathan Kingston 3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00