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

25139 Коммитов

Автор SHA1 Сообщение Дата
Jens Stutte 5a26859ea7 Bug 1696771: Always null check the ContentProcessManager singleton before use. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D143180
2022-04-08 11:57:05 +00:00
Norisz Fay c463ca58c7 Backed out changeset 2531ddbeeffa (bug 1696771) for causing multiple failures CLOSED TREE 2022-04-08 10:44:55 +03:00
Jens Stutte 3c00871162 Bug 1696771: Always null check the ContentProcessManager singleton before use. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D143180
2022-04-08 06:20:19 +00:00
Dana Keeler 6502ebf4b6 Bug 1608307 - remove redundant flags parameters from nsISiteSecurityService r=jschanck,necko-reviewers,kershaw
Before this patch, nsISiteSecurityService APIs took "flags" parameters that
differentiated private contexts from not private contexts. However, these
parameters were redundant with respect to origin attributes, which led to some
confusion for consumers of these APIs. This patch removes these parameters in
favor of using origin attributes.

Differential Revision: https://phabricator.services.mozilla.com/D142901
2022-04-06 17:37:23 +00:00
Kagami Sascha Rosylight 1409f37ca3 Bug 1703953 - Part 2: Apply mozilla/use-isInstance rules for .jsm files r=webdriver-reviewers,pip-reviewers,mhowell,Gijs,whimboo
This replaces all `instanceof` uses for DOM interfaces, since the operator in priviliged context works same as .isInstance().

Differential Revision: https://phabricator.services.mozilla.com/D141785
2022-04-06 11:57:57 +00:00
Ben Campbell 038f89b06e Bug 1762796 - Allow nsAttrValue use without requiring a prior #include "nsAtom.h". r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D142913
2022-04-06 05:15:38 +00:00
Timothy Nikkel 4cac1c7814 Bug 1763121. nsIDOMWindowUtils::sendNativeTouchpadPan should use an observer to notify when the event has been sent to the destination widget. r=hiro
Otherwise we can return without the widget even seeing the event. This is how other test functions are implemented.

We need this to make the test in bug 1757928 pass.

Differential Revision: https://phabricator.services.mozilla.com/D142943
2022-04-05 22:53:35 +00:00
Matthew Gaudet 21377df70d Bug 1761483 - Limit chunk size in stream to avoid un-necessary OOM r=smaug
Discovered that Windows 32-bit was having trouble with the test case on the bug,
and figured that it might be preferable to limit chunk size to something more
constrained.

Differential Revision: https://phabricator.services.mozilla.com/D142512
2022-04-05 19:15:26 +00:00
Matthew Gaudet 6ec91fd78a Bug 1761483 - Fix integer truncation bug in DOM Streams r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D142289
2022-04-05 19:15:26 +00:00
Peter Van der Beken c77ecfbd4b Bug 1739957 - Clear event listener - test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134714
2022-04-05 14:34:02 +00:00
Tom Ritter a2b46c99ea Bug 1758709: Add Telemetry for XSLT use r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D141240
2022-04-05 14:29:50 +00:00
Butkovits Atila 393fc50e58 Backed out 4 changesets (bug 1735746) for causing failures at browser_protocol_custom_sandbox.js. CLOSED TREE
Backed out changeset 703dfd92c775 (bug 1735746)
Backed out changeset 3b06ed08d93b (bug 1735746)
Backed out changeset 9968278b9efe (bug 1735746)
Backed out changeset 49f2e283115d (bug 1735746)
2022-04-05 16:04:29 +03:00
Paul Zuehlcke 720e7605fe Bug 1735746 - Block external protocol navigation from sandboxed contexts. r=nika,ckerschb,Gijs,smaug
Differential Revision: https://phabricator.services.mozilla.com/D141131
2022-04-05 11:31:53 +00:00
Emilio Cobos Álvarez 6553f27967 Bug 1762298 - Inherit used color-scheme from embedder <browser> elements. r=nika,dao,Gijs
This allows popups and sidebars to use the chrome preferred
color-scheme.

