Commit Graph

5209 Commits

Author SHA1 Message Date
sanketh
44762b8054 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-07 22:45:27 +00:00
Jan-Ivar Bruaroey
036ac85331 Bug 1434601 - Do screen wakelock even without audio if video element is sourced by a media stream. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D74129
2020-05-07 21:35:37 +00:00
Simon Giesecke
7a24ea2236 Bug 1626570 - Improve handling of copying arrays in dom/html/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D73647
2020-05-07 08:09:51 +00:00
Emilio Cobos Álvarez
f0c67b2c33 Bug 1635733 - Tweak the fuzz range of two tests on android.
Differential Revision: https://phabricator.services.mozilla.com/D74126
2020-05-06 19:42:24 +00:00
Emilio Cobos Álvarez
ab9d506242 Bug 1635733 - Fuzz two tests that after bug 1311444 have fuzzy outlines on Windows.
Differential Revision: https://phabricator.services.mozilla.com/D74048
2020-05-06 14:45:01 +00:00
Emilio Cobos Álvarez
e8deb1ea7a Bug 1311444 - Disable outline-style: auto rendering on themed widgets, and use it for elements for which we otherwise disable outlines by default. r=Jamie,jfkthame
This guarantees outline indicators for these elements even if not
natively styled.

Differential Revision: https://phabricator.services.mozilla.com/D73856
2020-05-06 09:48:31 +00:00
Keith Cirkel
3b9cc2e96b Bug 1599415 trigger focus when details summary element is clicked r=TYLin,smaug
Differential Revision: https://phabricator.services.mozilla.com/D72603
2020-05-05 21:09:42 +00:00
Botond Ballo
5081d59c17 Bug 1556556 - Disable zoom-to-focused-input behaviour in dom/html/test/forms. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73775
2020-05-05 19:33:40 +00:00
Botond Ballo
173d001b86 Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-05-05 19:26:38 +00:00
Simon Giesecke
942d6510f3 Bug 1626570 - Improve handling of copying arrays in dom/html/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D73626
2020-05-05 10:08:15 +00:00
Emilio Cobos Álvarez
c9dbf72d3b Bug 1635082 - Remove nsImageLoadingContent::GetImageReferrerPolicy. r=edgar
It's useless now, the relevant check lives in
ReferrerInfo::InitFromNode.

Differential Revision: https://phabricator.services.mozilla.com/D73620
2020-05-04 21:26:38 +00:00
Emilio Cobos Álvarez
a59ab657b0 Bug 1635082 - Fix crossorigin relevant mutation tests. r=edgar
referrerpolicy and crossorigin changes were handled in
AfterMaybeChangeAttr, but were only handling the case where the
attribute changed (that is, the AfterSetAttr caller). However
AfterSetAttr only calls AfterMaybeChangeAttr if there's a new value,
which means that we don't handle attribute removal.

So their handling can just move to AfterSetAttr, and we can simplify
AfterMaybeChangeAttr to just deal with src changes which is what it was
intended to deal with anyhow.

Differential Revision: https://phabricator.services.mozilla.com/D73619
2020-05-04 21:18:41 +00:00
Emilio Cobos Álvarez
761e9dfe4c Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 18:50:20 +00:00
Cosmin Sabou
71a40eae48 Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE
Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
2020-05-04 20:04:06 +03:00
Emilio Cobos Álvarez
6dde680742 Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 16:26:51 +00:00
Jonathan Watt
468b918bcd Bug 1634474. Make dom/html/ buildable outside of unified-build environment. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D73309
2020-05-04 14:29:02 +00:00
Emilio Cobos Álvarez
18aa21e2ae Bug 1634153 - Rename and devirtualize nsITextControlFrame::ScrollSelectionIntoView. r=masayuki
To make clear it happens async.

Depends on D73181

Differential Revision: https://phabricator.services.mozilla.com/D73185
2020-04-30 04:04:40 +00:00
Masayuki Nakano
11af44e544 Bug 1632726 - part 2: Remove some unused nsISelectionController methods r=smaug
Even in comm-central and BlueGriffon, `nsISelectionController::*ForDelete()`
are not used.  Therefore, we can remove them safely.

Differential Revision: https://phabricator.services.mozilla.com/D72296
2020-04-27 06:20:31 +00:00
Kris Maglione
f7e694f8cc Bug 1630691: Part 2 - Get rid of the "dom.mozBrowserFramesEnabled" pref. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D71227
2020-04-29 19:29:11 +00:00
Kris Maglione
c5353a7809 Bug 1630691: Part 1 - Get rid of most of the remaining mozbrowser API. r=nika,mtigley,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D71226
2020-04-29 19:29:06 +00:00
Bobby Holley
216d17b976 Bug 1631304 - Mark the tail dispatcher as unavailable outside of event dispatch. r=jya
This is in preparation for running the tail dispatcher off
nsIThreadObserver callbacks, which only work during regular
event processing.

