Bug 230788 - Negative integers in @font-palette-values are invalid
Summary: Negative integers in @font-palette-values are invalid
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: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks: 230446
  Show dependency treegraph
 
Reported: 2021-09-25 01:46 PDT by Myles C. Maxfield
Modified: 2021-10-05 00:08 PDT (History)
11 users (show)

See Also:


Attachments
Patch (5.02 KB, patch)
2021-09-25 01:48 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (10.89 KB, patch)
2021-09-25 02:34 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (15.02 KB, patch)
2021-09-25 17:33 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (18.50 KB, patch)
2021-09-27 14:50 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (19.16 KB, patch)
2021-09-27 16:33 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (19.20 KB, patch)
2021-09-28 00:52 PDT, Myles C. Maxfield
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2021-09-25 01:46:49 PDT
Negative integers in @font-palette-values are invalid
Comment 1 Myles C. Maxfield 2021-09-25 01:48:05 PDT
Created attachment 439246 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2021-09-25 01:48:41 PDT
<rdar://problem/83528806>
Comment 3 EWS Watchlist 2021-09-25 01:49:27 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 4 Myles C. Maxfield 2021-09-25 02:34:24 PDT
Created attachment 439252 [details]
Patch
Comment 5 Myles C. Maxfield 2021-09-25 13:40:37 PDT
Comment on attachment 439252 [details]
Patch

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

> Source/WebCore/css/parser/CSSPropertyParser.cpp:4853
> +    return consumeInteger(range, 0);

I should change the parsed types to be unsigned, too.
Comment 6 Myles C. Maxfield 2021-09-25 17:33:44 PDT
Created attachment 439277 [details]
Patch
Comment 7 Myles C. Maxfield 2021-09-27 11:26:11 PDT
Comment on attachment 439277 [details]
Patch

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

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:468
> +            auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &index));

Nope
Comment 8 Myles C. Maxfield 2021-09-27 14:50:58 PDT
Created attachment 439397 [details]
Patch
Comment 9 Myles C. Maxfield 2021-09-27 16:33:07 PDT
Created attachment 439414 [details]
Patch
Comment 10 Myles C. Maxfield 2021-09-28 00:52:39 PDT
Created attachment 439438 [details]
Patch
Comment 11 Myles C. Maxfield 2021-09-28 12:53:48 PDT
Committed r283188 (242236@main): <https://commits.webkit.org/242236@main>
Comment 12 Darin Adler 2021-09-28 13:07:24 PDT
Comment on attachment 439438 [details]
Patch

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

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:456
>          auto light = kCTFontPaletteLight;
> -        auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &light));
> +        auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberCFIndexType, &light));

I am perhaps the biggest fan of "auto" in the entire WebKit project, but here is a place where it’s just not appropriate. Needs to be:

    CFIndex light = kCTFontPaletteLight;
Comment 13 Myles C. Maxfield 2021-09-28 15:03:55 PDT
Committed r283197 (242244@main): <https://commits.webkit.org/242244@main>
Comment 14 Myles C. Maxfield 2021-10-05 00:08:27 PDT
Committed r283540 (242505@main): <https://commits.webkit.org/242505@main>