Closed
Bug 1428774
Opened 8 years ago
Closed 8 years ago
nsBidiUtils::HasRTLChars() does unnecessary surrogate handling
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
mozilla60
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
Details
Attachments
(1 file)
The supplementary RTL ranges have the property that it's sufficient to examine the high surrogate to determine if an astral character is RTL.
Once 1428771 is fixed, nsBidiUtils::HasRTLChars() should, therefore, use loop by code unit and check each code unit using UCS2_CHAR_IS_BIDI instead of checking for surrogate pairs.
Downside: Certain unpaired high surrogates will be classified as RTL. This should not be a practical problem.
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•8 years ago
|
||
Aside: I intend to SIMD-accelerate this in Rust as part of bug 1402247.
| Assignee | ||
Updated•8 years ago
|
Summary: nsBidiUtils::HasRTLChars() does useless surrogate handling → nsBidiUtils::HasRTLChars() does unnecessary surrogate handling
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 5•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8940990 [details]
Bug 1428774 - Avoid surrogate math in HasRTLChars().
https://reviewboard.mozilla.org/r/211268/#review220458
Seems OK -- the potential change in behavior for certain unpaired surrogates might seem a bit fishy, but I can't think of any reason it actually matters here.
Attachment #8940990 -
Flags: review?(jfkthame) → review+
| Assignee | ||
Comment 6•8 years ago
|
||
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1e903401fe83
Avoid surrogate math in HasRTLChars(). r=jfkthame
Comment 8•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•