Differential Revision: https://phabricator.services.mozilla.com/D72264
2020-04-28 21:18:21 +00:00
Timothy Gu
6407f13ce3 Bug 1628500 - Remove aIgnoreTabindex argument from Element::IsInteractiveHTMLContent(). r=edgar
This argument is set to true everywhere, and soon HTML will no longer consider
tabindex for interactive content: https://github.com/whatwg/html/pull/5457.

Differential Revision: https://phabricator.services.mozilla.com/D72568
2020-04-28 11:22:32 +00:00
Csoregi Natalia
b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo
405c8807cd Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-04-28 01:40:35 +00:00
alwu
b368e58a84 Bug 1632301 - part4 : rename 'ControlledMediaState' to 'MediaPlaybackState'. r=bryce
This patch will do :
- rename `ControlledMediaState` to `MediaPlaybackState`
- rename the related functions

The advantage of doing so :
- more consistent with `MediaAudibleState`

Differential Revision: https://phabricator.services.mozilla.com/D72060
2020-04-28 07:14:05 +00:00
alwu
d1cbaeb672 Bug 1632301 - part3 : use MediaAudibleState to replace boolean value. r=bryce
This patch will do :
- replace `boolean` with enum class `MediaAudibleState`

The advantage of doing so :
- It's easier to understand what actually meaning of the parameter we set

Differential Revision: https://phabricator.services.mozilla.com/D72058
2020-04-28 07:14:05 +00:00
alwu
db7bb9c21e Bug 1632301 - part2 : use ContentControlKeyEventReceiver's browsing context to notify any changes. r=bryce
This patch will do :
- use current broswing context as a parameter when propagate state change to the chrome process.

The advantage of doing so :
- the chrome process can know which browsing context the state change actually comes from.

---

More details about this change :

Currently, when we propagate any controlled media related states, we would find the top level browsing context first, then pass it through IPC in order to get the correct media controller in the chrome process. However, we have implemented [1] which can find the correct media controller even if we are not passing the top level browsing context.

In addition, in bug1627999, we would like to know which browsing context those states come from. Therefore, we should replace the top browsing context with the current browsing context where controlled media exists.

[1] https://searchfox.org/mozilla-central/rev/41c3ea3ee8eab9ce7b82932257cb80b703cbba67/docshell/base/CanonicalBrowsingContext.cpp#511-515

Differential Revision: https://phabricator.services.mozilla.com/D72056
2020-04-28 05:10:21 +00:00
alwu
25b47e1707 Bug 1632301 - part1 : decouple ContentMediaController from MediaControlKeysEventListener/MediaControlKeysEventSource. r=bryce
This patch will do :
- remove the inheritance relationship for `ContentControlKeyEventReceiver` and `ContentMediaAgent` and manually implement the methods we need
- `MediaControlEventListener` will inherit from `ContentControlKeyEventReceiver` directly

The advantage of doing so :
- increase the flexibilty of modification of `ContentMediaAgent` and those modification won't affect other classes inherited from `MediaControlKeysEventListener`

---

More details about this change :

As we would like to extend the class `ContentMediaAgent` and allow the `ContentMediaController` to call its extended method, but if we want to do so in current implementation, the extended method would also affect other classes inherited from `MediaControlKeysEventListener` and that is something we don't want to see.

Considering that, I decided to decouple the inheritance relationship and manually create the function I need (which will be implemented in the next patch)

Differential Revision: https://phabricator.services.mozilla.com/D72054
2020-04-28 05:10:03 +00:00
Andreea Pavel
e8fa2263a8 Bug 1434744 - disable test_allowMedia.html on mac shippable, win debug and linux18.04 qr debug r=egao
Differential Revision: https://phabricator.services.mozilla.com/D72728
2020-04-27 19:40:58 +00:00
Masayuki Nakano
f3a31a9bda Bug 1632724 - part 4: Rename HTMLEditor::DeleteSelectionWithTransaction() r=m_kato
`HTMLEditor::DeleteSelectionWithTransaction()` calls `EditorBase`'s overridden
method and handles `nsIEditor::eStrip` case.  Therefore, we can rename it with
stop calling the `EditorBase::DeleteSelectionWithTransaction()`, and make it
called by `EditorBase::DeleteSelectionWithTransaction()` only when it's
necessary.

Additionally, we can make all internal method callers of editor classes always
set `nsIEditor::eNoStrip` if the instance is `TextEditor`.  This must make
the code easier to understand.

Depends on D72292

Differential Revision: https://phabricator.services.mozilla.com/D72293
2020-04-27 00:36:10 +00:00
Sylvestre Ledru
34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
alwu
f1a19842ed Bug 1631087 - Update the timing of propagating media element's audible state. r=chunmin
After applying this patch,
- notify `inaudible` state only if we already notified `audible` state before
- update `inaudible` state when audible media is paused

