Changeset 283756 in webkit
- Timestamp:
- Oct 7, 2021 4:37:01 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-32-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-32.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSFontSelector.cpp (modified) (3 diffs)
-
Source/WebCore/css/CSSFontSelector.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r283752 r283756 1 2021-10-07 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Shadowing of @font-palette-values rules doesn't work 4 https://bugs.webkit.org/show_bug.cgi?id=231218 5 <rdar://problem/83872258> 6 7 Reviewed by Wenson Hsieh. 8 9 * web-platform-tests/css/css-fonts/font-palette-32-expected.html: Added. 10 * web-platform-tests/css/css-fonts/font-palette-32.html: Added. 11 1 12 2021-10-07 Myles C. Maxfield <mmaxfield@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r283755 r283756 1 2021-10-07 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Shadowing of @font-palette-values rules doesn't work 4 https://bugs.webkit.org/show_bug.cgi?id=231218 5 <rdar://problem/83872258> 6 7 Reviewed by Wenson Hsieh. 8 9 https://drafts.csswg.org/css-fonts-4/#font-palette-values says: 10 > When a given descriptor occurs multiple times in a given @font-palette-values rule, 11 > only the last descriptor declaration is used. 12 13 Test: imported/w3c/web-platform-tests/css/css-fonts/font-palette-32.html 14 15 * css/CSSFontSelector.cpp: 16 (WebCore::CSSFontSelector::buildStarted): 17 (WebCore::CSSFontSelector::addFontPaletteValuesRule): 18 (WebCore::CSSFontSelector::lookupFontPaletteValues): 19 * css/CSSFontSelector.h: 20 1 21 2021-10-07 Alan Bujtas <zalan@apple.com> 2 22 -
trunk/Source/WebCore/css/CSSFontSelector.cpp
r283049 r283756 137 137 } 138 138 139 m_palette FamilyMap.clear();139 m_paletteMap.clear(); 140 140 } 141 141 … … 236 236 AtomString fontFamily = fontPaletteValuesRule.fontFamily().isNull() ? emptyAtom() : fontPaletteValuesRule.fontFamily(); 237 237 AtomString name = fontPaletteValuesRule.name().isNull() ? emptyAtom() : fontPaletteValuesRule.name(); 238 m_paletteFamilyMap.ensure(std::make_pair(fontFamily, name), [&] () { 239 return fontPaletteValuesRule.fontPaletteValues(); 240 }); 238 m_paletteMap.set(std::make_pair(fontFamily, name), fontPaletteValuesRule.fontPaletteValues()); 241 239 242 240 ++m_version; … … 326 324 const AtomString paletteName = fontDescription.fontPalette().identifier; 327 325 328 auto iterator = m_palette FamilyMap.find(std::make_pair(familyName, paletteName));329 if (iterator == m_palette FamilyMap.end())326 auto iterator = m_paletteMap.find(std::make_pair(familyName, paletteName)); 327 if (iterator == m_paletteMap.end()) 330 328 return emptyFontPaletteValues.get(); 331 329 return iterator->value; -
trunk/Source/WebCore/css/CSSFontSelector.h
r282922 r283756 129 129 HashSet<FontSelectorClient*> m_clients; 130 130 131 HashMap<std::pair<AtomString, AtomString>, FontPaletteValues> m_palette FamilyMap;131 HashMap<std::pair<AtomString, AtomString>, FontPaletteValues> m_paletteMap; 132 132 133 133 HashSet<RefPtr<CSSFontFace>> m_cssConnectionsPossiblyToRemove;
Note: See TracChangeset
for help on using the changeset viewer.