[Webkit-unassigned] [Bug 226731] Factor MarkedText collection out of LegacyInlineTextBox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 8 07:48:59 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226731

--- Comment #3 from Antti Koivisto <koivisto at iki.fi> ---
> This would be slightly more efficient if you did this as:
> 
> auto markedTexts = MarkedText::collectForDocumentMarkers(renderer(),
> selectableRange, MarkedText::PaintPhase::Background);
> markedTexts.appendVector(MarkedText::collectForHighlights(renderer(),
> parent()->renderer(), selectableRange, MarkedText::PaintPhase::Background));
> 
> though I do like the symmetry in your version.

Is there a meaningful efficiency difference? Moving into an empty vector is just setting a pointer?

But yeah, I went for symmetry here.


> I wonder if it would make sense at some point to make
> collectForDocumentMarkers take a functor that does the subdivide rather than
> allocating the vector then subdividing.

There is lots of cleanup potential here but I'll try to stay focused on getting stuff out from legacy lines for now. Should be easier to see what to do when everything has been moved out.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210608/0cca28fc/attachment-0001.htm>


More information about the webkit-unassigned mailing list