Commit graph

540 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
641fa20731 Bug 1825825 - Simplify NAC setup. r=smaug
Make all UA widgets also NAC.

Keep the UA widget flag but break at anonymous subtree boundaries, so
that only nodes inside the UA widget directly (and not NAC from those)
get the flag.

This is important because two callers depend on this difference:

 * The style system, since we still want to match content rules from
   stylesheets in the UA widget. We also match user rules, which is a
   bit sketchy, but that was the previous behavior, will file a
   follow-up for that.

 * The reflector code, since we want the scope for UA widgets to not
   include the NAC nodes inside that UA widget. nsINode::IsInUAWidget
   got it wrong.

After this patch, ChromeOnlyAccess is equivalent to
IsInNativeAnonymousSubtree, so we should probably unify the naming.
That's left for a follow-up patch because I don't have a strong
preference.

Differential Revision: https://phabricator.services.mozilla.com/D174310
2023-04-05 09:19:15 +00:00
Emilio Cobos Álvarez
91e6e4c5d4 Bug 1823686 - Share URLExtraData between SVG attribute mapping and style attribute. r=smaug
I don't think there's ever a way these should differ.

Got some include hell from removing ReferrerInfo.h from Document.h but
hopefully should be straight-forward to review.

Depends on D173154

Differential Revision: https://phabricator.services.mozilla.com/D173155
2023-03-22 14:54:43 +00:00
Emilio Cobos Álvarez
80a760bb0c Bug 1823686 - Unify ReferrerInfo::CreateFor{InternalCSS,SVG}Resources, since they're the same. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D173154
2023-03-22 11:50:56 +00:00
Otto Länd
bdc241ec27 Bug 1818026: apply code formatting via Lando
# ignore-this-changeset
2023-02-24 21:12:41 +00:00
Gijs Kruitbosch
c9fd9bf2af Bug 1818026 - stop loading page style actor stuff for every process all the time, r=mconley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D170498
2023-02-24 21:09:36 +00:00
Cristian Tuns
55c2060892 Backed out 4 changesets (bug 1818026) for causing build bustages on Loader.cpp CLOSED TREE
Backed out changeset 31e30c051015 (bug 1818026)
Backed out changeset 1fbedd7a8a26 (bug 1818026)
Backed out changeset a5be1aaa8f65 (bug 1818026)
Backed out changeset 1976d91a52b2 (bug 1818026)
2023-02-24 14:32:44 -05:00
Otto Länd
c8ac872fc5 Bug 1818026: apply code formatting via Lando
# ignore-this-changeset
2023-02-24 19:20:26 +00:00
Gijs Kruitbosch
f93bae09b6 Bug 1818026 - stop loading page style actor stuff for every process all the time, r=mconley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D170498
2023-02-24 17:57:04 +00:00
Cosmin Sabou
fd67d5ee44 Backed out 3 changesets (bug 1818026) for causing mochitest plain failures on test_SVGStyleElement.xhtml.
Backed out changeset 808a73bbb614 (bug 1818026)
Backed out changeset 9b7dbaeb6deb (bug 1818026)
Backed out changeset 62e5f2fd2775 (bug 1818026)
2023-02-24 16:08:12 +02:00
Gijs Kruitbosch
103c6447de Bug 1818026 - stop loading page style actor stuff for every process all the time, r=mconley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D170498
2023-02-24 09:07:47 +00:00
Kershaw Chang
ad5f6f3fd8 Bug 1807879 - Remove MOZ_DIAGNOSTIC_ASSERT_ENABLED for mSheetCompleteCalled and mIntentionallyDropped, r=emilio DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165658
2022-12-29 10:44:54 +00:00
Kershaw Chang
8a29c4a328 Bug 1769635 - Make sure AsyncAbort is always called, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D164449
2022-12-27 13:58:14 +00:00
Andrew McCreight
ce28c41da0 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Csoregi Natalia
bfc8cd0834 Backed out changeset c92d26145221 (bug 1769635) for causing assertion failures HttpBaseChannel.h. CLOSED TREE 2022-12-14 22:35:20 +02:00
Kershaw Chang
de079e859b Bug 1769635 - Make sure AsyncAbort is always called, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D164449
2022-12-14 13:58:30 +00:00
Norisz Fay
373e513a9f Backed out changeset 53b86a805445 (bug 1769635) for causing mochitest failures CLOSED TREE 2022-12-13 20:10:38 +02:00
Kershaw Chang
4842dfc9f6 Bug 1769635 - Make sure AsyncAbort is always called, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D164449
2022-12-13 15:08:29 +00:00
Sandor Molnar
e664dcb83d Backed out changeset 5dafd39646e4 (bug 1769635) for causing xpc failures in toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js CLOSED TREE 2022-12-13 01:22:34 +02:00
Kershaw Chang
3d59cfc3f7 Bug 1769635 - Make sure AsyncAbort is always called, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D164449
2022-12-12 20:44:46 +00:00
Emilio Cobos Álvarez
b9125674ca Bug 1799200 - Sync-load <link rel=stylesheet> on chrome documents' shadow trees. r=smaug
This reuses the same codepath that we use for video controls, so that
the browser chrome can load external styles without FOUC.

