[webkit-reviews] review granted: [Bug 255387] [IFC] InlineLevelBox::LayoutBounds is a glorified AscentAndDescent : [Attachment 465880] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 13 06:56:09 PDT 2023
Antti Koivisto <koivisto at iki.fi> has granted review:
Bug 255387: [IFC] InlineLevelBox::LayoutBounds is a glorified AscentAndDescent
https://bugs.webkit.org/show_bug.cgi?id=255387
Attachment 465880: Patch
https://bugs.webkit.org/attachment.cgi?id=465880&action=review
--- Comment #2 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 465880
--> https://bugs.webkit.org/attachment.cgi?id=465880
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=465880&action=review
> Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h:76
> struct LayoutBounds {
> - InlineLayoutUnit height() const { return ascent + descent; }
> - bool operator==(const LayoutBounds& other) const { return ascent ==
other.ascent && descent == other.descent; }
> + LayoutBounds(AscentAndDescent);
> + LayoutBounds() = default;
>
> - InlineLayoutUnit ascent { 0 };
> - InlineLayoutUnit descent { 0 };
> + InlineLayoutUnit ascent() const { return m_ascentAndDescent.ascent;
}
> + InlineLayoutUnit descent() const { return
m_ascentAndDescent.descent; }
> +
> + InlineLayoutUnit height() const { return
m_ascentAndDescent.height(); }
> + bool operator==(const LayoutBounds& other) const { return
m_ascentAndDescent == other.m_ascentAndDescent; }
> +
> + private:
> + AscentAndDescent m_ascentAndDescent;
> };
Maybe this type can be just replaced with AscentAndDescent directly? Or `using
LayoutBounds = AscentAndDescent`?
More information about the webkit-reviews
mailing list