Commit Graph

5209 Commits

Author SHA1 Message Date
Andrea Marchesini
22d905d24e Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-03 06:09:52 +00:00
Csoregi Natalia
2d5cafc841 Backed out 5 changesets (bug 1639833) for failures on browser_blockingIndexedDbInWorkers.js. CLOSED TREE
Backed out changeset 6b4f76d65540 (bug 1639833)
Backed out changeset c77acba1aacb (bug 1639833)
Backed out changeset 30c97666919e (bug 1639833)
Backed out changeset d769b313441a (bug 1639833)
Backed out changeset ed41b41d1b03 (bug 1639833)
2020-06-02 15:02:31 +03:00
Andrea Marchesini
e31c7313ca Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-02 08:28:05 +00:00
Noemi Erli
f08b043cf6 Backed out 5 changesets (bug 1639833) for causing sessionstorage related failures CLOSED TREE
Backed out changeset b36af8d9db34 (bug 1639833)
Backed out changeset 712c11904dbe (bug 1639833)
Backed out changeset 14f1e4783582 (bug 1639833)
Backed out changeset b7f14c4cfe5d (bug 1639833)
Backed out changeset b4b25034dd83 (bug 1639833)
2020-06-01 19:31:50 +03:00
Andrea Marchesini
8c0df411d1 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-01 11:57:46 +00:00
Sylvestre Ledru
63be8d152d Bug 1519636 - Reformat recent changes to the Google coding style r=necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D77580
2020-05-30 09:55:27 +00:00
Alexis Beingessner
2c55bb187c Bug 1637727 - convert network.security.esni.enabled to a StaticPref. r=KrisWright,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D77102
2020-05-28 18:23:20 +00:00
Alex Chronopoulos
3e4dc03513 Bug 1636515 - Handle cycle in media element when it is fed with the captured stream. r=padenot
Feeding a media element with the captured stream from the same media element does not make sense. Currently the spec does not mention anything about it. I'll clarify the case in the spec. In the meantime, when a cycle is detected, the setting of the `srcObject` is ignored and a warning is produced in the console.

Differential Revision: https://phabricator.services.mozilla.com/D76821
2020-05-28 13:07:53 +00:00
Joel Maher
07907b271f Bug 1638915 - skip bug917595-iframe-1.html on coverage builds. r=aryx
skip bug917595-iframe-1.html on coverage builds.

Differential Revision: https://phabricator.services.mozilla.com/D77230
2020-05-28 10:45:28 +00:00
sefeng
31182cf837 Bug 1640334 - Use IgnoreErrors() at where it appropriates for HTMLDialogElement r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77137
2020-05-28 00:19:35 +00:00
sefeng
7c966cd62c Bug 1640336 - Use descriptive error messages for dialog.showModal() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D77126
2020-05-27 20:35:47 +00:00
Emilio Cobos Álvarez
54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
sefeng
727ca5589e Bug 1322947 - Add support of cancel dialog modal with escape key r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74937
2020-05-27 14:37:19 +00:00
longsonr
ef003847e5 Bug 1640280 - Extend autofocus to SVGGraphicsElement r=emilio
Note we're still limited to markup only because of bug 662496
so we don't pass the web platform tests for this feature.
Chrome has implemented support per
https://www.chromestatus.com/feature/5654905853313024
In SVG only SVGGraphicsElements are focusable.

Differential Revision: https://phabricator.services.mozilla.com/D76546
2020-05-27 07:59:07 +00:00
Emilio Cobos Álvarez
8020f8fc08 Bug 1640400 - Remove dom.link.disabled_attribute.enabled. r=jwatt
We've shipped this since bug 1281135 (Firefox 68).

Differential Revision: https://phabricator.services.mozilla.com/D76677
2020-05-26 09:31:49 +00:00
sefeng
f2affadce6 Bug 1324958 - Implement <dialog> focusing steps r=smaug
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dialog-focusing-steps

