Bug 196671 - On iOS, moving by word granularity would move caret to a blank line
Summary: On iOS, moving by word granularity would move caret to a blank line
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-05 23:09 PDT by Ryosuke Niwa
Modified: 2019-04-05 23:22 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2019-04-05 23:09:27 PDT
After the bug 196670, we can move the caret by word granularity
but we'd incorrectly identify a blank line as a word boundary.
Comment 1 Radar WebKit Bug Importer 2019-04-05 23:10:08 PDT
<rdar://problem/49666652>
Comment 2 Ryosuke Niwa 2019-04-05 23:14:11 PDT
This really boils down to findNextWordFromIndex in https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/text/mac/TextBoundaries.mm

I wonder if we should just always use NSAttributedString's nextWordFromIndex to find a word boundary. Does anyone remember / know why we're calling into ICU directly? Maybe NSAttributedString wasn't available in iOS at the time?
Comment 3 mitz 2019-04-05 23:22:06 PDT
(In reply to Ryosuke Niwa from comment #2)
> Maybe NSAttributedString wasn't available in iOS at the time?

NSAttributedString was available, but -nextWordFromIndex:forward: wasn’t, because it was implemented in AppKit at the time.