Issue #2828 - Part 2: Collect and hold rule cascade data per cascade layer

This commit is contained in:
Francis Dominic Fajardo 2025-07-16 17:20:26 +08:00 committed by roytam1
commit 7b51aa7ca1
2 changed files with 570 additions and 298 deletions

File diff suppressed because it is too large Load diff

View file

@ -28,7 +28,7 @@ struct ElementDependentRuleProcessorData;
struct nsCSSSelector;
struct nsCSSSelectorList;
struct nsFontFaceRuleContainer;
struct RuleCascadeData;
struct ResolvedRuleCascades;
struct TreeMatchContext;
class nsCSSKeyframesRule;
class nsCSSPageRule;
@ -232,7 +232,7 @@ private:
static bool CascadeSheet(mozilla::CSSStyleSheet* aSheet,
CascadeEnumData* aData);
RuleCascadeData* GetRuleCascade(nsPresContext* aPresContext);
ResolvedRuleCascades* GetRuleCascade(nsPresContext* aPresContext);
void RefreshRuleCascade(nsPresContext* aPresContext);
nsRestyleHint HasStateDependentStyle(ElementDependentRuleProcessorData* aData,
@ -246,7 +246,7 @@ private:
sheet_array_type mSheets;
// active first, then cached (most recent first)
RuleCascadeData* mRuleCascades;
ResolvedRuleCascades* mRuleCascades;
// If we cleared our mRuleCascades or replaced a previous rule
// processor, this is the media query result cache key that was used
@ -272,8 +272,8 @@ private:
const bool mIsShared;
// Whether we need to build up mDocumentCacheKey and mDocumentRules as
// we build a RuleCascadeData. Is true only for shared rule processors
// and only before we build the first RuleCascadeData. See comment in
// we build ResolvedRuleCascades. Is true only for shared rule processors
// and only before we build the first ResolvedRuleCascades. See comment in
// RefreshRuleCascade for why.
bool mMustGatherDocumentRules;