Therefore, in the media controller side, it would always see a pair of `audible/inaudible` notifications like what we do for the pair of `ControlledMediaState::ePlayed/ePaused` notifications. That can help us implement a way of maintaining a detailed counting about how many media is audible in bug1627999.

Differential Revision: https://phabricator.services.mozilla.com/D71429
2020-04-25 00:34:02 +00:00
Emilio Cobos Álvarez
1dc797fbaf Bug 1631776 - Unifdef ImageDocument's resolution logic. r=botond
We want this to apply to desktop zooming too.

Differential Revision: https://phabricator.services.mozilla.com/D71761
2020-04-24 15:23:25 +00:00
Nika Layzell
b78af76e07 Bug 1580565 - Part 2: Delay creating nsFrameLoader in static clone until embedder has window, r=smaug
Follow-up parts in this bug depend on being able to read the `nsGlobalWindow`
which embeds a `nsFrameLoader` within `CreateBrowsingContext`, which is called
from the `nsFrameLoader` constructor. Unfortunately, we depend on creating the
`nsFrameLoader` and `BrowsingContext` before we have the window as part of the
fix to bug 1577711.

This patch changes `BuildNestedPrintObjects` to instead use a list of pending
clones stored on the parent `Document` object, and delays creation of the
`nsFrameLoader`, and thus the inner `BrowsingContext`, until after the document
has an owner global.

Due to the low number of automated tests for printing, I manually tested
print-previewing both the reduced test case from bug 1577711, a wikipedia
article, and 'data:text/html,<object data="data:text/html,hi">' to avoid
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D71236
2020-04-24 18:32:59 +00:00
Simon Giesecke
191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Narcis Beleuzu
fffdcb0203 Backed out 7 changesets (bug 1580565) for bustages on nsDocShell.cpp . CLOSED TREE
Backed out changeset 8237f9a307f8 (bug 1580565)
Backed out changeset 47f5698d6c72 (bug 1580565)
Backed out changeset e1802670dcc4 (bug 1580565)
Backed out changeset 0a44c410b59b (bug 1580565)
Backed out changeset 20dbcfc9eacc (bug 1580565)
Backed out changeset cdf2b600e779 (bug 1580565)
Backed out changeset a421d33d03ce (bug 1580565)
2020-04-24 05:31:55 +03:00
Paul Bone
4e341bce84 Bug 1603007 - Remove allowLinkedWebInFileUriProcess r=nika
This patch removes the allowLinkedWebInFileUriProcess pref, but one
code-path is kept because when DocumentChannel is disabled a HTTP POST load
from a file:// page would loose the postData, so that case keeps the FILE
remote type.

Differential Revision: https://phabricator.services.mozilla.com/D69923
2020-04-23 17:15:09 +00:00
Nika Layzell
6b085abf8a Bug 1580565 - Part 2: Delay creating nsFrameLoader in static clone until embedder has window, r=smaug
Follow-up parts in this bug depend on being able to read the `nsGlobalWindow`
which embeds a `nsFrameLoader` within `CreateBrowsingContext`, which is called
from the `nsFrameLoader` constructor. Unfortunately, we depend on creating the
`nsFrameLoader` and `BrowsingContext` before we have the window as part of the
fix to bug 1577711.

This patch changes `BuildNestedPrintObjects` to instead use a list of pending
clones stored on the parent `Document` object, and delays creation of the
`nsFrameLoader`, and thus the inner `BrowsingContext`, until after the document
has an owner global.

Due to the low number of automated tests for printing, I manually tested
print-previewing both the reduced test case from bug 1577711, a wikipedia
article, and 'data:text/html,<object data="data:text/html,hi">' to avoid
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D71236
2020-04-23 21:52:37 +00:00
Emilio Cobos Álvarez
d36c96ab4c Bug 1612068 - Move zoom from the content viewer to the browsing context. r=nika
We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.

It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.

The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.

The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.

I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.

I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.

Differential Revision: https://phabricator.services.mozilla.com/D71969
2020-04-22 19:32:52 +00:00
Miko Mynttinen
76b3952248 Bug 1627594 - Schedule a full paint when canvas element is invalidated before the first paint r=kats
Differential Revision: https://phabricator.services.mozilla.com/D72049
2020-04-23 13:20:34 +00:00
Hiroyuki Ikezoe
30fecfdb2e Bug 1632020 - Don't handle no content attribute meta viewport tag. r=smaug
That's what Chrome does basically and it does quite make sense. But in the test
case of test_meta_viewport_removing_content_attribute.html which removes a valid
content attribute, Chrome uses the removed content, which seems a bug in Chrome
I've reported before [1], and I believe we shouldn't mimic the bug.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=986674