This moves the responsibility of setting the content-preferred color
scheme to the appropriate browsers to the front-end (via tabs.css).

We still return the PreferredColorSchemeForContent() when there's no
pres context (e.g., for display:none in-process iframes). We could
potentially move a bunch of the pres-context data to the document
instead, but that should be acceptable IMO as for general web content
there's no behavior change in any case.

Differential Revision: https://phabricator.services.mozilla.com/D142578
2022-04-04 18:22:04 +00:00
Jan de Mooij 6e6a50b7b8 Bug 1760844 part 1 - Remove hasInstance proxy trap. r=iain,peterv,robwu
This removes the non-standard `hasInstance` proxy trap.

All objects will now use the algorithm in `JS::InstanceofOperator`. That function
uses other primitives and proxy traps already available to JS code.

As discussed in the bug, there's a minor difference in behavior: for
`xrayWrapper instanceof xrayWaiver` we used to always return false but we can now
invoke `xrayWaiver[Symbol.hasInstance]()`.

Differential Revision: https://phabricator.services.mozilla.com/D142061
2022-04-04 15:09:29 +00:00
Emilio Cobos Álvarez f5cdddf6ef Bug 1762796 - Deduplicate TokenList values faster. r=smaug
Remember whether we have already de-duplicated them once and avoid doing
that again.

This is an alternative approach that doesn't add overhead to attribute
setting in the general case.

Differential Revision: https://phabricator.services.mozilla.com/D142813
2022-04-04 14:23:23 +00:00
Mike Conley dd9df31950 Bug 1762653 - Expose EventStateManager::IsKeyboardEventUserActivity on nsIDOMWindowUtils. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D142728
2022-04-04 13:33:35 +00:00
Edgar Chen c82b0711e1 Bug 1760560 - Remove directory upload API; r=smaug
HTMLInputElement.getFilesAndDirectories is used for testing Directory API, so
still keep it but mark as chrome only.

Differential Revision: https://phabricator.services.mozilla.com/D142444
2022-04-04 09:54:34 +00:00
Caroline Cullen ff496968ed Bug 1559177 - Add JS_ReadDouble. r=smaug
Depends on D142585

Differential Revision: https://phabricator.services.mozilla.com/D142637
2022-04-01 22:25:54 +00:00
Caroline Cullen 1a31034747 Bug 1559177 - Add JS_WriteDouble. r=mgaudet,smaug
Differential Revision: https://phabricator.services.mozilla.com/D142585
2022-04-01 22:25:53 +00:00
Kagami Sascha Rosylight 513cb1e763 Bug 1753309 - Fix build bustage 2 CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D142725
2022-04-01 20:11:23 +00:00
Kagami Sascha Rosylight 8b47c8a801 Bug 1753309 - Fix build bustage CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D142723
2022-04-01 19:51:18 +00:00
Tom Schuster 2e72af38c0 Bug 1753309 - Implement AbortSignal.timeout() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D137900
2022-04-01 17:15:19 +00:00
Sean Feng b16f825818 Bug 1738777 - Check whether we need to ignore tabindex again when doing sequential navigation r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D140406
2022-04-01 15:52:38 +00:00
Manuel Bucher 09b6c321e4 Bug 1761242 - Make link asset parsing accessible in nsNetUtils.h r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142053
2022-04-01 13:45:20 +00:00
Manuel Bucher dc5bb9ccbc Bug 1762156 - Move LinkHeader parsing to mozilla::net namespace in nsNetUtil.h r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D142461
2022-04-01 13:45:20 +00:00
Emilio Cobos Álvarez e47024038c Bug 1762018 - Derive a color scheme when forcing preference colors. r=morgan
This patch is a bit bigger than I'd like, but it's mostly moving code
around to centralize the color/color-scheme decisions we make when
forcing colors.

In practice, the only behavior change should be that when "use system
colors" is false and we force colors, we force a color-scheme that
matches the user-chosen background (via the LookAndFeel::IsDarkColor
check).

