Bug 251691
| Summary: | Use `isControlCharacter()` helper | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Vitaly Dyackhov <vitaly> |
| Component: | Text | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | mmaxfield, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Vitaly Dyackhov
Several ways to check whether a character is a Unicode control character are used throughout the codebase. Such as:
```
u_charType(character) == U_CONTROL_CHAR
```
or
```
(character >= nullCharacter && character < space) || (character >= deleteCharacter && character < noBreakSpace)
```
We have a nice helper for this in `CharacterProperties.h` - `isControlCharacter()`.
It would be nice to use it since it is shorter and describes the intent better.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Vitaly Dyackhov
Pull request: https://github.com/WebKit/WebKit/pull/9605
EWS
Committed 260081@main (8e48e89eb72f): <https://commits.webkit.org/260081@main>
Reviewed commits have been landed. Closing PR #9605 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/105237321>