[webkit-reviews] review granted: [Bug 205378] TextManipulationController should respect new token orders : [Attachment 386188] Implements the new behavior

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 20 17:19:10 PST 2019


Wenson Hsieh <wenson_hsieh at apple.com> has granted Ryosuke Niwa
<rniwa at webkit.org>'s request for review:
Bug 205378: TextManipulationController should respect new token orders
https://bugs.webkit.org/show_bug.cgi?id=205378

Attachment 386188: Implements the new behavior

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




--- Comment #5 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 386188
  --> https://bugs.webkit.org/attachment.cgi?id=386188
Implements the new behavior

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

> Source/WebCore/editing/TextManipulationController.cpp:279
> +    RefPtr<Node> parent;

I found it confusing that `!parent` means that we should append the child node
to a separate insertion position instead, but I can't really think of an
alternative that doesn't end up making this more complicated :/

Maybe add a comment to clarify this?

> Source/WebCore/editing/TextManipulationController.cpp:369
> +	   if (i == currentElementStack.size() && i == currentAncestors.size())
{
> +	       insertions.append(NodeInsertion { currentElementStack.size() ?
currentElementStack.last().ptr() : nullptr, contentNode.releaseNonNull() });
> +	   } else {

Nit - no braces?


More information about the webkit-reviews mailing list