That should make sure that text from system colors is light and matches
the user expectations.

Before this patch, we used to force the color-scheme to light, but that
was just so that we ended up looking at mLightColors. Instead, we
achieve that via a separate bit (mForcedLightColorSet, naming up for
debate, not a fan), so that we can use the right system colors
otherwise.

Another alternative I considered is making all non-link system colors
return mDefaultBackground / mDefault depending on whether they are
background / foreground colors. That seemed a lot more work and
potentially a regression in various ways. I think this should be
strictly an improvement instead.

Differential Revision: https://phabricator.services.mozilla.com/D142423
2022-04-01 01:21:22 +00:00
Cristian Tuns da85cd4a66 Backed out changeset 5d97c7b1b9b5 (bug 1762018) for causing mochitest failures in test_bug232227.html CLOSED TREE 2022-03-31 19:12:48 -04:00
Emilio Cobos Álvarez 0555de1ae2 Bug 1762018 - Derive a color scheme when forcing preference colors. r=morgan
This patch is a bit bigger than I'd like, but it's mostly moving code
around to centralize the color/color-scheme decisions we make when
forcing colors.

In practice, the only behavior change should be that when "use system
colors" is false and we force colors, we force a color-scheme that
matches the user-chosen background (via the LookAndFeel::IsDarkColor
check).

That should make sure that text from system colors is light and matches
the user expectations.

Before this patch, we used to force the color-scheme to light, but that
was just so that we ended up looking at mLightColors. Instead, we
achieve that via a separate bit (mForcedLightColorSet, naming up for
debate, not a fan), so that we can use the right system colors
otherwise.

Another alternative I considered is making all non-link system colors
return mDefaultBackground / mDefault depending on whether they are
background / foreground colors. That seemed a lot more work and
potentially a regression in various ways. I think this should be
strictly an improvement instead.

Differential Revision: https://phabricator.services.mozilla.com/D142423
2022-03-31 22:03:09 +00:00
Cristian Tuns 3507e596a7 Backed out 2 changesets (bug 1761483) for causing xpcshell failures on large-pipeto.js
Backed out changeset 870ade3b73ff (bug 1761483)
Backed out changeset 03acbef2489b (bug 1761483)
2022-03-31 17:24:47 -04:00
Matthew Gaudet db4cebaf5f Bug 1761483 - Limit chunk size in stream to avoid un-necessary OOM r=smaug
Discovered that Windows 32-bit was having trouble with the test case on the bug,
and figured that it might be preferable to limit chunk size to something more
constrained.

Differential Revision: https://phabricator.services.mozilla.com/D142512
2022-03-31 16:00:59 +00:00
Matthew Gaudet 06cfe278af Bug 1761483 - Fix integer truncation bug in DOM Streams r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D142289
2022-03-31 16:00:58 +00:00
Emilio Cobos Álvarez 881f8f938a Bug 1762109 - Make the XLink setup a bit saner. r=smaug
Make Link and SVGAElement agree on XLink handling, and make it more
explicit that SVGAElement needs to be a bit more special for SMIL.

Remove dead MathML XLink code.

Differential Revision: https://phabricator.services.mozilla.com/D142546
2022-03-31 14:33:57 +00:00
Emilio Cobos Álvarez 1ce0975b8e Bug 1761493 - Make Gecko internally consistent wrt what a link is. r=smaug
This is mostly edge-casey, but see bug 1757156 for an example where it's
causing some issues (granted, they could use `href="#"` or something
instead of an empty href).

It feels weird if a link looks like a link (because the CSS definition
of a link matches, which is "has an href") but then mostly doesn't
behave as a link.

We can't navigate anywhere if we don't have a valid URI but maybe JS
handles the relevant events as in bug 1757156.

Use the CSS definition (has href) since that's interoperable across
browsers. This should also make some stuff much faster (since checking
'is link' is now just a bit check instead of a virtual call).

(Awaiting try results, if no tests need adjustments then I need to write
some)

