Commit Graph

8800 Commits

Author SHA1 Message Date
Nika Layzell
613c259d7c Bug 1694993 - Part 6: Preserve precursor principal through LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL, r=ckerschb,smaug
If we don't preserve the precursor principal in this case, we'll end up
doing an unnecessary process switch in some cases, which lead to a
test failure.

This patch also cleans up some logic around the first party origin
attribute with null principals, as the logic was only used in one place
and generally added some unnecessary complexity to NullPrincipal
itself.

Differential Revision: https://phabricator.services.mozilla.com/D155277
2022-09-20 23:29:08 +00:00
Nika Layzell
cfdd2c8fad Bug 1694993 - Part 5: Add a simple test for javascript URIs with noopener, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D154567
2022-09-20 23:29:08 +00:00
Sebastian Hengst
558810a337 Bug 1791519 - use really non-resolving domain for bug529119 tests. r=MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D157744
2022-09-20 19:32:03 +00:00
Andreea Pavel
0cf09ac249 Bug 1791519 - temporarily disable test_bug529119-1.html to reduce in tree noise r=aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D157730
2022-09-20 14:51:22 +00:00
Dana Keeler
923d7b2029 Bug 1790451 - make nsIChannel.securityInfo concrete as nsITransportSecurityInfo r=kershaw,necko-reviewers,valentin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D157136
2022-09-20 03:58:49 +00:00
Christian Holler
0ecbfcaa6a Bug 1790555 - Add missing fuzzing instrumentation. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D157188
2022-09-14 15:52:20 +00:00
Nika Layzell
a696fb5ae6 Bug 1705978 - Part 1: Track whether BrowsingContext is embedded in a content document, r=smaug
This will be used by APZ in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D156721
2022-09-12 06:20:38 +00:00
Peter Van der Beken
f30f94b8ec Bug 1789812 - ContentParent::RecvHistoryGo should always resolve, even if not navigating. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D156812
2022-09-08 13:41:09 +00:00
Kershaw Chang
d164608d66 Bug 1760580 - P2: Provide a reason when request is cancelled with NS_BINDING_ABORTED, r=necko-reviewers,media-playback-reviewers,valentin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D156071
2022-09-08 09:11:19 +00:00
Kershaw Chang
cc6c147f88 Bug 1760580 - P1: Make nsIRequest support to store canceled reason, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D156070
2022-09-08 09:11:18 +00:00
Norisz Fay
9eee1bc1e3 Backed out changeset 426e74dbe01e (bug 1731210) for causing lint failure on browser_beforeunload_permit_http.js CLOSED TREE 2022-09-08 11:59:30 +03:00
lyavor
21fc88c527 Bug 1731210 - pdf.js modal for unsaved data on a pdf page appears twice in private window r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D153612
2022-09-08 08:32:48 +00:00
Olli Pettay
93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Emilio Cobos Álvarez
52927ddd54 Bug 1787127 - Use used color-scheme (not preferred) to determine canvas background adjustments. r=tnikkel
As per spec, see https://drafts.csswg.org/css-color-adjust/#color-scheme-effect:

> In order to preserve expected color contrasts, in the case of embedded
> documents typically rendered over a transparent canvas (such as
> provided via an HTML iframe element), if the used color scheme of the
> element and the used color scheme of the embedded document’s root
> element do not match, then the UA must use an opaque canvas of the
> Canvas color appropriate to the embedded document’s used color scheme
> instead of a transparent canvas.

After bug 1782596 we were using the preferred rather than used
color-scheme, which is the right thing to do for prefers-color-scheme,
but not for the canvas background.

Differential Revision: https://phabricator.services.mozilla.com/D155831
2022-09-04 23:16:32 +00:00
Emilio Cobos Álvarez
f32093456d Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
Only GeckoMVMContext really needs the flush, to measure scrolled height
afterwards. Do that explicitly.

This shouldn't change behavior, for the most part; there was a preload
test that relied on the flush when changing DPI to start a run really
clean, but other than that this looks green on try.

Should at best be neutral (just code clean-up), or be a performance
improvement.

In a follow-up, we can possibly remove the DelayedResize code from the
view manager, though I need to think how to possibly coalesce the MVM
reflows, so let's not do that yet.

Differential Revision: https://phabricator.services.mozilla.com/D155385
2022-09-01 10:54:24 +00:00
Sean Feng
712dda078c Bug 1750034 - Remove lazyload telemetry related code r=emilio
We have decided to use 600px in all directions, there's no need
to keep the telemetry stuff around.

