Document splitting followup: add a RelativeRenderRoot type for typesafe renderroot multiplexing

NEW
Unassigned

Status

()

enhancement
P3
normal
4 months ago
4 months ago

People

(Reporter: dthayer, Unassigned)

Tracking

(Depends on 1 bug)

Other Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Right now we just use RenderRoot everywhere, and we understand that we occasionally have to turn RenderRoot::Default into RenderRoot::Content if the RenderRoot::Default came from a source that we know is scoped to RenderRoot::Content. We could better verify this at compile time by adding a RelativeRenderRoot type which must be converted to a RenderRoot by anything that multiplexes render roots. I.e., WebRenderBridgeParent's RenderRootForExternal would take in a RelativeRenderRoot and return a RenderRoot.

(We could also change RenderRoot to AbsoluteRenderRoot, for a bit more clarity - opinions welcome.)

I like this idea, adding safety at compile time is always good.

You need to log in before you can comment on or make changes to this bug.