[wpt-sync] Sync PR 38085 - FontFallbackList::CompositeKey should take current_family->FamilyIsGeneric() into account
Categories
(Core :: Layout: Text and Fonts, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38085 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38085
Details from upstream follow.
Frédéric Wang <fwang@igalia.com> wrote:
FontFallbackList::CompositeKey should take current_family->FamilyIsGeneric() into account
FontFallBackList::GetShapeCache calculates the key of a FontDescription
via FontFallbackList::CompositeKey as follows:
Initialize the key's data/hash in FallbackListCompositeKey's
contructor. This ignores FontDescription::family_list_ but takes
into account FontDescription::generic_family_ via BitmapFields() and
AuxiliaryBitmapFields().Update key's data/hash via FallbackListCompositeKey::Add and
FontDescripion::CacheKey for each item of
FontDescription::family_list_As a consequence, this calculation is not sufficient to distinguish
FontDescription created from things like font-family: "system-ui"
(quoted) and font-family: system-ui (unquoted) [1] [2]. The
ShapeCache is still used in canvas and so it is possible to tweak
WPT test css/css-fonts/generic-family-keywords-001.html in order to
exhibit that issue.This CL modifies FontFallbackList::CompositeKey to ensure that
FamilyIsGeneric() is taken into account for each item of
FontDescription::family_list_. It also adds the canvas version of
the corresponding WPT test mentioned above.[1] The latter specifies a generic font family but the former does not.
See https://drafts.csswg.org/css-fonts-4/#family-name-syntax
[2] For generic family listed in FontDescription::GenericFamilyType,
it is necessary to add another generic family to the font-family
so that they use the same FontDescription::generic_family_.
For details, see https://docs.google.com/document/d/1nYJzL-MWQrTmf9Z-KscTWuM_5n6-IVdJeEllJ3Appro/editBug: 1408485
Change-Id: Iac95ccf0fd345352cce963f77a60818060a40dc7
Reviewed-on: https://chromium-review.googlesource.com/4176920
WPT-Export-Revision: 53ec8bcbcf5927d00ded6ee5986341f528ac5df2
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Comment 5•2 years ago
|
||
Comment 6•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fdff471795f6
https://hg.mozilla.org/mozilla-central/rev/2f7f65cb8508
Description
•