RESOLVED FIXED 205362
[LFC][IFC] Add lastInlineItemWithContent to LineBreaker::Content::isAtSoftWrapOpportunity
https://bugs.webkit.org/show_bug.cgi?id=205362
Summary [LFC][IFC] Add lastInlineItemWithContent to LineBreaker::Content::isAtSoftWra...
zalan
Reported 2019-12-17 16:04:23 PST
This is in preparation for LineBreaker::Content::isAtSoftWrapOpportunity being able to return a previous run index as soft wrap opportunity.
Attachments
Patch (5.13 KB, patch)
2019-12-17 16:07 PST, zalan
koivisto: review+
Radar WebKit Bug Importer
Comment 1 2019-12-17 16:04:56 PST
zalan
Comment 2 2019-12-17 16:07:09 PST
Antti Koivisto
Comment 3 2019-12-18 06:58:53 PST
Comment on attachment 385927 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=385927&action=review > Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp:299 > + for (auto i = priorContent.size(); i--;) { > + auto& previousInlineItem = runs[i].inlineItem; This could uses range for and WTF::makeReversedRange > Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp:304 > + ASSERT_NOT_REACHED(); I still prefer for loops looping over the main body.
zalan
Comment 4 2019-12-18 06:59:47 PST
(In reply to Antti Koivisto from comment #3) > Comment on attachment 385927 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=385927&action=review > > > Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp:299 > > + for (auto i = priorContent.size(); i--;) { > > + auto& previousInlineItem = runs[i].inlineItem; > > This could uses range for and WTF::makeReversedRange > > > Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp:304 > > + ASSERT_NOT_REACHED(); > > I still prefer for loops looping over the main body. oops, my bad.
zalan
Comment 5 2019-12-18 07:34:53 PST
Note You need to log in before you can comment on or make changes to this bug.