Differential Revision: https://phabricator.services.mozilla.com/D74923
2020-05-25 14:57:25 +00:00
Emilio Cobos Álvarez
89958b377a Bug 1640605 - Remove IsInAnonymousSubtree / IsRootOfAnonymousSubtree. r=edgar
In favor of the NativeAnonymous versions which they forward to.

Done automatically with:

  rg -l 'IsInAnonymousSubtree' | xargs sed -i 's/IsInAnonymousSubtree/IsInNativeAnonymousSubtree/g'

And removing the function definitions afterwards.

Differential Revision: https://phabricator.services.mozilla.com/D76681
2020-05-25 11:43:51 +00:00
Dorel Luca
a94d31585c Backed out changeset 1334652d0ec4 (bug 1640280) for build bustage in workspace/obj-build/dist/include/mozilla/dom/Document.h. CLOSED TREE 2020-05-25 01:31:54 +03:00
longsonr
cdcace5073 Bug 1640280 - Extend autofocus to SVGGraphicsElement r=emilio
Note we're still limited to markup only because of bug 662496
so we don't pass the web platform tests for this feature.
Chrome has implemented support per
https://www.chromestatus.com/feature/5654905853313024
In SVG only SVGGraphicsElements are focusable.

Differential Revision: https://phabricator.services.mozilla.com/D76546
2020-05-24 21:04:14 +00:00
sefeng
67c1284c8c Bug 1637307 - Push/Pop dialog to top layer when needed r=smaug,emilio
This patch completes the top layer requirement for showModal()
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-showmodal

Differential Revision: https://phabricator.services.mozilla.com/D74922
2020-05-23 01:45:33 +00:00
Boris Chiou
599c6939d9 Bug 1635939 - Let aspect-ratio (css-sizing-4) support 'auto | <ratio>'. r=emilio
In order to test its parsing and serialization, we expose it but protect
it behind a pref.

Besides, I would like to drop layout.css.aspect-ratio-number.enabled in
the next patch because the spec has been updated. It seems we don't have
to keep this pref and we should always use Number.

Differential Revision: https://phabricator.services.mozilla.com/D74955
2020-05-21 06:45:10 +00:00
Emilio Cobos Álvarez
c3b7227771 Bug 1639392 - Merge nsIStyleSheetLinkingElement and nsStyleLinkElement, and call it LinkStyle. r=jwatt
Which is the spec term. nsIStyleSheetLinkingElement is even more
confusing since it may not be an element at all (see: processing
instructions).

Differential Revision: https://phabricator.services.mozilla.com/D76071
2020-05-21 03:07:16 +00:00
Andrea Marchesini
e69aa140ef Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 3 - implementation, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75985
2020-05-20 17:27:43 +00:00
Razvan Maries
02e0a1d9a4 Backed out 3 changesets (bug 1639247) for build bustages on on StoragePrincipalHelper.cpp. CLOSED TREE
Backed out changeset 48a854ee6710 (bug 1639247)
Backed out changeset 032d302608e4 (bug 1639247)
Backed out changeset 2d2ff22a0ea4 (bug 1639247)
2020-05-20 19:34:22 +03:00
Andrea Marchesini
de934d0d8f Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 2 - implementation, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75985
2020-05-20 15:25:35 +00:00
Olli Pettay
9a394a854e Bug 1637712 - Consider to move *Ancestor* API to nsINode r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75169
2020-05-20 14:55:15 +00:00
Coroiu Cristina
a9c2a2b735 Backed out changeset bb7c330d407f (bug 1637307) for wpt failures at layout/generic/ViewportFrame.cpp on s CLOSED TREE 2020-05-20 00:01:55 +03:00
sefeng
ca6d5ba134 Bug 1637307 - Push/Pop dialog to top layer when needed r=smaug
This patch completes the top layer requirement for showModal()
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-showmodal

Differential Revision: https://phabricator.services.mozilla.com/D74922
2020-05-19 15:40:08 +00:00
alwu
386dc9b342 Bug 1627999 - part9 : handle the owner browsing context change for the media element. r=chunmin
This patch will do :
- update the media status when media changes its owner browsing context

The advantage of doing so :
- make the media status in `ContextMediaInfo` correcly

