Open Bug 1571963 Opened 5 years ago Updated 2 years ago

Teach nsIFrame::Init() the type of continuation to create

Categories

(Core :: Layout, task, P3)

task

Tracking

()

People

(Reporter: TYLin, Unassigned)

Details

The concept of non-fluid (or fixed) continuations was added in bug 299065.

When calling nsCSSFrameConstructor::CreateContinuingFrame(), we does require the caller to pass aFluid to distinguish which kind of continuation to create. However, nsIFrame::Init() lacks such an argument, so it always creates a fluid continuation, and later it tweaks the continuation to be non-fluid.

What I'd like to do:

  1. Add an extra argument to nsIFrame::Init() to indicate the type of continuation to create. The argument is better not to be a bool, but a strong type like enum class FrameContinuationTypes {Fluid, NonFluid}.
  2. Move this tweak into nsSplittableFrame::Init and nsContinuingTextFrame::Init.
  3. Audit the caller of nsCSSFrameConstructor::CreateContinuingFrame to use the enum class instead of aFluid.
  4. Rename nsFrame::Init's parameter aPrevInFlow to aPrevContinuation as suggested by dbaron in https://phabricator.services.mozilla.com/D40761#1229155
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.