[webkit-reviews] review granted: [Bug 239370] Simplify String::insert() implementation and reduce usage : [Attachment 457673] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 15 14:06:50 PDT 2022


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 239370: Simplify String::insert() implementation and reduce usage
https://bugs.webkit.org/show_bug.cgi?id=239370

Attachment 457673: Patch

https://bugs.webkit.org/attachment.cgi?id=457673&action=review




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 457673
  --> https://bugs.webkit.org/attachment.cgi?id=457673
Patch

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

> Source/WTF/ChangeLog:8
> +	   Simplify String::insert() implementation and reduce usage.

What uses remain?

> Source/WebCore/dom/CharacterData.cpp:170
> +    StringView oldDataView { m_data };
> +    auto newData = makeString(oldDataView.left(offset), data,
oldDataView.substring(offset + count));

Should we add a special case for when count is 0 and data is empty?


More information about the webkit-reviews mailing list