and not just block based.
Created attachment 449546 [details] Patch
Created attachment 449547 [details] Patch
Created attachment 449583 [details] Patch
Created attachment 449584 [details] Patch
Comment on attachment 449584 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449584&action=review > Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:53 > + // FIXME: We could try to reuse the content builder in InlineItemsBuilder if this turns out to be a perf bottleneck. > + StringBuilder lineContentBuilder; > + for (auto& run : runs) { > + if (!run.isText()) > + continue; > + auto& textContent = run.textContent(); > + lineContentBuilder.append(downcast<InlineTextBox>(run.layoutBox()).content().substring(textContent->start, textContent->length)); > + } Wonder if copying could be avoided in some common cases and a stringview to content() string scanned directly
Created attachment 449610 [details] Patch
Committed r288332 (246240@main): <https://commits.webkit.org/246240@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449610 [details].
<rdar://problem/87855803>
(In reply to Antti Koivisto from comment #5) > Comment on attachment 449584 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=449584&action=review > > > Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:53 > > + // FIXME: We could try to reuse the content builder in InlineItemsBuilder if this turns out to be a perf bottleneck. > > + StringBuilder lineContentBuilder; > > + for (auto& run : runs) { > > + if (!run.isText()) > > + continue; > > + auto& textContent = run.textContent(); > > + lineContentBuilder.append(downcast<InlineTextBox>(run.layoutBox()).content().substring(textContent->start, textContent->length)); > > + } > > Wonder if copying could be avoided in some common cases and a stringview to > content() string scanned directly Yeah, I think we could add a fast path like that.