WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
197119
-[WKAutocorrectionContext emptyAutocorrectionContext:] generates invalid empty context
https://bugs.webkit.org/show_bug.cgi?id=197119
Summary
-[WKAutocorrectionContext emptyAutocorrectionContext:] generates invalid empt...
Daniel Bates
Reported
2019-04-19 14:35:32 PDT
An empty autocorrection context is expected to have a marked text range of, emphasis mine, NSMakeRange(**NSNotFound**, 0) NOT, again emphasis mine, NSMakeRange(**WTF::notFound**, 0). Subtle detail here: NSNotFound is equal to INT_MAX, but WTF::notFound = static_cast<size_t>(-1). Clients, like TextInput don't know that NSMakeRange(WTF::notFound, 0) represent the empty range. They only know that NSMakeRange(NSNotFound, 0) represents the empty range. Note that -[WKAutocorrectionContext emptyAutocorrectionContext:] just turns around and calls -[WKAutocorrectionContext autocorrectionContextWithWebContext:] so it's actually the latter that has the bug, but who would duplicate code when they could just call -[WKAutocorrectionContext emptyAutocorrectionContext:] 😀.
Attachments
Patch
(10.19 KB, patch)
2019-04-19 14:48 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2019-04-19 14:48:59 PDT
Created
attachment 367832
[details]
Patch
Daniel Bates
Comment 2
2019-04-19 16:48:44 PDT
Comment on
attachment 367832
[details]
Patch Clearing flags on attachment: 367832 Committed
r244473
: <
https://trac.webkit.org/changeset/244473
>
Daniel Bates
Comment 3
2019-04-19 16:48:46 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4
2019-04-19 16:49:21 PDT
<
rdar://problem/50064006
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug