Closed Bug 1729488 Opened 3 years ago Closed 3 years ago

Make the CSS cache more generic

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.

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.

Depends on: 1729477
Attachment #9239873 - Attachment description: WIP: Bug 1729488 - Refactor shared sheet cache into something more reusable. → Bug 1729488 - Refactor shared sheet cache into something more reusable. r=#layout-reviewers

Changing severity to S4 because no user impact.

Severity: -- → S4
Priority: -- → P3
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2cf0e1f9a018
Refactor shared sheet cache into something more reusable. r=jwatt
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/84750288c75c
Call malloc_size_of on the derived pointer to avoid ASAN complaints.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: