Closed Bug 1900522 Opened 1 month ago Closed 1 month ago

Minor cleanup in size computation functions

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(6 files)

These patches are discovered while reading our size computation APIs. See the patches for details.

Summary: Minor cleanup in size compuation functions → Minor cleanup in size computation functions
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

This patch move WritingMode to the second argument, for the consistency with
the design of its own APIs like StyleRect::Start(LogicalAxis, WritingMode),
and logical classes such as LogicalMargin::Side(LogicalSide, WritingMode).

We don't need to manually generate ServoStyleConsts.h. Update the warning to
avoid confusion.

ComputeBSizeDependentValue() is the same as ComputeCBDependentValue() except
for the assertion, and existing callers of it are passing containing block's
block-size, which indicates that calling ComputeCBDependentValue() might make
more sense.

This removed one is just forwarding the call to nsIFrame, and used internally
within ReflowInput.

While I'm here, rename local variables inside* and outside* to make them
clearer.

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/062103f7392c
Part 1 - Use IsIntrinsicKeyword() to implement HasIntrinsicKeywordForBSize(). r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/2e310084e774
Part 2 - Swap the arguments of StyleRect::Get() that gets T from logical side. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/0827429f288b
Part 3 - Update autogen_warning in servo/ports/geckolib/cbindgen.toml. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/253f4ea10489
Part 4 - Remove nsLayoutUtils::ComputeBSizeDependentValue(). r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/065a346ac916
Part 5 - Simplify some ComputeCBDependentValue() usages. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/dfaa55b2c652
Part 6 - Remove a SizeComputationInput::ComputeISizeValue() variant. r=layout-reviewers,emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: