Commit Graph

1060 Commits

Author SHA1 Message Date
Fatih Kilic
73f4f01465 Bug 1939881: Implement RFPTargetBits and replace appropriate uses. r=tjr
This is a huge patch, but it is only really refactoring of RFPTarget enum. We used to use RFPTarget as a bitset and now we ran out of bits, so now we need a workaround.

Differential Revision: https://phabricator.services.mozilla.com/D233182
2025-01-23 14:49:44 +00:00
Cristian Tuns
6d135d7efe Backed out 5 changesets (bug 1940797, bug 1940800, bug 1940819, bug 1939881, bug 1939903) for causing build bustages in ContentChild.cpp CLOSED TREE
Backed out changeset f632ead9f4bd (bug 1939903)
Backed out changeset 30e9f5c7c5b7 (bug 1940800)
Backed out changeset 7ce4c97719aa (bug 1940797)
Backed out changeset f994cb8875ff (bug 1939881)
Backed out changeset ac7780c78455 (bug 1940819)
2025-01-22 19:42:49 -05:00
Fatih Kilic
a0beaee8e2 Bug 1939881: Implement RFPTargetBits and replace appropriate uses. r=tjr
This is a huge patch, but it is only really refactoring of RFPTarget enum. We used to use RFPTarget as a bitset and now we ran out of bits, so now we need a workaround.

Differential Revision: https://phabricator.services.mozilla.com/D233182
2025-01-22 23:46:31 +00:00
Emilio Cobos Álvarez
3c1b64acfe Bug 1940412 - Add batch removal information to nsIMutationObserver::ContentWillBeRemoved, and use it in some trivial-ish places. r=dom-core,credential-management-reviewers,sefeng
The idea is to use it on the style (via PresShell->RestyleManager) to do
invalidation faster in cases like bug 1940405.

Differential Revision: https://phabricator.services.mozilla.com/D233547
2025-01-15 20:39:40 +00:00
Tim Huang
c34cfecfda Bug 1933428 - Part 3: Recompute partitionKey for top-level documents if required. r=bvandersloot,smaug
The principal of a document might be changed during loading in certain
situation, e.g. a sandboxed document. In this case, we need to recompute
the partitionKey of the document to reflect the change on the principal.

Differential Revision: https://phabricator.services.mozilla.com/D230819
2025-01-14 08:56:10 +00:00
Otto Länd
02bda2e145 Bug 1915355: apply code formatting via Lando
# ignore-this-changeset
2025-01-10 08:27:46 +00:00
Tim Huang
5cd3f25e6a Bug 1915355 - Part 2: Propagate the isOn3PCBExcpetionList to workers. r=edenchuang
We need to propagate the isOn3PCBExceptionList flag from the nsILoadInfo
to workers so that the requests from workers can have the flag to exempt
third-party cookie blocking. We will also tackle the fetch request in
the worker scope in the patch.

Depends on D223380

Differential Revision: https://phabricator.services.mozilla.com/D223936
2025-01-10 08:24:28 +00:00
Stanca Serban
3eac2f1354 Backed out 8 changesets (bug 1915355) for causing xpcshell failures.
Backed out changeset d292c3a2592d (bug 1915355)
Backed out changeset 3386ee00459e (bug 1915355)
Backed out changeset 98848e63dfbf (bug 1915355)
Backed out changeset b668d0c685e8 (bug 1915355)
Backed out changeset 08acd8256071 (bug 1915355)
Backed out changeset 3ae9463ee988 (bug 1915355)
Backed out changeset 2dd416f1b847 (bug 1915355)
Backed out changeset 17107bbcf8c8 (bug 1915355)
2025-01-08 23:36:08 +02:00
Otto Länd
98f60aaeb4 Bug 1915355: apply code formatting via Lando
# ignore-this-changeset
2025-01-08 19:29:16 +00:00
Tim Huang
480c19889f Bug 1915355 - Part 2: Propagate the isOn3PCBExcpetionList to workers. r=edenchuang
We need to propagate the isOn3PCBExceptionList flag from the nsILoadInfo
to workers so that the requests from workers can have the flag to exempt
third-party cookie blocking. We will also tackle the fetch request in
the worker scope in the patch.

Depends on D223380

