Closed Bug 1856942 Opened 8 months ago Closed 8 months ago

Abstract details of `Loader::LoadSheet` away

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: mbrodesser-Igalia, Assigned: mbrodesser-Igalia)

References

Details

Attachments

(6 files)

Afterwards, extending it is safer.

Status: NEW → ASSIGNED

Emilio: perhaps take a look at all patches of this bug first before
commenting.

In another patch, ::LoadSheet needs to be extended to support the
fetchpriority attribute (see
https://bugzilla.mozilla.org/show_bug.cgi?id=1839315).

Loader::LoadSheet is already 350 lines long
(https://searchfox.org/mozilla-central/rev/29bdf6ff9965a647c6f64d63fed2b5bd094532c7/layout/style/Loader.cpp#1147-1495).
To avoid further growing Loader::LoadSheet, details are abstract away
in this and following parts.

This is in line with
https://google.github.io/styleguide/cppguide.html#Write_Short_Functions.

Depends on D190044

Pushed by mbrodesser@igalia.com:
https://hg.mozilla.org/integration/autoland/rev/3e65c2025149
part 1) Rename `IncrementOngoingLoadCount` to `IncrementOngoingLoadCountAndMaybeBlockOnload`. r=emilio
https://hg.mozilla.org/integration/autoland/rev/4a5608f7276f
part 2) Factor sync loading of sheet out of `Loader::LoadSheet`. r=emilio
https://hg.mozilla.org/integration/autoland/rev/e39a99b0de3b
part 3) Factor potentially deferring loading the sheet out of `Loader::LoadSheet`. r=emilio
https://hg.mozilla.org/integration/autoland/rev/8d4df1077b73
part 4) Factor potentially coalescing the load out of `Loader::LoadSheet`. r=emilio
https://hg.mozilla.org/integration/autoland/rev/3e709d5597d9
part 5) Factor async loading of a sheet out of `Loader::LoadSheet`. r=emilio
https://hg.mozilla.org/integration/autoland/rev/a65427b65793
part 6) Rename `DecrementOngoingLoadCount` to `DecrementOngoingLoadCountAndMaybeUnblockOnload`. r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: