Bug 212759

Summary: Text manipulation: first and last unit in a paragraph should not contain only excluded tokens
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: HTML EditingAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, mifenton, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Sihui Liu
Reported 2020-06-04 10:35:01 PDT
...
Attachments
Patch (25.10 KB, patch)
2020-06-04 11:00 PDT, Sihui Liu
no flags
Patch for landing (24.91 KB, patch)
2020-06-04 22:45 PDT, Sihui Liu
no flags
Sihui Liu
Comment 1 2020-06-04 11:00:01 PDT
Wenson Hsieh
Comment 2 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`.
Sihui Liu
Comment 3 2020-06-04 22:45:44 PDT
Created attachment 401120 [details] Patch for landing
EWS
Comment 4 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].
Radar WebKit Bug Importer
Comment 5 2020-06-05 09:58:10 PDT
Note You need to log in before you can comment on or make changes to this bug.