Closed Bug 1780264 Opened 7 months ago Closed 6 months ago

Remove rarely used style structs cached in ReflowInput

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(3 files)

We cache various style structs in ReflowInput. I believe they were invented in ancient time because getting them in old style system is expensive, but with our current style system (servo), they are a lot cheaper. We already have a lot of usages throughout the layout module just calling frame->StyleText() for example.

ReflowInput is initialized every time we reflow a frame, so we can at least remove some structs that are seldom used to save resources.

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e628bf79a4dd
Part 1 - Remove ReflowInput::mStyleVisibility. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/63821d2687e3
Part 2 - Remove ReflowInput::mStylePadding. r=emilio
https://hg.mozilla.org/integration/autoland/rev/1aa4139cf6bf
Part 3 - Remove ReflowInput::mStyleText. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.