Loading external styles as compared to internal styles is preferable,
because they can be shared across documents easily.

In the future, I think the idea is that the front-end would use CSS
modules, but meanwhile this should allow them to get along without
adding hacks to their code.

Differential Revision: https://phabricator.services.mozilla.com/D164245
2022-12-09 15:22:14 +00:00
Cristian Tuns
e04e334183 Backed out changeset c34fb10e0a9f (bug 1799200) for causing mochitest failures on SharedSubResourceCache.h CLOSED TREE 2022-12-09 06:18:00 -05:00
Emilio Cobos Álvarez
da4fcc1e41 Bug 1799200 - Sync-load <link rel=stylesheet> on chrome documents' shadow trees. r=smaug
This reuses the same codepath that we use for video controls, so that
the browser chrome can load external styles without FOUC.

Loading external styles as compared to internal styles is preferable,
because they can be shared across documents easily.

In the future, I think the idea is that the front-end would use CSS
modules, but meanwhile this should allow them to get along without
adding hacks to their code.

Differential Revision: https://phabricator.services.mozilla.com/D164245
2022-12-09 10:23:43 +00:00
Manuel Bucher
01bc307305 Bug 1771867 - Early Hints Phase 2 - Part 6: Pass early hint preload to style preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161176
2022-12-02 16:15:55 +00:00
Csoregi Natalia
5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher
f155e62e3b Bug 1771867 - Early Hints Phase 2 - Part 6: Pass early hint preload to style preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161176
2022-12-02 09:45:26 +00:00
Nicolas B. Pierron
859240b35e Bug 1797312 - SharedSubResourceCacheLoadingValueBase use on accessors. r=emilio
`SharedSubResourceCacheLoadingValueBase` define the `mIsCancelled` field which
is overloaded by `SheetLoadData`. This patch moves all fields including
`mIsLoading` to `SheetLoadData` and add accessors to access these fields.

Differential Revision: https://phabricator.services.mozilla.com/D160226
2022-10-26 16:36:03 +00:00
Emilio Cobos Álvarez
3fddb3b833 Bug 1308080 - Make <details> use a shadow tree as per spec. r=TYLin,smaug
The behavior changes match WebKit and Blink. I can look into upstreaming
some of these to WPT.

Differential Revision: https://phabricator.services.mozilla.com/D34754
2022-09-16 14:54:12 +00:00
Sandor Molnar
259f357a67 Backed out changeset 27c0485f1740 (bug 1308080) for causing assertion failure in dom/ShadowRoot.h & wr failures in /css/css-multicol/multicol-span-all-dynamic CLOSED TREE 2022-09-14 05:47:49 +03:00
Emilio Cobos Álvarez
97f29b0b89 Bug 1308080 - Make <details> use a shadow tree as per spec. r=TYLin,smaug
The behavior changes match WebKit and Blink. I can look into upstreaming
some of these to WPT.

Differential Revision: https://phabricator.services.mozilla.com/D34754
2022-09-13 21:52:50 +00:00
Emilio Cobos Álvarez
2abe4462f2 Bug 1780650 - Fix assert in SharedStyleSheetCache. r=boris
The document might be gone already if unlinking / cc has happened.

Differential Revision: https://phabricator.services.mozilla.com/D154918
2022-08-17 18:40:08 +00:00
Manuel Bucher
14dd2f26fc Bug 1761242 - Expose computing security flags for early hint preloader r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D144798
2022-06-15 09:59:44 +00:00
Molnar Sandor
1fc858a96d Backed out 5 changesets (bug 1761242, bug 1744822, bug 1761252) for causing browser-chrome failures in netwerk/test/browser/browser_103_assets.js CLOSED TREE
Backed out changeset 33cc08eb51b3 (bug 1744822)
Backed out changeset b70697d24e75 (bug 1761252)
Backed out changeset 4a5e10110c6a (bug 1761242)
Backed out changeset 7cda175b833d (bug 1761242)
Backed out changeset 4f5ed111093b (bug 1761242)
2022-06-08 18:56:35 +03:00
Manuel Bucher
35abf46688 Bug 1761242 - Expose computing security flags for early hint preloader r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D144798
2022-06-08 14:33:10 +00:00
Julien Wajsberg
830ac30ee4 Bug 1752861 - [profiler] Rename and expose to JS some existing frame labels as well as adding a few r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D140389
2022-03-11 09:18:30 +00:00
Mike Hommey
8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
Emilio Cobos Álvarez
48c864f2b1 Bug 1729488 - Refactor shared sheet cache into something more reusable. r=jwatt
This moves the style-specific bits of the shared style sheet cache into
a super-class, and leaves the generic "sub-resource management" bits
inside a base class. In order to implement it you need to provide some
types, mainly:

  * Loader, which implements LoaderPrincipal() and allows you to key per
    principal. The idea is that this would be the
    {CSS,Script,Image}Loader object.

  * Key (self explanatory). We might want to introduce a common key to
    share the cache partitioning logic.

  * Value, which represents the final cached value. This is expected to
    be a StyleSheet / Stencil / imgRequestProxy.

  * LoadingValue, which must inherit from
    SharedSubResourceCacheLoadingValueBase (which contains the linked
    list and the state that the cache manages). It also must provide a
    ValueForCache() and ExpirationTime() members. For style, this is the
    SheetLoadData. For script this will probably be the
    ScriptLoadRequest. For images it might be enough with the
    imgRequestProxy, but we might need something else, haven't looked
    into it too deeply yet.

We move the use counters into the stylesheet since that's both more
similar to how we treat StyleSheetContents and easier (that way we don't
need to add some sort of "extra data" thing to the cache).

Differential Revision: https://phabricator.services.mozilla.com/D124820
2021-10-05 15:15:22 +00:00
Olli Pettay
a20bf5465f Bug 1731132, unsuppress painting on top level content presshells sooner, r=emilio
Unsuppressing is done only if the page can use stylesheet cache. That should mean the
load isn't a cold load and also some other resources may be cached and thus
painting could happen sooner.

There is currently a regression around dom.ipc.processCount.webIsolated handling, but the
testing has been done with dom.ipc.processCount.webIsolated==1, and the patch for bug 1731792
should give back similar behavior as what process count 1 has.