Differential Revision: https://phabricator.services.mozilla.com/D155879
2022-08-30 16:00:11 +00:00
Cristian Tuns
24652e5425 Backed out changeset e29b0fbf77f1 (bug 1786513) for causing mochitest failures on /browser_unified_extensions.js CLOSED TREE 2022-08-26 11:11:46 -04:00
Mark Banner
b4cf869f32 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for docshell. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D155168
2022-08-26 13:39:35 +00:00
Emilio Cobos Álvarez
7c34c8de9a Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
Only GeckoMVMContext really needs the flush, to measure scrolled height
afterwards. Do that explicitly.

This shouldn't change behavior, for the most part; there was a preload
test that relied on the flush when changing DPI to start a run really
clean, but other than that this looks green on try.

Should at best be neutral (just code clean-up), or be a performance
improvement.

In a follow-up, we can possibly remove the DelayedResize code from the
view manager, though I need to think how to possibly coalesce the MVM
reflows, so let's not do that yet.

Differential Revision: https://phabricator.services.mozilla.com/D155385
2022-08-26 12:58:12 +00:00
Kagami Sascha Rosylight
102bd338be Bug 1695435 - Part 2: Add more words to the chrome script heuristic in use-isInstance r=preferences-reviewers,Gijs,webdriver-reviewers,whimboo,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D110932
2022-08-24 22:47:42 +00:00
Edgar Chen
2a142eba28 Bug 1782211 - Init feature policy; r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D154161
2022-08-24 20:56:16 +00:00
Emilio Cobos Álvarez
c20ec755c9 Bug 1782751 - Make desktop viewport mode a synced BrowsingContext field. r=twisniewski
So that it's preserved properly across replacements (bug 1781936).

Differential Revision: https://phabricator.services.mozilla.com/D155274
2022-08-22 22:12:07 +00:00
Narcis Beleuzu
94d309143f Backed out 5 changesets (bug 1694993) for bc failure on browser_cross_process_csp_inheritance.js
Backed out changeset 1d21d911b3e7 (bug 1694993)
Backed out changeset 3b412d5fbdcf (bug 1694993)
Backed out changeset c9585ce37fe5 (bug 1694993)
Backed out changeset 05d7cbbfe9e2 (bug 1694993)
Backed out changeset 3821545ab46b (bug 1694993)
2022-08-22 20:32:02 +03:00
Nika Layzell
373e6ff98e Bug 1694993 - Part 5: Add a simple test for javascript URIs with noopener, r=smaug
Depends on D154566

Differential Revision: https://phabricator.services.mozilla.com/D154567
2022-08-22 15:35:28 +00:00
Neil Deakin
0de8be3ac6 Bug 1759604, check CanDropLink during the drop event as sites can cancel the dragover event causing the drop event to still fire, r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154896
2022-08-19 22:15:50 +00:00
Sean Feng
011405bf32 Bug 1785227 - Consider all browsing context as non-synthetic when we don't want to hide image document for <object> and <embed> r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154997
2022-08-18 20:04:59 +00:00
Andreas Farre
4b493b6a30 Bug 1595491 - Part 1: Make <embed> and <object> behave more like <iframe>. r=smaug,emilio
By making image loading in <embed> and <object> behave more like when
an <iframe> loads an image, we can make sure that the synthetic
document generated is process switched if the image is cross
origin. This is done by making image loading in nsObjectLoadingContent
follow the document loading path.

We also make sure that we pass the image size back to the embedder
element to not get stuck with the intrinsic size.

To avoid named targeting being able to target these synthetic
documents, as well as showing up in `Window.frames` and being counted
in `Window.length`, we keep a filtered list of non-synthetic browsing
contexts for that use-case.

This feature is controlled by two prefs:

* browser.opaqueResponseBlocking.syntheticBrowsingContext

  This triggers the creation of synthetic documents for images loaded
  in <object> or embed.

* browser.opaqueResponseBlocking.syntheticBrowsingContext.filter

  This turns on the filtering of synthetic browsing contexts in named
  targeting, `Window.length` and `Window.frames`.

Differential Revision: https://phabricator.services.mozilla.com/D148117
2022-08-16 16:42:58 +00:00
Olli Pettay
4aea9c65b6 Bug 1784387 - Crash in [@ nsDocShell::Reload] in ContentChild::RecvReload, r=mccr8
No test, since the patch is based on the crash reports. Creating a test which relies on some race conditions through IPC is hard.

Differential Revision: https://phabricator.services.mozilla.com/D154634
2022-08-15 15:50:27 +00:00
Paul Zuehlcke
f202ae674f Bug 1772290 - tests, r=smaug
Depends on D146914