Differential Revision: https://phabricator.services.mozilla.com/D71879
2020-04-23 07:46:45 +00:00
Emilio Cobos Álvarez
9e5043455d Bug 1631887 - And another one.
MANUAL PUSH: Random android orange green-up.
2020-04-23 01:09:42 +02:00
Emilio Cobos Álvarez
4106368765 Bug 1631887 - Fuzz another autofocus test a little bit.
MANUAL PUSH: Android tests fail non-deterministically, so greening up CLOSED TREE.
2020-04-22 23:03:20 +02:00
Andreea Pavel
b74d860d87 Backed out 7 changesets (bug 1580565) for bc failures on a CLOSED TREE
Backed out changeset e44e0a6366f8 (bug 1580565)
Backed out changeset c0849928f934 (bug 1580565)
Backed out changeset 3d4f155096be (bug 1580565)
Backed out changeset 108d5fb4418e (bug 1580565)
Backed out changeset d8dea951a032 (bug 1580565)
Backed out changeset f9ab41f29552 (bug 1580565)
Backed out changeset fd5d76304c09 (bug 1580565)
2020-04-22 21:51:17 +03:00
Nika Layzell
78fffd800e Bug 1580565 - Part 2: Delay creating nsFrameLoader in static clone until embedder has window, r=smaug
Follow-up parts in this bug depend on being able to read the `nsGlobalWindow`
which embeds a `nsFrameLoader` within `CreateBrowsingContext`, which is called
from the `nsFrameLoader` constructor. Unfortunately, we depend on creating the
`nsFrameLoader` and `BrowsingContext` before we have the window as part of the
fix to bug 1577711.

This patch changes `BuildNestedPrintObjects` to instead use a list of pending
clones stored on the parent `Document` object, and delays creation of the
`nsFrameLoader`, and thus the inner `BrowsingContext`, until after the document
has an owner global.

Due to the low number of automated tests for printing, I manually tested
print-previewing both the reduced test case from bug 1577711, a wikipedia
article, and 'data:text/html,<object data="data:text/html,hi">' to avoid
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D71236
2020-04-22 15:48:22 +00:00
Dorel Luca
7daa9a6695 Backed out 7 changesets (bug 1580565) for Gecko-view failures in Test.crashParent. CLOSED TREE
Backed out changeset 7da9785ebb06 (bug 1580565)
Backed out changeset a80e177a91b2 (bug 1580565)
Backed out changeset 2cf821f2a6ea (bug 1580565)
Backed out changeset a30f158eba45 (bug 1580565)
Backed out changeset 276b131190a8 (bug 1580565)
Backed out changeset 3c15e4c600c4 (bug 1580565)
Backed out changeset bf8877cdb10f (bug 1580565)
2020-04-22 18:42:24 +03:00
Nika Layzell
daa9e7acad Bug 1580565 - Part 2: Delay creating nsFrameLoader in static clone until embedder has window, r=smaug
Follow-up parts in this bug depend on being able to read the `nsGlobalWindow`
which embeds a `nsFrameLoader` within `CreateBrowsingContext`, which is called
from the `nsFrameLoader` constructor. Unfortunately, we depend on creating the
`nsFrameLoader` and `BrowsingContext` before we have the window as part of the
fix to bug 1577711.

This patch changes `BuildNestedPrintObjects` to instead use a list of pending
clones stored on the parent `Document` object, and delays creation of the
`nsFrameLoader`, and thus the inner `BrowsingContext`, until after the document
has an owner global.

Due to the low number of automated tests for printing, I manually tested
print-previewing both the reduced test case from bug 1577711, a wikipedia
article, and 'data:text/html,<object data="data:text/html,hi">' to avoid
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D71236
2020-04-22 03:22:00 +00:00
Bogdan Tara
4bd759fa8e Backed out 7 changesets (bug 1580565) for browser_entry_point_telemetry.js failures CLOSED TREE
Backed out changeset 12a4f3de76a8 (bug 1580565)
Backed out changeset 81d537df2dc1 (bug 1580565)
Backed out changeset b182e872c9d4 (bug 1580565)
Backed out changeset 0b4595b2c153 (bug 1580565)
Backed out changeset 4363e3a3d799 (bug 1580565)
Backed out changeset cbb14b2c7b33 (bug 1580565)
Backed out changeset 46b251848297 (bug 1580565)
2020-04-22 06:15:43 +03:00
alwu
1933899aff Bug 1625615 - part5 : add test-only attribute and event for media element. r=bryce,emilio
Differential Revision: https://phabricator.services.mozilla.com/D69674
2020-04-20 21:19:57 +00:00
alwu
7cd282b498 Bug 1625615 - part4 : start listener if we haven't started listener yet. r=bryce
There is actually possible to start the listener already while running `SuspendOrResumeElement()`, so we should remove the assertion and use a check instead.