More details :
`ContextMediaInfo` stores the media status of each browsing context, but actually the media doesn't always need to stay in one browsing context. We can move it to other browsing contexts (iframe) by appending it to other browsing context's document body.
For example, in [1], we move the video from the main frame to another iframe.

Therefore, when we move the media to a new browsing context, we should also update its media status (controlledMedia/playing/audio number) for its previous owner browsing context.

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-to-other-document.html

Differential Revision: https://phabricator.services.mozilla.com/D75477
2020-05-16 00:26:20 +00:00
alwu
3c416fbc0a Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-15 21:50:10 +00:00
Csoregi Natalia
b6df18cc7a Backed out 9 changesets (bug 1627999) for bustages on HTMLMediaElement.cpp. CLOSED TREE
Backed out changeset 05ba58699a1b (bug 1627999)
Backed out changeset b9025bab4036 (bug 1627999)
Backed out changeset 2e1c8f9e8f88 (bug 1627999)
Backed out changeset 55ac831f54f3 (bug 1627999)
Backed out changeset e0fa806a6942 (bug 1627999)
Backed out changeset f4d85f0b61d9 (bug 1627999)
Backed out changeset 84434656006c (bug 1627999)
Backed out changeset 021c014ba882 (bug 1627999)
Backed out changeset 76c6b64928e9 (bug 1627999)
2020-05-16 00:22:23 +03:00
alwu
e71fdbe9e6 Bug 1627999 - part9 : handle the owner browsing context change for the media element. r=chunmin
This patch will do :
- update the media status when media changes its owner browsing context

The advantage of doing so :
- make the media status in `ContextMediaInfo` correcly

More details :
`ContextMediaInfo` stores the media status of each browsing context, but actually the media doesn't always need to stay in one browsing context. We can move it to other browsing contexts (iframe) by appending it to other browsing context's document body.
For example, in [1], we move the video from the main frame to another iframe.

Therefore, when we move the media to a new browsing context, we should also update its media status (controlledMedia/playing/audio number) for its previous owner browsing context.

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-to-other-document.html

Differential Revision: https://phabricator.services.mozilla.com/D75477
2020-05-15 21:00:45 +00:00
alwu
8c97b84395 Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-15 21:00:45 +00:00
Emilio Cobos Álvarez
b9c1bf761c Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT.

Differential Revision: https://phabricator.services.mozilla.com/D75231
2020-05-14 16:46:08 +00:00
Emilio Cobos Álvarez
ec9e0e8772 Bug 888884 - Make :read-write not apply for disabled controls to which readonly applies. r=edgar
Per https://html.spec.whatwg.org/#selector-read-write:

> The :read-write pseudo-class must match any element falling into one
> of the following categories [...]:
>
>   * input elements to which the readonly attribute applies, and that
>     are mutable (i.e. that do not have the readonly attribute
>     specified and that are not disabled)
>
>   * textarea elements that do not have a readonly attribute, and
>     that are not disabled.
>
>   * elements that are editing hosts or editable and are neither
>     input elements nor textarea elements.

This fixes the `:disabled` bits.

This matches Safari behavior and the spec, but not Chrome, which has our
behavior.

Fix the WPT, which had multiple issues, as :read-only is defined to be
just the opposite of :read-write. This will pass as soon as I unprefix
the pseudo-class.

Differential Revision: https://phabricator.services.mozilla.com/D75230
2020-05-14 13:58:20 +00:00
sanketh
d66dab82a7 Bug 1621433 - In RFP mode, turn canvas image extraction into a random 'poison pill' for fingerprinters r=tjr,jrmuizel
In RFP mode, canvas image extraction leads to an all-white image, replace that
with a random (sample 32 bytes of randomness and fill the buffer with that)
'poison pill'. This helps defeat naive fingerprinters by producing a random
image on every try. This feature is toggled using a new, default on, pref
`privacy.resistFingerprinting.randomDataOnCanvasExtract`.

Updated `browser_canvas_fingerprinting_resistance.js` to test this new feature
as well.

