Closed Bug 1428276 Opened 2 years ago Closed 2 years ago

Make ExpectedOwnerForChild deal with abs.pos. anon boxes

Categories

(Core :: Layout, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: kuoe0.tw, Assigned: kuoe0.tw)

References

Details

Attachments

(1 file)

Like Bug 1423761, I think we should also use `GetInFlowParent()` in `ExpectedOwnerForChild()` to make sure that we can find the correct parent of style context for an OOF frame.
Attachment #8940089 - Flags: review?(cam)
Comment on attachment 8940089 [details]
Bug 1428276 - Make ExpectedOwnerForChild deal with abs.pos. anon boxes.

https://reviewboard.mozilla.org/r/210374/#review216548

::: layout/base/ServoRestyleManager.cpp:110
(Diff revision 1)
>        const nsIFrame* tableFrame = parent->PrincipalChildList().FirstChild();
>        MOZ_ASSERT(tableFrame->IsTableFrame());
>        // Handle :-moz-table and :-moz-inline-table.
>        parent = IsAnonBox(*tableFrame) ? parent->GetParent() : tableFrame;
>      } else {
> -      parent = parent->GetParent();
> +      parent = parent->GetInFlowParent();

Can you add a comment here saying that it's the in-flow parent we need to use, so that we correctly handle OOF anonymous boxes?
Attachment #8940089 - Flags: review?(cam) → review+
Pushed by tokuo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a30d386b21a
Make ExpectedOwnerForChild deal with abs.pos. anon boxes. r=heycam
https://hg.mozilla.org/mozilla-central/rev/7a30d386b21a
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.