Bug 196671
| Summary: | On iOS, moving by word granularity would move caret to a blank line | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ap, darin, megan_gardner, mitz, mmaxfield, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=196670 | ||
Ryosuke Niwa
After the bug 196670, we can move the caret by word granularity
but we'd incorrectly identify a blank line as a word boundary.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/49666652>
Ryosuke Niwa
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?
mitz
(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.