RESOLVED FIXED 204905
[LFC][IFC] Introduce InlineSoftLineBreakItem
https://bugs.webkit.org/show_bug.cgi?id=204905
Summary [LFC][IFC] Introduce InlineSoftLineBreakItem
zalan
Reported 2019-12-05 12:10:13 PST
to represent preserved segment breaks.
Attachments
Patch (26.74 KB, patch)
2019-12-05 12:25 PST, zalan
koivisto: review+
Radar WebKit Bug Importer
Comment 1 2019-12-05 12:10:36 PST
zalan
Comment 2 2019-12-05 12:25:44 PST
Antti Koivisto
Comment 3 2019-12-05 12:34:32 PST
Comment on attachment 384935 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384935&action=review > Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp:537 > + m_inlineItemRuns.append({ softLineBreakItem, contentLogicalWidth(), { }, Display::Run::TextContext { softLineBreakItem.position(), 0, emptyString() } }); Lineboxes include '\n' character contained in the underlying string. Not sure if/where that matters. > Source/WebCore/layout/inlineformatting/InlineSoftLineBreakItem.h:35 > +class InlineSoftLineBreakItem : public InlineItem { Feels like this could be combined into one LineBreak class with hard and soft type.
zalan
Comment 4 2019-12-05 13:22:55 PST
zalan
Comment 5 2019-12-05 13:26:36 PST
(In reply to Antti Koivisto from comment #3) > Comment on attachment 384935 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=384935&action=review > > > Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp:537 > > + m_inlineItemRuns.append({ softLineBreakItem, contentLogicalWidth(), { }, Display::Run::TextContext { softLineBreakItem.position(), 0, emptyString() } }); > > Lineboxes include '\n' character contained in the underlying string. Not > sure if/where that matters. yeah, good point. fixed. > > > Source/WebCore/layout/inlineformatting/InlineSoftLineBreakItem.h:35 > > +class InlineSoftLineBreakItem : public InlineItem { > > Feels like this could be combined into one LineBreak class with hard and > soft type. Hard line break does not have a position because it is not part of a text content. As you mentioned it could have an optional m_position but that's exactly what InlineItem is.
Note You need to log in before you can comment on or make changes to this bug.