[webkit-reviews] review granted: [Bug 210750] Text manipulation sometimes fails to replace text in title elements : [Attachment 396986] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 20 12:10:11 PDT 2020


Tim Horton <thorton at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 210750: Text manipulation sometimes fails to replace text in title elements
https://bugs.webkit.org/show_bug.cgi?id=210750

Attachment 396986: Patch

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




--- Comment #2 from Tim Horton <thorton at apple.com> ---
Comment on attachment 396986
  --> https://bugs.webkit.org/attachment.cgi?id=396986
Patch

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

> Source/WebCore/editing/TextManipulationController.cpp:481
> +	   if (replacementTokens.size() > 1 && (!item.element ||
!canPerformTextManipulationByReplacingEntireTextContent(*item.element)))

What's all the null checking? Didn't we just do this with `element` above? Why
not just use that, too?

> Source/WebCore/editing/TextManipulationController.cpp:488
> +	       if (i)

Sad that we have to avoid range-based for just for this, but alas


More information about the webkit-reviews mailing list