Differential Revision: https://phabricator.services.mozilla.com/D142107
2022-03-30 17:34:31 +00:00
Gijs Kruitbosch 8e67201171 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Rob Wu 18f7e30291 Bug 1556427 - Add node.title to bookmarks.onRemoved event r=Standard8,willdurand,markh
The `bookmarks.onRemoved` event should have a `title` attribute
reflecting the title of the removed bookmark. This behavior is
documented in an example at:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks/onRemoved

That documented example was reportedly broken: https://github.com/mdn/content/issues/13052

Differential Revision: https://phabricator.services.mozilla.com/D139293
2022-03-30 12:57:28 +00:00
Norisz Fay acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch 27039e2946 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Edgar Chen c1d1b06e41 Bug 1758164 - Align the behavior of defining non-configurable properties on a WindowProxy on Nightly with Release/Beta; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D141732
2022-03-29 20:33:24 +00:00
Sean Feng 0a8b9b2a5d Bug 1750070 - Fix nullptr crash in nsFrameLoader::RequestTabStateFlush r=nika,farre
Differential Revision: https://phabricator.services.mozilla.com/D135927
2022-03-29 15:18:25 +00:00
criss 4eec7e25a3 Backed out 3 changesets (bug 1703953) for causing multiple failures. CLOSED TREE
Backed out changeset 871a1fac289e (bug 1703953)
Backed out changeset 8151244bda18 (bug 1703953)
Backed out changeset eaf6d4c353be (bug 1703953)
2022-03-29 17:01:58 +03:00
Kagami Sascha Rosylight c8f12f94dc Bug 1703953 - Part 2: Apply mozilla/use-isInstance rules for .jsm files r=webdriver-reviewers,pip-reviewers,mhowell,Gijs,whimboo
This replaces all `instanceof` uses for DOM interfaces, since the operator in priviliged context works same as .isInstance().

Differential Revision: https://phabricator.services.mozilla.com/D141785
2022-03-29 13:11:00 +00:00
Emilio Cobos Álvarez 8885ef4b8d Bug 1760674. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D141958
2022-03-29 12:15:52 +00:00
Cristian Tuns 9bd0c3604e Backed out changeset ddf7a48e3bf1 (bug 1760674) for causing mochitest failures on Link.cpp CLOSED TREE 2022-03-29 07:39:21 -04:00
Emilio Cobos Álvarez 0d56184e9d Bug 1760674. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D141958
2022-03-29 10:56:50 +00:00
Hiroyuki Ikezoe a04b6f26a2 Bug 1674776 - Update DocumentTimeline::mLastRefreshDriverTime outside parallel styling. r=boris,decoder
Note that we can probably use mLastRefreshDriverTime directly in
DocumentTimeline::GetCurrentTimeStamp(), i.e. we don't need to use the refresh
driver there, but I'd preserve the current behavior.

Differential Revision: https://phabricator.services.mozilla.com/D97823
2022-03-28 23:29:14 +00:00
David Shin 093b63fe3c Bug 1755770 - Ensure `TextRenderedRun::GetRunUserSpaceRect` casts float to int without invoking Undefined Behavior r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D142223
2022-03-28 21:07:58 +00:00
Butkovits Atila f60ac86be0 Backed out 2 changesets (bug 1728331) for causing failures at RTCPeerConnection-videoDetectorTest.html. CLOSED TREE
Backed out changeset b6649f0253c5 (bug 1728331)
Backed out changeset e9242af1224d (bug 1728331)
2022-03-29 00:04:47 +03:00
Nika Layzell 66b31a7ed2 Bug 1728331 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2022-03-28 16:18:04 +00:00
Jon Coppeard 050bae2fd0 Bug 1759881 - Part 7: Add a virtual method to get the module loader to use for the current global r=yulia,smaug
This adds a virtual method to  nsIGlobalObject and implements it for
nsGlobalWindowInner and SandboxPrivate. This means we don't have to put the
logic for dealing with all the different kinds of globals in once place.

Differential Revision: https://phabricator.services.mozilla.com/D141733
2022-03-28 12:38:27 +00:00