RESOLVED FIXED 255387
[IFC] InlineLevelBox::LayoutBounds is a glorified AscentAndDescent
https://bugs.webkit.org/show_bug.cgi?id=255387
Summary [IFC] InlineLevelBox::LayoutBounds is a glorified AscentAndDescent
zalan
Reported 2023-04-12 21:15:45 PDT
ssia
Attachments
Patch (38.20 KB, patch)
2023-04-12 21:20 PDT, zalan
no flags
Patch (21.09 KB, patch)
2023-04-13 09:25 PDT, zalan
ews-feeder: commit-queue-
Patch (21.09 KB, patch)
2023-04-13 10:18 PDT, zalan
no flags
Patch (21.18 KB, patch)
2023-04-13 13:40 PDT, zalan
no flags
Patch (21.28 KB, patch)
2023-04-13 18:52 PDT, zalan
no flags
zalan
Comment 1 2023-04-12 21:20:41 PDT
Antti Koivisto
Comment 2 2023-04-13 06:56:09 PDT
Comment on attachment 465880 [details] 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`?
zalan
Comment 3 2023-04-13 08:58:20 PDT
(In reply to Antti Koivisto from comment #2) > Comment on attachment 465880 [details] > 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`? yeah it was going to be one of the next steps, but you are right, there's no need for this intermediate step. will change.
zalan
Comment 4 2023-04-13 09:25:30 PDT
zalan
Comment 5 2023-04-13 10:18:53 PDT
zalan
Comment 6 2023-04-13 13:40:18 PDT
zalan
Comment 7 2023-04-13 18:52:47 PDT
EWS
Comment 8 2023-04-13 20:48:08 PDT
Committed 262942@main (a055bb114d45): <https://commits.webkit.org/262942@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 465906 [details].
Radar WebKit Bug Importer
Comment 9 2023-04-13 20:49:16 PDT
Note You need to log in before you can comment on or make changes to this bug.