remove some code complexity by using more suitable data types.
Created attachment 446059 [details] Patch
Created attachment 446067 [details] Patch
Created attachment 446373 [details] Patch
Comment on attachment 446373 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446373&action=review > Source/WebCore/ChangeLog:13 > + the previous ends +-horizontal margins) unless the content is embedded in an inline box (e.g. <span>embedded content</soan>) </span> > Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:345 > + Vector<std::unique_ptr<DisplayBoxNode>> children; I think we could reduce heap allocation by making this Vector<DisplayBoxNode> (with some inline capacity perhaps). > Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:371 > + Vector<DisplayBoxNode*> m_stack; Then this would probably need to be replaced with some sort of index thing.
(In reply to Antti Koivisto from comment #4) > Comment on attachment 446373 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=446373&action=review > > > Source/WebCore/ChangeLog:13 > > + the previous ends +-horizontal margins) unless the content is embedded in an inline box (e.g. <span>embedded content</soan>) > > </span> > > > Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:345 > > + Vector<std::unique_ptr<DisplayBoxNode>> children; > > I think we could reduce heap allocation by making this > Vector<DisplayBoxNode> (with some inline capacity perhaps). > > > Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:371 > > + Vector<DisplayBoxNode*> m_stack; > > Then this would probably need to be replaced with some sort of index thing. That's a very good point. I hope it's ok if I address this in a follow up patch.
Created attachment 446555 [details] Patch
Committed r286784 (245025@main): <https://commits.webkit.org/245025@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 446555 [details].
<rdar://problem/86287068>