[webkit-reviews] review granted: [Bug 212759] Text manipulation: first and last unit in a paragraph should not contain only excluded tokens : [Attachment 401047] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 4 16:11:04 PDT 2020


Wenson Hsieh <wenson_hsieh at apple.com> has granted Sihui Liu
<sihui_liu at apple.com>'s request for review:
Bug 212759: Text manipulation: first and last unit in a paragraph should not
contain only excluded tokens
https://bugs.webkit.org/show_bug.cgi?id=212759

Attachment 401047: Patch

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




--- Comment #2 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Comment on attachment 401047
  --> https://bugs.webkit.org/attachment.cgi?id=401047
Patch

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

> Source/WebCore/ChangeLog:10
> +	   tokens in a ManipulationUnit are excluded, it means the
ManipulationUnit is exluced and should not be 

Nit - “exluced”

> Source/WebCore/editing/TextManipulationController.cpp:417
> +		   Vector<ManipulationToken> tokens;
> +		   tokens.append(ManipulationToken {
m_tokenIdentifier.generate(), "[]", tokenInfo(content.node.get()), true });
> +		   unitsInCurrentParagraph.append(ManipulationUnit {
WTFMove(tokens), *contentNode });

Nit - you probably don’t need a local variable for `tokens`. But if you want to
keep the local variable, you should use an initializer list when initializing
`tokens`.


More information about the webkit-reviews mailing list