Eg.  JS can call `play()`, which would start the listener, before we run this method. This situation can be found when browsing Youtube on the GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D69673
2020-04-20 21:19:57 +00:00
alwu
a4a77fb633 Bug 1625615 - part3 : prevent media starting playing when inactive docshell wants to suspend any media. r=bryce
When the docShell's `SuspendMediaWhenInactive` flag is true, no media should be allowed to start playing. Therefore, we add a check in `Play()`, `CanActivateAutoplay()` to prevent media from playing. In addition, we should also prevent the audio channel agant from starting.

Differential Revision: https://phabricator.services.mozilla.com/D69672
2020-04-20 21:19:57 +00:00
alwu
b69e72e2f8 Bug 1625615 - part2 : suspend or resume media element according to docShell's SuspendMediaWhenInactive r=bryce
If docShell's `SuspendMediaWhenInactive` is true, then we should suspend or resume the media element according to the docshell active state when the docshell changes it active state.

Differential Revision: https://phabricator.services.mozilla.com/D69671
2020-04-20 21:19:56 +00:00
Nika Layzell
1872a6cc8d Bug 1580565 - Part 2: Delay creating nsFrameLoader in static clone until embedder has window, r=smaug
Follow-up parts in this bug depend on being able to read the `nsGlobalWindow`
which embeds a `nsFrameLoader` within `CreateBrowsingContext`, which is called
from the `nsFrameLoader` constructor. Unfortunately, we depend on creating the
`nsFrameLoader` and `BrowsingContext` before we have the window as part of the
fix to bug 1577711.

This patch changes `BuildNestedPrintObjects` to instead use a list of pending
clones stored on the parent `Document` object, and delays creation of the
`nsFrameLoader`, and thus the inner `BrowsingContext`, until after the document
has an owner global.

Due to the low number of automated tests for printing, I manually tested
print-previewing both the reduced test case from bug 1577711, a wikipedia
article, and 'data:text/html,<object data="data:text/html,hi">' to avoid
regressions.

Differential Revision: https://phabricator.services.mozilla.com/D71236
2020-04-22 01:37:50 +00:00
Emilio Cobos Álvarez
17c0d2b9bb Bug 1631776 - Store an HTMLImageElement in ImageDocument. r=smaug
Saves a few QIs and such.

Differential Revision: https://phabricator.services.mozilla.com/D71759
2020-04-21 16:45:36 +00:00
Emilio Cobos Álvarez
d2d688801d Bug 1631776 - Track less state about overflow in ImageDocument. r=smaug
The overflow can be inferred from other variables.

Differential Revision: https://phabricator.services.mozilla.com/D71758
2020-04-21 16:45:23 +00:00
Emilio Cobos Álvarez
ca6c55183a Bug 1631776 - Remove ImageDocument.restoreImageTo. r=smaug
Unused except for one caller that can just be inlined.

Differential Revision: https://phabricator.services.mozilla.com/D71757
2020-04-21 16:51:51 +00:00
Emilio Cobos Álvarez
36096a9aee Bug 1631776 - Miscellaneous cleanups on ImageDocument. r=smaug
The comment no longer made any sense, and IgnoreErrors() is nicer than
manually doing so.

Differential Revision: https://phabricator.services.mozilla.com/D71755
2020-04-21 16:51:51 +00:00
Emilio Cobos Álvarez
3cb235302a Bug 1631776 - Convert some imagedocument prefs to static prefs. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71753
2020-04-21 15:40:55 +00:00
Makoto Kato
3d671e1047 Bug 1631401 - Need to wait for setBoolPerf. r=masayuki
I made a misteake on inputmode mochitest. I forget to wait for setter of preference.

Differential Revision: https://phabricator.services.mozilla.com/D71706
2020-04-21 05:16:34 +00:00
Jean-Yves Avenard
d882415a98 Bug 1630802 - P8. Remove unnecessary AutoEnter. r=bholley
AutoEnter was an attempt around a race between AbstractThread and MessageLoopAbstractThreadWrap that would cause AbstractThread::GetCurrent() to return an incorrect value. MessageLoopAbstractThreadWrapper is no more and as such AutoEnter is no longer required.

Differential Revision: https://phabricator.services.mozilla.com/D71279
2020-04-20 02:13:31 +00:00
Dzmitry Malyshau
02f2325796 Bug 1630072 - WebGPU CanvasContext invalidation r=jgilbert,aosmond
This change enables light tracking of the commands and submissions
that affect a CanvasContext. Upon reaching the GPUQueue, they send
a signal for the parent HTML Element to be invalidated.
We are also invalidating the HTML Element and requesting a new
frame to be built on the creation of the swapchain.