Differential Revision: https://phabricator.services.mozilla.com/D223936
2025-01-08 19:25:58 +00:00
Sandor Molnar
126c23f8df Backed out 11 changesets (bug 1933428) for causing mochitest failures @ test_iframe_sandbox_popups_inheritance.html CLOSED TREE
Backed out changeset 688df3cbad90 (bug 1933428)
Backed out changeset 94c12c68067f (bug 1933428)
Backed out changeset 85aab9235de5 (bug 1933428)
Backed out changeset b2cfb42e31bf (bug 1933428)
Backed out changeset d31e0480bbd9 (bug 1933428)
Backed out changeset b122f021875e (bug 1933428)
Backed out changeset fc400e4ab086 (bug 1933428)
Backed out changeset 3db923cf4bb8 (bug 1933428)
Backed out changeset 9878302a4cb4 (bug 1933428)
Backed out changeset af92deb55302 (bug 1933428)
Backed out changeset f7b1a3832630 (bug 1933428)
2025-01-07 18:23:00 +02:00
Otto Länd
b1c106140a Bug 1933428: apply code formatting via Lando
# ignore-this-changeset
2025-01-07 10:43:32 +00:00
Tim Huang
254411e25e Bug 1933428 - Part 3: Recompute partitionKey for top-level documents if required. r=bvandersloot,smaug
The principal of a document might be changed during loading in certain
situation, e.g. a sandboxed document. In this case, we need to recompute
the partitionKey of the document to reflect the change on the principal.

Differential Revision: https://phabricator.services.mozilla.com/D230819
2025-01-07 10:39:57 +00:00
Alexandru Marc
0c1f8f4e28 Backed out 7 changesets (bug 1915355) for causing performance regressions CLOSED TREE
Backed out changeset 77b4cc920fe4 (bug 1915355)
Backed out changeset da9446e06954 (bug 1915355)
Backed out changeset 20708fe16d2a (bug 1915355)
Backed out changeset 7c4b003d1e48 (bug 1915355)
Backed out changeset 36163490219b (bug 1915355)
Backed out changeset 8f867025b79b (bug 1915355)
Backed out changeset 3d647f81adb9 (bug 1915355)
2024-12-30 13:02:45 +02:00
Otto Länd
e64a77b013 Bug 1915355: apply code formatting via Lando
# ignore-this-changeset
2024-12-18 02:16:35 +00:00
Tim Huang
2beb9afe1b Bug 1915355 - Part 2: Propagate the isOn3PCBExcpetionList to workers. r=edenchuang
We need to propagate the isOn3PCBExceptionList flag from the nsILoadInfo
to workers so that the requests from workers can have the flag to exempt
third-party cookie blocking. We will also tackle the fetch request in
the worker scope in the patch.

Differential Revision: https://phabricator.services.mozilla.com/D223936
2024-12-17 21:44:36 +00:00
Alexandru Marc
424d306b7d Backed out 7 changesets (bug 1915355) for causing build bustages @ ThirdPartyCookieBlockingExceptions.cpp CLOSED TREE
Backed out changeset 5e5278038a79 (bug 1915355)
Backed out changeset d2381f88168a (bug 1915355)
Backed out changeset 675785853d7a (bug 1915355)
Backed out changeset de6a26d3e3df (bug 1915355)
Backed out changeset b2934cae3c23 (bug 1915355)
Backed out changeset e7077b00cfc1 (bug 1915355)
Backed out changeset c5d7f4e7e839 (bug 1915355)
2024-12-17 12:39:21 +02:00
Otto Länd
6031b29c22 Bug 1915355: apply code formatting via Lando
# ignore-this-changeset
2024-12-17 09:07:08 +00:00
Tim Huang
ccba861132 Bug 1915355 - Part 2: Propagate the isOn3PCBExcpetionList to workers. r=edenchuang
We need to propagate the isOn3PCBExceptionList flag from the nsILoadInfo
to workers so that the requests from workers can have the flag to exempt
third-party cookie blocking. We will also tackle the fetch request in
the worker scope in the patch.

Differential Revision: https://phabricator.services.mozilla.com/D223936
2024-12-17 08:57:30 +00:00
Greg Stoll
75942a02c0 Bug 1918027 part 3 - share DataTransfer between clipboard event and calls to HandlePaste() r=edgar,dlp-reviewers,masayuki,handyman
This handles a race condition so if the user copies new data to the clipboard
while Content Analysis is ongoing, the original data will be used in the
paste action.

