Bug 216098 - Use unicode macros instead of manual range checks in TextCodecUTF16
Summary: Use unicode macros instead of manual range checks in TextCodecUTF16
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-02 14:18 PDT by Alex Christensen
Modified: 2020-09-03 08:31 PDT (History)
2 users (show)

See Also:


Attachments
Patch (21.31 KB, patch)
2020-09-02 14:19 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (2.67 KB, patch)
2020-09-02 14:23 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (2.49 KB, patch)
2020-09-02 22:30 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-09-02 14:18:19 PDT
Use unicode macros instead of manual range checks in TextCodecUTF16
Comment 1 Alex Christensen 2020-09-02 14:19:05 PDT
Created attachment 407813 [details]
Patch
Comment 2 Darin Adler 2020-09-02 14:22:16 PDT
Comment on attachment 407813 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=407813&action=review

> Source/WebCore/platform/text/TextCodecSingleByte.cpp:2
> + * Copyright (C) 2020 Apple Inc. All rights reserved.

I assume you didn’t mean to include this in this patch.

> Source/WebCore/platform/text/TextCodecSingleByte.h:32
> +class TextCodecSingleByte : public TextCodec {

I assume you didn’t mean to include this in this patch.
Comment 3 Alex Christensen 2020-09-02 14:22:42 PDT
Comment on attachment 407813 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=407813&action=review

>> Source/WebCore/platform/text/TextCodecSingleByte.h:32
>> +class TextCodecSingleByte : public TextCodec {
> 
> I assume you didn’t mean to include this in this patch.

I didn't.
Comment 4 Alex Christensen 2020-09-02 14:23:46 PDT
Created attachment 407814 [details]
Patch
Comment 5 EWS 2020-09-02 20:28:56 PDT
Found 1 new test failure: fast/encoding/char-decoding.html
Comment 6 Darin Adler 2020-09-02 20:43:01 PDT
Looks like these two tests are failing on Windows:

fast/encoding/char-decoding.html
fast/encoding/charset-replacement.html

Maybe they both need to be re-based?
Comment 7 Alex Christensen 2020-09-02 21:21:11 PDT
This change causes tests to fail.  There's something wrong with it.
Comment 8 Darin Adler 2020-09-02 21:24:12 PDT
Comment on attachment 407814 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=407814&action=review

> Source/WebCore/platform/text/TextCodecUTF16.cpp:79
> +            if (U16_IS_LEAD(codeUnit)) {

This needs to be U16_IS_TRAIL, not U16_IS_LEAD.
Comment 9 Alex Christensen 2020-09-02 22:30:47 PDT
Created attachment 407868 [details]
Patch
Comment 10 EWS 2020-09-03 08:30:02 PDT
Committed r266517: <https://trac.webkit.org/changeset/266517>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407868 [details].
Comment 11 Radar WebKit Bug Importer 2020-09-03 08:31:14 PDT
<rdar://problem/68280790>