Differential Revision: https://phabricator.services.mozilla.com/D71194
2020-04-20 23:50:04 +00:00
Kris Maglione
750c91bab6 Bug 1614462: Part 3a - Remove support for <iframe mozbrowser> in content processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70748
2020-04-20 22:15:26 +00:00
Kris Maglione
664885884e Bug 1614462: Part 2c - Remove content mozbrowser tests. r=mccr8,marionette-reviewers,whimboo
<iframe mozbrowser> is no longer supported in content processes.

Differential Revision: https://phabricator.services.mozilla.com/D70744
2020-04-20 22:15:35 +00:00
Emilio Cobos Álvarez
dd7b10c14b Bug 1631541 - Minor style cleanup in ImageDocument.h. r=smaug
Remove redundant parameter names, and remove useless virtual.

Differential Revision: https://phabricator.services.mozilla.com/D71627
2020-04-20 19:31:26 +00:00
Emilio Cobos Álvarez
66c26340c4 Bug 1631541 - Remove unused ImageDocument webidl bits. r=smaug
The rest are used only for testing, but I'll figure what to do with
those in some other bug.

Differential Revision: https://phabricator.services.mozilla.com/D71626
2020-04-20 20:23:52 +00:00
Emilio Cobos Álvarez
df2e891775 Bug 1631541 - Remove nsIImageDocument. r=webidl,smaug
Seems unused, and it'd be superseded by the webidl version of
ImageDocument anyways.

Differential Revision: https://phabricator.services.mozilla.com/D71625
2020-04-20 19:23:10 +00:00
Ciure Andrei
a5ac2a8bbc Backed out 10 changesets (bug 1614462) for causing test_ipc_messagemanager_blob.js failures CLOSED TREE
Backed out changeset bf4f8253c708 (bug 1614462)
Backed out changeset c61b797d63e9 (bug 1614462)
Backed out changeset 284002de7137 (bug 1614462)
Backed out changeset 7f604ee5731c (bug 1614462)
Backed out changeset a73ef8167cd4 (bug 1614462)
Backed out changeset ecc3477ed34e (bug 1614462)
Backed out changeset 2106f3ccc4b5 (bug 1614462)
Backed out changeset e68c38a7741d (bug 1614462)
Backed out changeset 93b3bacdbb34 (bug 1614462)
Backed out changeset 0cf4898ae08d (bug 1614462)
2020-04-21 01:11:37 +03:00
Tetsuharu Ohzeki
2c0fa633d2 Bug 1631548 - part 2: Remove nsGenericHTMLFrameElement::mFrameLoaderCreationDisallowed. r=emilio
Setters for this field are removed in the previous commit.
This field is always false. We can remove it.

Differential Revision: https://phabricator.services.mozilla.com/D71630
2020-04-20 19:02:24 +00:00
Tetsuharu Ohzeki
138c709444 Bug 1631548 - part 1: Remove unused methods from nsGenericHTMLFrameElement. r=emilio
This removes:

- `nsGenericHTMLFrameElement::CreateRemoteFrameLoader()`
- `nsGenericHTMLFrameElement::AllowCreateFrameLoader()`
- `nsGenericHTMLFrameElement::DisallowCreateFrameLoader()`

These were moved from nsIMozBrowserFrame interface in bug 1525720.

Differential Revision: https://phabricator.services.mozilla.com/D71629
2020-04-20 19:02:12 +00:00
Kris Maglione
f8eabd5b2a Bug 1614462: Part 3a - Remove support for <iframe mozbrowser> in content processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70748
2020-04-20 20:11:50 +00:00
Kris Maglione
6a5589ef4f Bug 1614462: Part 2c - Remove content mozbrowser tests. r=mccr8,marionette-reviewers,whimboo
<iframe mozbrowser> is no longer supported in content processes.

Differential Revision: https://phabricator.services.mozilla.com/D70744
2020-04-20 20:11:41 +00:00
pbz
388d8ca712 Bug 616849 - Made insecure form submission prompt tab modal. r=johannh,baku
Differential Revision: https://phabricator.services.mozilla.com/D70189
2020-04-20 13:56:02 +00:00
Paul Bone
ce060c70b4 Bug 1629441 - Defer to DocumentChannel in shouldLoadURLInThisProcess r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D71331
2020-04-20 07:34:11 +00:00
Mihai Alexandru Michis
720a2a68e6 Backed out changeset ebea9991db0e (bug 1629441) for causing lint failures in browser_form_post_from_file_to_http.js
CLOSED TREE
2020-04-20 08:12:40 +03:00
Paul Bone
6262bc6b58 Bug 1629441 - Defer to DocumentChannel in shouldLoadURLInThisProcess r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D71331
2020-04-20 04:43:06 +00:00
Makoto Kato
fa2567e7c8 Bug 1630645 - Add more inputmode tests for widget. r=masayuki
`inputmode` DOM API are in WPT, but I should add more tests for widget.