Differential Revision: https://phabricator.services.mozilla.com/D228719
2024-12-04 22:58:30 +00:00
Alexandru Marc
092f1d11f9 Backed out 5 changesets (bug 1918027) build bustages @ EditorBase.cpp CLOSED TREE
Backed out changeset d9b4046afbae (bug 1918027)
Backed out changeset d45421faa30c (bug 1918027)
Backed out changeset 363a68600396 (bug 1918027)
Backed out changeset 965a766c81be (bug 1918027)
Backed out changeset 7c609b24857b (bug 1918027)
2024-12-04 22:37:48 +02:00
Greg Stoll
ff7cdd9272 Bug 1918027 part 3 - share DataTransfer between clipboard event and calls to HandlePaste() r=edgar,dlp-reviewers,masayuki,handyman
This handles a race condition so if the user copies new data to the clipboard
while Content Analysis is ongoing, the original data will be used in the
paste action.

Differential Revision: https://phabricator.services.mozilla.com/D228719
2024-12-04 19:01:10 +00:00
Frédéric Wang
bce742c396 Bug 1934221 - Implement Trusted Types support for Document's execCommand. r=smaug
The spec status of execCommand is not great, but IDL and handling of
for insertHTML command is defined here:

https://w3c.github.io/editing/docs/execCommand/#methods-to-query-and-execute-commands
https://w3c.github.io/editing/docs/execCommand/#the-inserthtml-command

Differential Revision: https://phabricator.services.mozilla.com/D230913
2024-12-04 06:48:36 +00:00
Frédéric Wang
c43b45303b Bug 1931272 - Implement Trusted Types support for Document.parseHTMLUnsafe(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D229130
2024-11-29 07:28:09 +00:00
Frédéric Wang
19e65d905b Bug 1906301 - Implement Trusted Types support for document.write()/document.writeln(). r=smaug,dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D229110
2024-11-28 19:40:54 +00:00
Emilio Cobos Álvarez
d16593275e Bug 1933473 - Track changes to declaration blocks correctly in the style rule map. r=devtools-reviewers,jwatt
The raw declaration block might change for a given rule. We need to keep
track of it properly for devtools in order to not lose track of rules.

Could I convince someone from DevTools to write a test for this? :)
Otherwise please point me to the right test to extend / change, and I
can.

Differential Revision: https://phabricator.services.mozilla.com/D230439
2024-11-28 12:10:15 +00:00
Emilio Cobos Álvarez
539611ead9 Bug 1931301 - Notify of removals on a stable state, not mid-remove. r=smaug,masayuki,dshin
This simplifies some observers, and makes others a bit more subtle, but I think
over-all it is an improvement.

Differential Revision: https://phabricator.services.mozilla.com/D229008
2024-11-26 09:39:52 +00:00
Sandor Molnar
4edbb82211 Backed out changeset 3d4472548fb9 (bug 1931301) for causing assertion failures @ Document.cpp 2024-11-25 23:06:55 +02:00
Emilio Cobos Álvarez
0651582f86 Bug 1931301 - Notify of removals on a stable state, not mid-remove. r=smaug,masayuki,dshin
This simplifies some observers, and makes others a bit more subtle, but I think
over-all it is an improvement.

Differential Revision: https://phabricator.services.mozilla.com/D229008
2024-11-25 17:58:40 +00:00
Emilio Cobos Álvarez
ebe0ec0cbc Bug 1388910 - Remove -moz-user-modify property. r=dshin
We successfully unshipped it in bug 1920118.

Differential Revision: https://phabricator.services.mozilla.com/D229530
2024-11-19 19:35:35 +00:00
Julian Descottes
1c8fa1b5a2 Bug 1924803 - Remove warning when CSS zoom is used r=emilio
The CSS warning for the zoom property is no longer necessary now that zoom is supported.

Differential Revision: https://phabricator.services.mozilla.com/D225693
2024-11-19 16:20:21 +00:00
Emilio Cobos Álvarez
1de9d8c54d Bug 1925365 - Make sure editable flag and element state remain in sync. r=masayuki
Some nsEditingSession callers didn't update element state, incorrectly.

