Bug 212759 - Text manipulation: first and last unit in a paragraph should not contain only excluded tokens
Summary: Text manipulation: first and last unit in a paragraph should not contain only...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-04 10:35 PDT by Sihui Liu
Modified: 2020-06-05 09:58 PDT (History)
5 users (show)

See Also:


Attachments
Patch (25.10 KB, patch)
2020-06-04 11:00 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (24.91 KB, patch)
2020-06-04 22:45 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2020-06-04 10:35:01 PDT
...
Comment 1 Sihui Liu 2020-06-04 11:00:01 PDT
Created attachment 401047 [details]
Patch
Comment 2 Wenson Hsieh 2020-06-04 16:11:04 PDT
Comment on attachment 401047 [details]
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`.
Comment 3 Sihui Liu 2020-06-04 22:45:44 PDT
Created attachment 401120 [details]
Patch for landing
Comment 4 EWS 2020-06-04 23:13:35 PDT
Committed r262601: <https://trac.webkit.org/changeset/262601>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401120 [details].
Comment 5 Radar WebKit Bug Importer 2020-06-05 09:58:10 PDT
<rdar://problem/64033285>