Differential Revision: https://phabricator.services.mozilla.com/D71248
2020-04-17 02:35:56 +00:00
Cameron McCormack
e91f99f8e1 Bug 1616411 - Part 7: Tests. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70277
2020-04-17 02:57:49 +00:00
Ciure Andrei
c15dcac93b Backed out 10 changesets (bug 1614462) for causing xpcshell failures CLOSED TREE
Backed out changeset 34d4a86530b4 (bug 1614462)
Backed out changeset dbc2e2556d08 (bug 1614462)
Backed out changeset 512bbab4730c (bug 1614462)
Backed out changeset cd6b8d630f4c (bug 1614462)
Backed out changeset e4ad5037658f (bug 1614462)
Backed out changeset 0ffed1dc4296 (bug 1614462)
Backed out changeset 90ed81cbfe34 (bug 1614462)
Backed out changeset 6d2137eb1d52 (bug 1614462)
Backed out changeset b4819c99e16e (bug 1614462)
Backed out changeset b7deaed376ed (bug 1614462)
2020-04-17 02:26:14 +03:00
Kris Maglione
7969b8768d Bug 1614462: Part 3a - Remove support for <iframe mozbrowser> in content processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70748
2020-04-16 16:57:20 +00:00
Kris Maglione
342edc77b2 Bug 1614462: Part 2c - Remove content mozbrowser tests. r=mccr8
<iframe mozbrowser> is no longer supported in content processes.

Differential Revision: https://phabricator.services.mozilla.com/D70744
2020-04-16 22:20:05 +00:00
Eames
8dcf22da54 Bug 1622659 - Removed 'else' after 'return' in HTMLInputElement - r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D71177
2020-04-16 13:25:18 +00:00
Csoregi Natalia
ea673441ce Backed out 8 changesets (bug 1616411) for webgl failures on test_2_conformance__textures__misc__texture-upload-size.html. CLOSED TREE
Backed out changeset 03dd88d53439 (bug 1616411)
Backed out changeset cfee2ce9405d (bug 1616411)
Backed out changeset 0a323c33506f (bug 1616411)
Backed out changeset 1a25353a07b0 (bug 1616411)
Backed out changeset dc64af52b5f8 (bug 1616411)
Backed out changeset 0f54b1b12105 (bug 1616411)
Backed out changeset 4dee3e753e8e (bug 1616411)
Backed out changeset 034a30a6b088 (bug 1616411)
2020-04-16 05:43:16 +03:00
Cameron McCormack
1c996b2686 Bug 1616411 - Part 7: Tests. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D70277

--HG--
extra : moz-landing-system : lando
2020-04-16 00:34:46 +00:00
Csoregi Natalia
de8e762887 Backed out 7 changesets (bug 1625615) for multiple failures e.g. /test_windowedhistoryframes.html. CLOSED TREE
Backed out changeset f239d24658c9 (bug 1625615)
Backed out changeset acea7c78db20 (bug 1625615)
Backed out changeset d709f5a72c35 (bug 1625615)
Backed out changeset 4cd231b1f3fb (bug 1625615)
Backed out changeset 45942c8dc380 (bug 1625615)
Backed out changeset 3f03a8703a8a (bug 1625615)
Backed out changeset e9299fc48796 (bug 1625615)
2020-04-16 00:32:16 +03:00
alwu
3313825099 Bug 1625615 - part5 : add test-only attribute and event for media element. r=bryce,emilio
Differential Revision: https://phabricator.services.mozilla.com/D69674

--HG--
extra : moz-landing-system : lando
2020-04-15 20:14:14 +00:00
alwu
1702ad395a Bug 1625615 - part4 : start listener if we haven't started listener yet. r=bryce
There is actually possible to start the listener already while running `SuspendOrResumeElement()`, so we should remove the assertion and use a check instead.

Eg.  JS can call `play()`, which would start the listener, before we run this method. This situation can be found when browsing Youtube on the GeckoView.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 17:51:15 +00:00
alwu
7d557acf89 Bug 1625615 - part3 : prevent media starting playing when inactive docshell wants to suspend any media. r=bryce
When the docShell's `SuspendMediaWhenInactive` flag is true, no media should be allowed to start playing. Therefore, we add a check in `Play()`, `CanActivateAutoplay()` to prevent media from playing. In addition, we should also prevent the audio channel agant from starting.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 21:36:40 +00:00
alwu
19c4e866db Bug 1625615 - part2 : suspend or resume media element according to docShell's SuspendMediaWhenInactive r=bryce
If docShell's `SuspendMediaWhenInactive` is true, then we should suspend or resume the media element according to the docshell active state when the docshell changes it active state.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 22:30:10 +00:00
Kershaw Chang
80e58dcb72 Bug 1625151 - P2: Lazy initialize nsHTMLDNSPrefetch::sDNSService r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D68389