No behavior change on Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D229347
2024-11-19 09:09:24 +00:00
Jonathan Watt
650e5227e6 Bug 1931496. Some missed contentViewer to documentViewer renames. r=baku DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D229104
2024-11-15 11:01:18 +00:00
Botond Ballo
7edb679212 Bug 1929754 - Avoid including nsViewportInfo.h from Document.h. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D228276
2024-11-07 07:03:40 +00:00
Edgar Chen
db01e53404 Bug 1928340 - Add some log for pointer lock; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D228090
2024-11-06 20:59:35 +00:00
Frédéric Wang
f32edee1c6 Bug 1909168 - Add fast paths for sink checks when trusted types are not used. r=smaug
This introduces a boolean on nsCSPPolicy / nsIContentSecurityPolicy /
Document that is initially false and only set to true after a
REQUIRE_TRUSTED_TYPES_FOR_DIRECTIVE directive is associated to the
object. This provides fast check and early return when such a directive
is absent:

- TrustedTypeUtils's GetTrustedTypesCompliantString(), currently used by
  Element::SetInnertHTML() and Element::InsertAdjacentHTML().

- nsCSPPolicy::AreTrustedTypesForSinkGroupRequired() currently used by
  ShouldSinkTypeMismatchViolationBeBlockedByCSP() and
  DoesSinkTypeRequireTrustedTypes().

This also makes nsCSPPolicy::hasDirective() fast for
nsIContentSecurityPolicy::REQUIRE_TRUSTED_TYPES_FOR_DIRECTIVE.

Differential Revision: https://phabricator.services.mozilla.com/D226882
2024-11-02 08:09:35 +00:00
Cosmin Sabou
10829847c4 Backed out changeset 71c0f51e780a (bug 1924803) for causing valgrind failures at WantMutationEvents. CLOSED TREE 2024-10-17 01:46:49 +03:00
Julian Descottes
088f9efa8f Bug 1924803 - Remove warning when CSS zoom is used r=emilio
The CSS warning for the zoom property is no longer necessary now that zoom is supported.

Differential Revision: https://phabricator.services.mozilla.com/D225693
2024-10-16 18:01:21 +00:00
Andrew Creskey
c8c72cd3c7 Bug 1920155 - Add feature usage bitfield to the PageloadEvent, start with fetchPriority r=denispal,emilio
Extend the pageload event to store features used on the root document for better signal-to-noise detection in performance experiments.
This patch uses a bit to record documents in which fetchpriority is used on images.

Data-classification-low: Category 1 “Technical data”

Differential Revision: https://phabricator.services.mozilla.com/D222991
2024-10-01 10:10:13 +00:00
keithamus
a155da2430 Bug 1888728 - Use CloseWatcher machinery for Dialogs & Popovers r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D206170
2024-09-24 16:48:09 +00:00
Emilio Cobos Álvarez
ec951a5abb Bug 1917458 - Fix puppeteer/remote tests after D221995. r=webdriver-reviewers,webidl,smaug,jdescottes
Calling setViewport on a background tab would wait forever without this
tweak after D221995, because we won't resize it until it becomes active.

Some tests like the ones mentioned in comment 12 call newPage() multiple
times at once, and newPage() calls setViewport() if there is a default
viewport set, which triggered this bug.

Make this work by reusing the AppWindow logic for sizing popup windows,
with a tweak so that we also resize background tabs.

