Bug 230394

Summary: Parsing support for font-palette
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, clopez, dino, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, joepeck, jonlee, koivisto, macpherson, menard, ryuan.choi, sergio, simon.fraser, thorton, webkit-bug-importer, youennf, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 230446, 230449    
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch
none
Patch
simon.fraser: review+
Patch for committing none

Description Myles C. Maxfield 2021-09-17 01:49:15 PDT
Parsing support for font-palette
Comment 1 Myles C. Maxfield 2021-09-17 02:05:49 PDT
Created attachment 438453 [details]
Patch
Comment 2 EWS Watchlist 2021-09-17 02:06:50 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 3 Myles C. Maxfield 2021-09-17 02:11:04 PDT
Created attachment 438455 [details]
Patch
Comment 4 Myles C. Maxfield 2021-09-18 01:20:06 PDT
Created attachment 438552 [details]
Patch
Comment 5 Myles C. Maxfield 2021-09-18 01:22:12 PDT
Created attachment 438553 [details]
Patch
Comment 6 Myles C. Maxfield 2021-09-18 01:38:43 PDT
Created attachment 438554 [details]
Patch
Comment 7 Myles C. Maxfield 2021-09-18 02:21:16 PDT
Created attachment 438556 [details]
Patch
Comment 8 Myles C. Maxfield 2021-09-18 11:47:46 PDT
Created attachment 438563 [details]
Patch
Comment 9 Myles C. Maxfield 2021-09-21 01:12:52 PDT
Created attachment 438790 [details]
Patch
Comment 10 Radar WebKit Bug Importer 2021-09-21 01:17:41 PDT
<rdar://problem/83343658>
Comment 11 Myles C. Maxfield 2021-09-21 11:07:48 PDT
Comment on attachment 438790 [details]
Patch

Simon says to use option 2 instead.
Comment 12 Myles C. Maxfield 2021-09-21 13:49:23 PDT
Created attachment 438852 [details]
Patch
Comment 13 Simon Fraser (smfr) 2021-09-21 13:55:06 PDT
Comment on attachment 438852 [details]
Patch

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

> Source/WebCore/platform/graphics/FontCache.h:160
> +            if (!m_rareData && !other.m_rareData)
> +                return true;
> +            return m_rareData && other.m_rareData && *m_rareData == *other.m_rareData;

arePointingToEqualData()?

> Source/WebCore/platform/graphics/FontPalette.h:37
> +        return type == other.type;

Shouldn't this compare the identifier if custom?

> Source/WebCore/platform/graphics/FontPalette.h:45
> +    enum class Type {

: unit8_t?

Won't help with padding here though, but it might shrink IPC.

> LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:6
> +FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 394
> +FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 394
> +FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 394
> +FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 394

You'll need iOS results for these.
Comment 14 Myles C. Maxfield 2021-09-21 15:15:37 PDT
Created attachment 438867 [details]
Patch for committing
Comment 15 Simon Fraser (smfr) 2021-09-21 15:17:06 PDT
Comment on attachment 438867 [details]
Patch for committing

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

> Source/WebCore/platform/graphics/FontCache.h:161
> +            && m_locale == other.m_locale) {
> +            if (!m_rareData && !other.m_rareData)
> +                return true;
> +            return arePointingToEqualData(m_rareData, other.m_rareData);

Why can't this be:

&& m_locale == other.m_locale
&& arePointingToEqualData(m_rareData, other.m_rareData))
  return true
Comment 16 Myles C. Maxfield 2021-09-21 15:57:38 PDT
Comment on attachment 438867 [details]
Patch for committing

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

>> Source/WebCore/platform/graphics/FontCache.h:161
>> +            return arePointingToEqualData(m_rareData, other.m_rareData);
> 
> Why can't this be:
> 
> && m_locale == other.m_locale
> && arePointingToEqualData(m_rareData, other.m_rareData))
>   return true

Whoops :(
Comment 17 Myles C. Maxfield 2021-09-21 17:04:43 PDT
Committed r282851 (241982@main): <https://commits.webkit.org/241982@main>
Comment 18 Myles C. Maxfield 2021-09-24 02:02:55 PDT
*** Bug 230566 has been marked as a duplicate of this bug. ***