[webkit-reviews] review granted: [Bug 223480] Add a fast path for subdivideAndResolveStyle() : [Attachment 423661] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 18 15:11:15 PDT 2021

Myles C. Maxfield <mmaxfield at apple.com> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 223480: Add a fast path for subdivideAndResolveStyle()

Attachment 423661: Patch


--- Comment #2 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 423661
  --> https://bugs.webkit.org/attachment.cgi?id=423661

View in context: https://bugs.webkit.org/attachment.cgi?id=423661&action=review

> Source/WebCore/ChangeLog:9
> +	   Most of the time, InlineTextBox::paint() will be painting text runs
with no marked text,
> +	   so optimize subdivideAndResolveStyle() for this case.

Is the motivation cleanliness or performance? If performance, would be good to
validate with a perf test.

> Source/WebCore/rendering/MarkedTextStyle.cpp:157
> +    if (textsToCoalesce.size() < 2)

nit: I think 1 is a more obvious sentinel than 2, so I would say "<= 1" instead
of "< 2".

More information about the webkit-reviews mailing list