Differential Revision: https://phabricator.services.mozilla.com/D222227
2024-09-16 13:21:51 +00:00
Andrea Marchesini
776b28b9d2 Bug 1475599 - part 2 - CookieStore API - IPDL, r=edgul,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215145
2024-09-12 16:48:19 +00:00
Iulian Moraru
ccb003999e Backed out 11 changesets (bug 1475599) for causing wpt failures on change_eventhandler_in_bfcache.https.window.html. CLOSED TREE
Backed out changeset 74d0efb3b0d1 (bug 1475599)
Backed out changeset 7e736b5732c1 (bug 1475599)
Backed out changeset 8620daea37ad (bug 1475599)
Backed out changeset 0d57b435d872 (bug 1475599)
Backed out changeset a63a5bcb0524 (bug 1475599)
Backed out changeset cd8cc80dc7e9 (bug 1475599)
Backed out changeset ef2cdfb059af (bug 1475599)
Backed out changeset d3c7729a1972 (bug 1475599)
Backed out changeset 7eccbaa8e62e (bug 1475599)
Backed out changeset cc3c39aa8fb8 (bug 1475599)
Backed out changeset 2fc9a3d0ad8b (bug 1475599)
2024-09-12 00:03:14 +03:00
Andrea Marchesini
97580f39c2 Bug 1475599 - part 2 - CookieStore API - IPDL, r=edgul,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215145
2024-09-11 16:26:55 +00:00
Tom Schuster
726bc18645 Bug 1917555 - Remove MediaDocumentKind::Plugin. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D221439
2024-09-11 08:00:48 +00:00
Tamas Szentpeteri
9b65ed1b2d Backed out 11 changesets (bug 1475599) for causing mochitest failures on browser_script_command_execute_basic.js. CLOSED TREE
Backed out changeset 51aa424e5ec9 (bug 1475599)
Backed out changeset 01c2bc6d727a (bug 1475599)
Backed out changeset 2d925ea3da19 (bug 1475599)
Backed out changeset 30d5dfedf252 (bug 1475599)
Backed out changeset fc3b4c5ee4b2 (bug 1475599)
Backed out changeset 0cfe4b34b57a (bug 1475599)
Backed out changeset fc19677480ad (bug 1475599)
Backed out changeset f279f023c340 (bug 1475599)
Backed out changeset 4063d0c74231 (bug 1475599)
Backed out changeset 0868fb4018a7 (bug 1475599)
Backed out changeset 9c8b6e35bf3f (bug 1475599)
2024-09-11 00:31:53 +03:00
Andrea Marchesini
4c2e8563cb Bug 1475599 - part 2 - CookieStore API - IPDL, r=edgul,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D215145
2024-09-10 16:31:38 +00:00
Emilio Cobos Álvarez
0b3521ccca Bug 1891335 - Compute EffectInfo updates at IntersectionObserver time. r=smaug,hiro
What goes on here is that there's a couple of unfortunate style change
sequences which end up making us not do the EffectsInfo dance correctly.

Twitter uses (maybe didn't use to, which would explain the regression) a
visibility: hidden, out-of-flow iframe for a bit (which we correctly
throttle). But then they switch to an in-flow, visible, zero-height
iframe. That we should _not_ throttle. However, we end up not getting to
the display list code at all, because nsBlockFrame decides that we don't
need to descend into an empty line[1].

It seems less error prone to re-use the IntersectionObserver timing and
computation to determine whether the iframe is visible. That completely
matches in-process iframes, too.

Removing the empty frame border and putting them on an empty line in
dom/base/test/test_bug1639328.html is enough to reproduce the issue
without this patch.

[1]: https://searchfox.org/mozilla-central/rev/fe2743c6c5c708061c7f6504b26958fcc815bb4a/layout/generic/nsBlockFrame.cpp#7569-7579

Differential Revision: https://phabricator.services.mozilla.com/D207479
2024-09-06 16:04:57 +00:00
Stanca Serban
d05e0c1dd0 Backed out changeset 80db8b7ff2af (bug 1891335) for causing mochitests failures in test_bug1639328.html. 2024-09-06 00:22:51 +03:00
Emilio Cobos Álvarez
f20aebf2fc Bug 1891335 - Compute EffectInfo updates at IntersectionObserver time. r=smaug,hiro
What goes on here is that there's a couple of unfortunate style change
sequences which end up making us not do the EffectsInfo dance correctly.

Twitter uses (maybe didn't use to, which would explain the regression) a
visibility: hidden, out-of-flow iframe for a bit (which we correctly
throttle). But then they switch to an in-flow, visible, zero-height
iframe. That we should _not_ throttle. However, we end up not getting to
the display list code at all, because nsBlockFrame decides that we don't
need to descend into an empty line[1].

It seems less error prone to re-use the IntersectionObserver timing and
computation to determine whether the iframe is visible. That completely
matches in-process iframes, too.

Removing the empty frame border and putting them on an empty line in
dom/base/test/test_bug1639328.html is enough to reproduce the issue
without this patch.

[1]: https://searchfox.org/mozilla-central/rev/fe2743c6c5c708061c7f6504b26958fcc815bb4a/layout/generic/nsBlockFrame.cpp#7569-7579

Differential Revision: https://phabricator.services.mozilla.com/D207479
2024-09-05 17:16:12 +00:00