Differential Revision: https://phabricator.services.mozilla.com/D146915
2022-08-15 11:45:20 +00:00
Geoff Lankow
03daa81222 Bug 1744243 follow-up - Fix test_URIFixup_external_protocol_fallback.js when run in Thunderbird. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D154475
2022-08-12 02:20:38 +00:00
Emilio Cobos Álvarez
ef562aae0a Bug 774398 - Hack to make print and viewport media query listeners fire when printing. r=geckoview-reviewers,owlish,dholbert
This still doesn't fire on print settings changes, so it uses the
default page size. Which is probably better than nothing, but...

To make viewport-size media-query listeners work more generally for
printed documents, we would need to re-clone the top document
unconditionally for all print settings changes, which needs front-end
work at least, and is dubious if the page changes dynamically.

Differential Revision: https://phabricator.services.mozilla.com/D150499
2022-08-11 23:11:37 +00:00
Daisuke Akatsuka
df2d3b5da0 Bug 1744243: Fallback to nsIHandlerService if don't trust nsIExternalProtocolService. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D153836
2022-08-10 22:38:45 +00:00
Sandor Molnar
087b91b1a1 Backed out changeset d744fed63a45 (bug 1744243) for causing xpc failures in test_URIFixup_external_protocol_fallback. CLOSED TREE 2022-08-10 01:21:46 +03:00
Daisuke Akatsuka
e211074002 Bug 1744243: Fallback to nsIHandlerService if don't trust nsIExternalProtocolService. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D153836
2022-08-09 21:30:48 +00:00
Fabrice Desré
c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Nika Layzell
d706a983ec Bug 1780614 - Track potential crossoriginisolated status on BCG, r=smaug,kmag
This patch changes how BrowsingContextGroups track CrossOriginIsolated
status such that it should be more consistently tracked and easier to
assert in the places which depend on it. In the new state of the world,
a flag is stored within the BCG's ID which tracks whether it was
created for cross-origin isolated documents, and that is also checked
when making decisions about how to isolate initial about:blank
documents, and whether to allow certain changes to
CrossOriginOpenerPolicy.

This flag is stashed within the ID, as it needs to be preserved if the
BCG is destroyed and then re-created from the ID (which may be e.g.
round-tripped through JS code). I also considered making the ID be a
string instead, to make it easier to include extra information like
this, and more clear where the information is stored, however :kmag
generally preferred using a bit within the integer ID.

These new assertions should now be less likely to spuriously fail due to
a DocShell disappearing or similar as well, which should help fix the
original issue.

Differential Revision: https://phabricator.services.mozilla.com/D152695
2022-08-03 15:58:27 +00:00
Andreea Pavel
3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel
fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Mark Banner
a02d8bb594 Bug 1782008 - Move no-unsanitized rule disabling in docshell/test/navigation to be at specific locations rather than apply to the whole directory. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D153215
2022-08-03 11:16:19 +00:00
Andreea Pavel
89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré
0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Daisuke Akatsuka
fe1785170f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-08-01 00:27:50 +00:00
Butkovits Atila
665e518c7f Backed out 2 changesets (bug 1776609) for causing failures at browser_topsites_annotation.js. CLOSED TREE
Backed out changeset cac795fd16d2 (bug 1776609)
Backed out changeset 88ec1cca8540 (bug 1776609)
2022-08-01 00:52:35 +03:00
Daisuke Akatsuka
971ff4bfb6 Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-31 20:26:30 +00:00
Butkovits Atila
900cbd85bd Backed out 2 changesets (bug 1776609) for causing gtest failures. CLOSED TREE
Backed out changeset 7630fea97777 (bug 1776609)
Backed out changeset 426cbe0fac73 (bug 1776609)
2022-07-29 13:42:33 +03:00
Daisuke Akatsuka
7c02dae76f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-29 09:24:28 +00:00
Emilio Cobos Álvarez
a3f163322d Bug 1781936 - Propagate GeckoView settings on BrowsingContext replacement. r=nika
This should be a better fix. GeckoView assumes these don't change on .top
unless they are explicitly set.

I don't have an Android build environment handy, but I'll try to confirm.

Also, remove an unused flag while at it.

Differential Revision: https://phabricator.services.mozilla.com/D153107
2022-07-29 00:30:24 +00:00
Peter Van der Beken
41331aab95 Bug 1769155 - Null-check win in setter for IsActiveBrowserWindowInternal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148914
2022-07-28 17:55:15 +00:00
Mark Banner
8a275d4d92 Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-26 15:11:30 +00:00