--HG--
extra : moz-landing-system : lando
2020-04-14 09:14:49 +00:00
Csoregi Natalia
ec3a77d6ee Backed out 2 changesets (bug 1625151) for crashes on nsAutoOwningThread. CLOSED TREE
Backed out changeset 465d2418e50c (bug 1625151)
Backed out changeset 991c18b616e3 (bug 1625151)
2020-04-13 14:56:20 +03:00
Emilio Cobos Álvarez
142b7d3c57 Bug 1629096 - Always honor scroll-margin / scroll-padding from nsFocusManager. r=masayuki
We should always do this, otherwise stuff may not end up being visible which is
not acceptable for focus navigation.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 11:34:48 +00:00
Kershaw Chang
9bfcce4383 Bug 1625151 - P2: Lazy initialize nsHTMLDNSPrefetch::sDNSService r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D68389

--HG--
extra : moz-landing-system : lando
2020-04-13 08:31:09 +00:00
Hiroyuki Ikezoe
d70e0416b7 Bug 1628894 - Defer loading images with srcset attribute if the loading was set to "lazy" before we start loading the srcset images. r=emilio
As per the HTML standard spec[1], checking the document active state is the
first step of the "update the image data", so we just check the lazy loading
state just before we call LoadSelectedImage() in the ImageLoadTask instead
of using ShouldLoadImage().

NOTE: To be more compliant with the spec the lazy loading check should be done
in nsImageLoadingContent::LoadImage just after we initialized the referrer info
for the image element [2], but it involves some amount of work since we've
already done a bunch of stuff before we reach there (e.g. firing events).  Given
that Chrome handles srcset attribute changes in a sync way ([3] for example),
even if this change is not fully compliant with the spec, it will not introduce
new web compatibility issues.

[1] https://html.spec.whatwg.org/multipage/images.html#update-the-image-data
[2] https://searchfox.org/mozilla-central/rev/9120151ddb35f2d4c37bfe613a54a4f10a9a3dc5/dom/base/nsImageLoadingContent.cpp#1168
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=774722

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

--HG--
extra : moz-landing-system : lando
2020-04-10 23:21:03 +00:00
Sydney
d224a48fdf Bug 1624232 - 1624232: Replaced 'else if' with 'if' after 'return' in dom/html/TextTrackManager.cpp r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68114

--HG--
extra : moz-landing-system : lando
2020-04-09 20:05:41 +00:00
Coroiu Cristina
8c618625fe Backed out 2 changesets (bug 1625151) for build bustage at netwerk/dns/ChildDNSService.cpp on a CLOSED TREE
Backed out changeset bb8ac156944b (bug 1625151)
Backed out changeset ca74746771d7 (bug 1625151)
2020-04-10 00:58:16 +03:00
Kershaw Chang
71ef6a9905 Bug 1625151 - P2: Lazy initialize nsHTMLDNSPrefetch::sDNSService r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D68389

--HG--
extra : moz-landing-system : lando
2020-04-09 16:00:28 +00:00
Nika Layzell
349de0b692 Bug 1616353 - Part 7.7: Remove window initialization properties which are redundant with nsOpenWindowInfo, r=kmag
These properties used to be passed to newly created content windows in many
different ways, but are now unified under nsOpenWindowInfo. This patch cleans up
the remaining properties.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 21:39:44 +00:00
Nika Layzell
3fee0903f1 Bug 1616353 - Part 7.3: Use nsOpenWindowInfo for initializing xul:browser elements, r=kmag
This patch adds a `openWindowInfo` XPCOM attribute to the `nsIBrowser` interface
supported by the browser custom element. This attribute is then read by
`XULFrameElement`, and passed to `nsFrameLoader` to ensure the relevant flags
are used for newly opened windows.

This patch does not add support for passing openWindowInfo into mozbrowser
elements.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 21:39:34 +00:00
Valentin Gosu
f29e4186dd Bug 1625213 - Make txt records be resolved with onLookupComplete r=dragana
This patch makes nsIDNSByTypeRecord extend nsIDNSRecord, but implementations
will safely forward the nsIDNSRecord methods to `nullptr`, meaning they will
throw an error when called.

Consumers should try to QI the nsIDNSRecord to nsIDNSByTypeRecord (or any
future types) and use that.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 12:39:45 +00:00
Mihai Alexandru Michis
5c60242230 Backed out 6 changesets (bug 1350875) for causing failures in test.util.UiThreadUtils$TimeoutException
CLOSED TREE

Backed out changeset c65f2c0b6332 (bug 1350875)
Backed out changeset 5084623c0f83 (bug 1350875)
Backed out changeset 4eda0d89d8a2 (bug 1350875)
Backed out changeset 149058087816 (bug 1350875)
Backed out changeset 71ba43d7b2df (bug 1350875)
Backed out changeset e65ead196f4b (bug 1350875)
2020-04-07 16:13:53 +03:00