Closed Bug 1714468 Opened 4 months ago Closed 4 months ago

Simplify a condition checking relatively positioned frame

Categories

(Core :: Layout: Positioned, task)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(1 obsolete file)

In ReflowInput::InitConstraints(), we have

if (mStyleDisplay->IsRelativelyPositioned(mFrame) &&
    StylePositionProperty::Relative == mStyleDisplay->mPosition) { ... }

However, if (mStyleDisplay->IsRelativelyPositioned(mFrame)) { ... } is sufficient.

https://searchfox.org/mozilla-central/rev/bf8d5de8528036c09590009720bc172882845b80/layout/generic/ReflowInput.cpp#2218-2219

Calling nsStyleDisplay::IsRelativelyPositioned() is sufficient.

Attachment #9225103 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.