Differential Revision: https://phabricator.services.mozilla.com/D125878
2021-09-28 12:04:42 +00:00
Emilio Cobos Álvarez
7529077948 Bug 1730669 - Simplify requesting node set up in the CSS loader. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125527
2021-09-15 16:43:30 +00:00
criss
2365892d99 Backed out changeset 80a164c1054e (bug 1730669) for causing bustages on css::SheetLoadData 2021-09-15 15:07:06 +03:00
Emilio Cobos Álvarez
1a541b6a88 Bug 1730669 - Simplify requesting node set up in the CSS loader. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125527
2021-09-15 11:02:57 +00:00
Emilio Cobos Álvarez
ba00bd23b7 Bug 1729477 - Remove nsXULPrototypeCache::mStyleSheetTable. r=smaug
With a very simple tweak to SheetLoadDataHashKey::KeyEquals we should
get the same kind of caching but in a much simpler way.

Depends on D125450

Differential Revision: https://phabricator.services.mozilla.com/D124807
2021-09-14 10:43:49 +00:00
Emilio Cobos Álvarez
3d56b49731 Bug 1729477 - Prevent SheetLoadData from creating cycles for too long. r=smaug
This fixes a leak that my previous patch uncovers. See comment 9 for the
diagnostic, I had missed mRequestingNode in comment 10.

The observer change is not technically necessary but since observers can
theoretically keep alive random stuff as well, clean them up as well.

In particular, clear mOwningNode after we've fired load / error events
(which is what we need it for), and mRequestingNode once we call
LoadComplete, where it is no longer useful.

Differential Revision: https://phabricator.services.mozilla.com/D125450
2021-09-14 10:43:48 +00:00
Sandor Molnar
870ff4f480 Backed out 3 changesets (bug 1729477) for causing devtools failures in browser_webconsole_sidebar_object_expand_when_message_pruned. CLOSED TREE
Backed out changeset 8cbf3101ed8a (bug 1729477)
Backed out changeset 7457834fb7d0 (bug 1729477)
Backed out changeset 1259d2d1f247 (bug 1729477)
2021-09-09 03:55:31 +03:00
Emilio Cobos Álvarez
2b47e33bec Bug 1729477 - Remove nsXULPrototypeCache::mStyleSheetTable. r=smaug
With a very simple tweak to SheetLoadDataHashKey::KeyEquals we should
get the same kind of caching but in a much simpler way.

Differential Revision: https://phabricator.services.mozilla.com/D124807
2021-09-08 21:03:02 +00:00
Emilio Cobos Álvarez
60812fc63c Bug 1711437 - Don't EnsureUniqueInner from the cssRules getter. r=layout-reviewers,jfkthame
Instead, fix up the various content data structures when the stylesheet
is mutated. This makes reading a stylesheet not disable style sharing.

Differential Revision: https://phabricator.services.mozilla.com/D115203
2021-07-20 13:17:02 +00:00
Dorel Luca
d1e1f219ba Backed out changeset 0e17878eeb86 (bug 1711437) for causing Bug 1719963. a=backout DONTBUILD 2021-07-14 00:36:05 +03:00
Emilio Cobos Álvarez
241951bce9 Bug 1711437 - Don't EnsureUniqueInner from the cssRules getter. r=layout-reviewers,jfkthame
Instead, fix up the various content data structures when the stylesheet
is mutated. This makes reading a stylesheet not disable style sharing.

Differential Revision: https://phabricator.services.mozilla.com/D115203
2021-07-12 16:02:58 +00:00
Alexandru Michis
6550c23862 Backed out changeset 998af7ced46f (bug 1711437) for causing Bug 1719963. a=backout 2021-07-10 12:44:08 +03:00
Emilio Cobos Álvarez
3de336bbc1 Bug 1711437 - Don't EnsureUniqueInner from the cssRules getter. r=layout-reviewers,jfkthame
Instead, fix up the various content data structures when the stylesheet
is mutated. This makes reading a stylesheet not disable style sharing.

Differential Revision: https://phabricator.services.mozilla.com/D115203
2021-07-09 16:25:54 +00:00
Hubert Boma Manilla
7f97d78756 Bug 1638259 - Notify devtools when style resources blocked on CSP r=necko-reviewers,valentin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D102599
2021-04-06 22:40:26 +00:00