Updates and replaces D66308.

Differential Revision: https://phabricator.services.mozilla.com/D72716
2020-05-14 13:56:55 +00:00
Cosmin Sabou
3ed8e5317b Backed out 8 changesets (bug 1627999) for wpt failures on MediaPlaybackStatus.h. CLOSED TREE
Backed out changeset 98e98e2ecb56 (bug 1627999)
Backed out changeset 5533b1c9e3ed (bug 1627999)
Backed out changeset c9c9f78e131d (bug 1627999)
Backed out changeset 37b8f7a47ede (bug 1627999)
Backed out changeset 433a0eb70fc6 (bug 1627999)
Backed out changeset 72a1340bc112 (bug 1627999)
Backed out changeset 10e3550226eb (bug 1627999)
Backed out changeset 039ecd63e3fb (bug 1627999)
2020-05-14 12:29:01 +03:00
alwu
d6ea0a004a Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-14 03:20:17 +00:00
Emilio Cobos Álvarez
92acdc30e3 Bug 1637335 - Make MozEditableElement.editor flush frames if needed. r=smaug
URLBarInput relies on it being non-null when created, but that may not
happen if we construct frames lazily without this patch.

Differential Revision: https://phabricator.services.mozilla.com/D74891
2020-05-12 22:32:18 +00:00
Emilio Cobos Álvarez
099b4efd86 Bug 1637240 - Clean up iteration to find closest ancestor dialog in dialog form submission. r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D74845
2020-05-12 14:37:12 +00:00
sefeng
a2b762d097 Bug 1557303 - Enable form dialog method for some existing tests r=smaug
Since the form dialog method can be enabled via the pref, enable it in
some existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D73366
2020-05-08 00:16:37 +00:00
sefeng
283a047c3c Bug 1557303 - Implement form[method="dialog"] r=smaug
Spec: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submit-dialog

Differential Revision: https://phabricator.services.mozilla.com/D73364
2020-05-11 22:56:13 +00:00
Etienne Bruines
2dcc34270a Bug 1635806 - [testing] Expose eventName in BrowserTestUtils.waitForContentEvent r=ahal
This should make it easier to write tests for race-conditions, as
the resolving value now indicates which event was received.

This required updating a test which for some reason asserted
undefined being the resolving value, as a way of "testing" if the
Promise resolved at all. Since await already throws Errors when it
is rejected, and the test throws a timeout if it doesn't resolve in
time, this assertion was removed. It did not add any value.

Differential Revision: https://phabricator.services.mozilla.com/D74124
2020-05-11 21:29:05 +00:00
Honza Bambas
bc388980de Bug 1618322 - Merge network.preload.experimental pref to network.preload, r=dragana
Depends on D70235

Differential Revision: https://phabricator.services.mozilla.com/D70526
2020-05-11 14:15:30 +00:00
Edgar Chen
88a9a03a8a Bug 1618295 - Add imageSrcset and imageSizes attributes in HTMLLinkElement; r=hsivonen
See https://html.spec.whatwg.org/multipage/semantics.html#htmllinkelement.

Depends on D68786

Differential Revision: https://phabricator.services.mozilla.com/D71949
2020-05-11 14:08:58 +00:00
Honza Bambas
c83b99c509 Bug 1618299 - Teach dom::HTMLLinkElement about Document.Preloads(), r=smaug
Depends on D71378

Differential Revision: https://phabricator.services.mozilla.com/D67483
2020-05-11 14:06:45 +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
sanketh
2fee157360 Bug 1635224 - Preserve mLastValueChangeWasInteractive between SaveState and RestoreState r=emilio,masayuki
Modify PresState's string variant to also store whether the last change was
interactive, and preserve that property when saving and restoring state.

Differential Revision: https://phabricator.services.mozilla.com/D73920
2020-05-08 15:15:04 +00:00
Csoregi Natalia
4bb1a50963 Backed out changeset 8a48a3a488ab (bug 1621433) for hazard failures on CanvasRenderingContext2D.cpp CLOSED TREE 2020-05-08 09:39:25 +03:00