Bug 251691 - Use `isControlCharacter()` helper
Summary: Use `isControlCharacter()` helper
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-03 08:18 PST by Vitaly Dyackhov
Modified: 2023-02-09 13:33 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Dyackhov 2023-02-03 08:18:44 PST
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.
Comment 1 Vitaly Dyackhov 2023-02-03 08:21:57 PST
Pull request: https://github.com/WebKit/WebKit/pull/9605
Comment 2 EWS 2023-02-09 13:32:50 PST
Committed 260081@main (8e48e89eb72f): <https://commits.webkit.org/260081@main>

Reviewed commits have been landed. Closing PR #9605 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-02-09 13:33:20 PST
<rdar://problem/105237321>