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
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
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
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
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
`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
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
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
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
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
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
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
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
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
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