Commit Graph
674 Commits
Author SHA1 Message Date
Daniel Holbert 3879f16d18 Bug 2044510: Pass already_AddRefed types by-value instead of by rvalue reference, in layout/. r=layout-reviewers,firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D304368
2026-06-05 21:06:51 +00:00
Emilio Cobos Álvarez bb1efcc2e5 Bug 2044618 - Remove some include dependencies. r=firefox-style-system-reviewers,layout-reviewers,dshin
Stop including StyleSheet.h from most headers.

Differential Revision: https://phabricator.services.mozilla.com/D304408
2026-06-05 01:15:06 +00:00
Emilio Cobos Álvarez cc359d1aa9 Bug 2044618 - Remove SheetParsingMode. r=layout-reviewers,dholbert
It's a 1:1 mapping for the origin that we cache in the
StyleSheetContents, so use that.

PreloadHashKey only cares about author loads, within a document, so
doesn't really need to deal with user / user-agent ones.

Differential Revision: https://phabricator.services.mozilla.com/D304400
2026-06-05 01:03:23 +00:00
Emilio Cobos Álvarez ed76919148 Bug 2042421 - Simplify css::Loader::NewStyleSheetChannel. r=firefox-style-system-reviewers,dshin
The only caller which doesn't pass the sheet's cors mode has sheets that
also use no-cors so should be a no-op.

Differential Revision: https://phabricator.services.mozilla.com/D302523
2026-05-26 17:25:04 +00:00
serge-sans-paille c7033d0d67 Bug 2030936 - Activate clang-tidy's performance-for-range-copy check r=sylvestre,tschuster,media-playback-reviewers,webrtc-reviewers,firefox-style-system-reviewers,layout-reviewers,janerik,padenot,bwc,emilio,alwu
And apply the auto-fix from the linter. Note that we exclude RefPtr from
the check as it plays badly with our CanRunScriptChecker's linter.

We also explicitly silent warning for loops on nsTObserverArray, as their
iterator is designed to support invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D293497
2026-05-20 06:51:32 +00:00
Daniel Holbert 9c0ef373b0 Bug 2038723: Use MakeRefPtr to do allocation for local RefPtr variables, in layout. r=layout-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D299753
2026-05-12 19:56:07 +00:00
Daniel Holbert 47356193e7 Bug 2037693: Use MakeAndAddRef instead of 'new' to construct objects stored in local nsCOMPtrs, in various places in layout. r=layout-reviewers,jfkthame
Motivation: MakeAndAddRef forces us to store the result in a refcounted
pointer, which is a nice safety/strictness improvement.  Also, migrating lets
us reduce the number of manual 'new' invocations, which reduces our audit
surface for memory-allocation/lifetime issues.

Differential Revision: https://phabricator.services.mozilla.com/D299010
2026-05-07 08:34:49 +00:00
Emilio Cobos Álvarez 0f40c73518 Bug 1995647 - Use IsOriginClean() to block quirks mode behavior. r=smaug
It's a no-op due to ORB in practice now, but added a test for both the
redirect case and data: uris.

Remove SheetLoadData::mLoaderPrincipal since now we don't access it off
main thread anymore.

Differential Revision: https://phabricator.services.mozilla.com/D269492
2026-04-10 12:09:57 +00:00
Emilio Cobos Álvarez 3bf655066e Bug 2028270. r=firefox-style-system-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D291362
2026-04-02 15:07:21 +00:00
Emilio Cobos Álvarez 5016086e1a Bug 2025089 - Remove some includes from nsINode.h and Element.h. r=dom-core,dom-storage-reviewers,firefox-svg-reviewers,janv,smaug
Differential Revision: https://phabricator.services.mozilla.com/D289049
2026-03-22 23:45:55 +00:00
Sylvestre Ledru 55481ac4b5 Bug 2023419 - Remove Emacs/Vim modelines from layout/ r=emilio,firefox-style-system-reviewers,layout-reviewers
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287852
2026-03-17 12:05:43 +00:00
Tooru Fujisawa 928c7fda9e Bug 2014952 - Stop trying to cycle-collecting SharedStyleSheetCache. r=emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D282111
2026-02-06 09:09:10 +00:00
serge-sans-paille 314b019211 Bug 2012139 - #undef macro definitions shared across CU when FILES_PER_UNIFIED_FILE increases r=xpcom-reviewers,dom-core,smaug,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D280248
2026-01-27 09:22:50 +00:00
Valentin Gosu 44bd5382c0 Bug 2006028 - Remove predictor code r=necko-reviewers,firefox-style-system-reviewers,emilio,kershaw,extension-reviewers,toolkit-telemetry-reviewers,manuel,robwu
The network predictor used the HTTP cache as a database to learn browsing
patterns and make speculative DNS prefetches, TCP preconnects, and resource
prefetches. While this provided performance benefits for repeat visits to
frequently-accessed sites, it came with significant costs: I/O on every page
load, CPU overhead for prediction algorithms, memory for caching learned
patterns, and substantial IPC complexity with six message types coordinating
predictions between processes.

A large part of the functionality the predictor was meant to improve is now
available to webdevelopers. HTTP 103 Early Hints allow servers to explicitly
specify resources to preload while generating the response.
And Speculation Rules API will enable content authors to declaratively specify
prefetch/prerender behavior based on their knowledge of site structure and user
intent, providing immediate accuracy without a learning period.

The network.predictor.enable-hover-on-ssl preference is retained as it controls
simpler hover-triggered speculative connections that don't require the
predictor's learning system. This removal simplifies the codebase while
steering users toward more accurate, standards-based optimization mechanisms.

The one feature of the predictor which was never used was learning websites
that are opened soon after startup. There was no action taken based on this
info, and we could already predict this info based on the history database.

Differential Revision: https://phabricator.services.mozilla.com/D276437
2025-12-18 22:56:37 +00:00
Atila Butkovits 79e1b89109 Revert "Bug 2006028 - Remove predictor code r=necko-reviewers,firefox-style-system-reviewers,emilio,kershaw" for causing failures at test_basic.js.
This reverts commit 117ed7db99.
2025-12-16 09:52:23 +00:00
Valentin Gosu 117ed7db99 Bug 2006028 - Remove predictor code r=necko-reviewers,firefox-style-system-reviewers,emilio,kershaw
The network predictor used the HTTP cache as a database to learn browsing
patterns and make speculative DNS prefetches, TCP preconnects, and resource
prefetches. While this provided performance benefits for repeat visits to
frequently-accessed sites, it came with significant costs: I/O on every page
load, CPU overhead for prediction algorithms, memory for caching learned
patterns, and substantial IPC complexity with six message types coordinating
predictions between processes.

A large part of the functionality the predictor was meant to improve is now
available to webdevelopers. HTTP 103 Early Hints allow servers to explicitly
specify resources to preload while generating the response.
And Speculation Rules API will enable content authors to declaratively specify
prefetch/prerender behavior based on their knowledge of site structure and user
intent, providing immediate accuracy without a learning period.

The network.predictor.enable-hover-on-ssl preference is retained as it controls
simpler hover-triggered speculative connections that don't require the
predictor's learning system. This removal simplifies the codebase while
steering users toward more accurate, standards-based optimization mechanisms.

The one feature of the predictor which was never used was learning websites
that are opened soon after startup. There was no action taken based on this
info, and we could already predict this info based on the history database.

Differential Revision: https://phabricator.services.mozilla.com/D276437
2025-12-16 08:58:03 +00:00
Emilio Cobos Álvarez 0a67d33acc Bug 1999051 - Remove noisy warning. r=TYLin
Adding a stylesheet in a data document (either programmatically or via
something like a UA widget like comment 3) seems perfectly expected.

Differential Revision: https://phabricator.services.mozilla.com/D275355
2025-12-06 20:54:15 +00:00
Emilio Cobos Álvarez a643ccf3b0 Bug 1994008 - Pass the right base URI to cached inline sheets. r=firefox-style-system-reviewers,layout-reviewers,dshin
With the dependent bugs closed, this fix is trivial.

Differential Revision: https://phabricator.services.mozilla.com/D269944
2025-10-26 13:03:16 +00:00
serge-sans-paille 1667ec582b Bug 1995723 - Remove unused inclusion of mozilla/ArrayUtils.h r=necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,canaltinova,bytesized,alwu,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D269573
2025-10-23 07:30:37 +00:00
Emilio Cobos Álvarez 4ea5ebeaa0 Bug 1995282 - Remove StyleSheet::mSheetURI. r=smaug
We don't need it:

 * For built-in sheets (ContentParent etc) the original URI is the same.
 * For Document / nsStyleSheetService / LinkStyle, the original URI is
   what you want to avoid registering / loading the same URI multiple
   times.

Differential Revision: https://phabricator.services.mozilla.com/D269423
2025-10-22 11:24:36 +00:00
Emilio Cobos Álvarez f7c56c1d09 Bug 1995282 - Clean up URLExtraData storage in stylesheets. r=smaug
Make SetURIs be the source of truth for referrer info and principal too.
This allows us to remove redundant members.

Pull the URI and such out of StyleSheetInfo, since we are sharing
StyleSheetInfo across stylesheets with different base URIs and such now
(for inline stylesheets), and we need to keep track of the "right" base
URI for when we eventually clone them.

There's one part of the change here which is a bit scary, which is the
principal shenanigans. However I don't think it's problematic since we
already are using the URLExtraData for CSS parsing and subresource
loads, which doesn't have that mutation. In particular, we only use
StyleSheet::Principal from Loader::LoadChildSheet. So we can implement
what the spec actually says (an origin-clean flag).

Differential Revision: https://phabricator.services.mozilla.com/D269210
2025-10-22 11:21:38 +00:00
Sandor Molnar ce82072e19 Revert "Bug 1995282 - Clean up URLExtraData storage in stylesheets. r=smaug" for causing xpc crashes
This reverts commit c6bdc6abd2.
2025-10-21 23:58:08 +00:00
Emilio Cobos Álvarez c6bdc6abd2 Bug 1995282 - Clean up URLExtraData storage in stylesheets. r=smaug
Make SetURIs be the source of truth for referrer info and principal too.
This allows us to remove redundant members.

Pull the URI and such out of StyleSheetInfo, since we are sharing
StyleSheetInfo across stylesheets with different base URIs and such now
(for inline stylesheets), and we need to keep track of the "right" base
URI for when we eventually clone them.

There's one part of the change here which is a bit scary, which is the
principal shenanigans. However I don't think it's problematic since we
already are using the URLExtraData for CSS parsing and subresource
loads, which doesn't have that mutation. In particular, we only use
StyleSheet::Principal from Loader::LoadChildSheet. So we can implement
what the spec actually says (an origin-clean flag).

Differential Revision: https://phabricator.services.mozilla.com/D269210
2025-10-21 22:44:07 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Emilio Cobos Álvarez fd86eb6aa2 Bug 1982344 - Account for all non-local URIs for caching inline sheets across image and non-image documents. r=firefox-style-system-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D261356
2025-08-19 01:02:11 +00:00
Lando e3dc6c0452 Bug 1978217: apply code formatting via Lando
# ignore-this-changeset
2025-07-23 01:35:43 +00:00
Emilio Cobos Álvarez 493d0f23cb Bug 1978217 - Don't share sheets using relative URIs when it's not safe to do so. r=firefox-style-system-reviewers,layout-reviewers,dshin
Track whether an inline sheet might have uris that depend on the base, and
avoid caching them if appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D258292
2025-07-23 01:35:28 +00:00
Emilio Cobos Álvarez 513bfd9097 Bug 1978217 - Record use counter data inline in StylesheetContents. r=firefox-style-system-reviewers,layout-reviewers,dshin
No behavior change, but this is simpler. I want to reuse the use
counters mechanism to fix this bug because it's a very trivial way of
asking questions about the parsed data and we need to plumb it through
the same places.

Differential Revision: https://phabricator.services.mozilla.com/D258290
2025-07-23 01:35:22 +00:00
Emilio Cobos Álvarez a8a2311474 Bug 1976457 - Sort includes in layout/. r=janv,dshin
Interesting bit is layout/.clang-format, the rest is all automated.

Differential Revision: https://phabricator.services.mozilla.com/D256616
2025-07-09 13:24:00 +00:00
Fatih Kilic 61567b38ba Bug 1974247 - Extend integrity policy to stylesheets. r=tschuster,flod,emilio
Differential Revision: https://phabricator.services.mozilla.com/D255145
2025-07-04 21:46:44 +00:00
Fatih Kilic 427a847124 Bug 1966694 - Remove nsIHttpChannelInternal::integrityMetadata. r=tschuster,necko-reviewers,kershaw
I checked every `HttpBaseChannel::SetupReplacementChannel` call (including calls to overrides) and we always create a copy of the existing loadinfo, usually with `CloneLoadInfoForRedirect`, except for TRR, it just calls `TRRLoadInfo::Clone`.

Differential Revision: https://phabricator.services.mozilla.com/D255316
2025-07-04 21:46:41 +00:00
Tim Huang 8971015bb7 Bug 1968644 - Part 5: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for CSS loads. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D252447
2025-06-17 20:28:21 +00:00
agoloman a48b34690b Revert "Bug 1968644 - Part 10: Store JSCallingLocation and set the JSCallingLocation fallback for Media loads. r=emilio" for causing valgrid failures.
This reverts commit efd9a5ba48.

Revert "Bug 1968644 - Part 9: Add more tests for loads triggered by tracking scripts. r=valentin,anti-tracking-reviewers,emz"

This reverts commit 7d5c3e1c1c.

Revert "Bug 1968644 - Part 8: Populate the triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for WebSocket requests. r=valentin,necko-reviewers"

This reverts commit 53a783a51e.

Revert "Bug 1968644 - Part 7: Add tests. r=necko-reviewers,anti-tracking-reviewers,emz,valentin"

This reverts commit e52f034955.

Revert "Bug 1968644 - Part 6: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags during channel creation. r=necko-reviewers,kershaw"

This reverts commit f564c21b37.

Revert "Bug 1968644 - Part 5: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for CSS loads. r=emilio"

This reverts commit 8a8fd7bacc.

Revert "Bug 1968644 - Part 4: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for loads. r=smaug,necko-reviewers"

This reverts commit 7b3ba3b668.

Revert "Bug 1968644 - Part 3: Populate the triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for fetch requests. r=valentin,smaug"

This reverts commit 08f090244f.

Revert "Bug 1968644 - Part 2: Intorduce the ClassificationFlags to nsIClassifiedChannel.idl. r=dimi,necko-reviewers,valentin"

This reverts commit b8c01cd77c.

Revert "Bug 1968644 - Part 1: Introduce triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags to LoadInfo. r=necko-reviewers,kershaw"

This reverts commit a7619a72b4.
2025-06-17 14:27:29 +00:00
Tim Huang 8a8fd7bacc Bug 1968644 - Part 5: Populate triggeringFirstPartyClassificationFlags and triggeringThirdPartyClassificationFlags for CSS loads. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D252447
2025-06-17 09:24:45 +00:00
Emilio Cobos Álvarez 48a6257583 Bug 1954293 - Remove privacy.partition.network_state. r=necko-reviewers,anti-tracking-reviewers,valentin,timhuang
It's been on for years, there's no point in keeping the old code-paths.

Differential Revision: https://phabricator.services.mozilla.com/D241760
2025-06-03 15:20:34 +00:00
Emilio Cobos Álvarez 7c0d4089c5 Bug 1968202 - Generalize GlobalStyleSheetCache to support author stylesheets. r=smaug
In bug 1967507 I changed the timing of AnonymousContent stylesheet
loading in a way that it perturbed a css cache test because of
accessiblecaret.css

  https://hg.mozilla.org/mozilla-central/rev/a6a294ae1d18

However that made me realize that accessiblecaret.css is loaded
virtually in all processes, and it should be using the same mechanism we
use for UA sheets, rather than using all the CSS loader machinery
in-content. Same goes for details.css.

Expand GlobalStyleSheetCache to allow UA and Author sheets, and allow
ShadowRoot to get built-in stylesheets appended.

This allows accessiblecaret.css and details.css not to be marked as
content-accessible.

We could do the same at the document level for plaintext.css and co, but
that seems a bit less common, so maybe fine.

Differential Revision: https://phabricator.services.mozilla.com/D250909
2025-05-24 11:27:14 +00:00
Serban Stanca 4c663869d9 Revert "Bug 1968202 - Generalize GlobalStyleSheetCache to support author stylesheets. r=smaug" for causing wpt failures in prefetch-transfer-size-executor.html.
This reverts commit e2ac38c2a8.
2025-05-24 01:53:53 +00:00
Emilio Cobos Álvarez e2ac38c2a8 Bug 1968202 - Generalize GlobalStyleSheetCache to support author stylesheets. r=smaug
In bug 1967507 I changed the timing of AnonymousContent stylesheet
loading in a way that it perturbed a css cache test because of
accessiblecaret.css

  https://hg.mozilla.org/mozilla-central/rev/a6a294ae1d18

However that made me realize that accessiblecaret.css is loaded
virtually in all processes, and it should be using the same mechanism we
use for UA sheets, rather than using all the CSS loader machinery
in-content. Same goes for details.css.

Expand GlobalStyleSheetCache to allow UA and Author sheets, and allow
ShadowRoot to get built-in stylesheets appended.

This allows accessiblecaret.css and details.css not to be marked as
content-accessible.

We could do the same at the document level for plaintext.css and co, but
that seems a bit less common, so maybe fine.

Differential Revision: https://phabricator.services.mozilla.com/D250909
2025-05-23 13:30:13 +00:00
Emilio Cobos Álvarez 3556d63bd9 Bug 1967507 - Make CSS loader not count privileged sheets for testing.
This prevents browser_css_cache from spuriously failing on ASAN builds
after the last patch, since now creating the accessiblecaret doesn't
force a flush (and thus might not force accessiblecaret.css to be
parsed).
2025-05-22 16:40:23 +00:00
Tom Schuster 3f48655456 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 15:21:52 +00:00
Serban Stanca 071240c3d9 Revert "Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw" for causing multiple failures.
This reverts commit b9a9491a35.
2025-05-21 13:34:54 +00:00
Tom Schuster b9a9491a35 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 12:24:10 +00:00
Emilio Cobos Álvarez 1998613349 Bug 1963750 - Remove async sheet load probe. r=dshin
See reasoning in the bug.

Differential Revision: https://phabricator.services.mozilla.com/D248877
2025-05-12 14:06:27 +00:00
Travis Long 51338f51b5 Bug 1963748 - Remove metrics from GLAM experiment.r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D248325
2025-05-07 23:27:26 +00:00