Changeset 283159 in webkit
- Timestamp:
- Sep 27, 2021 11:45:49 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 22 edited
- 2 moved
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2.html (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify.html (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette.html (modified) (3 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html (modified) (13 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html (modified) (14 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Sources.txt (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (4 diffs)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (1 diff)
-
Source/WebCore/css/CSSFontPaletteValuesOverrideColorsValue.cpp (moved) (moved from trunk/Source/WebCore/css/CSSFontPaletteValuesOverrideColorValue.cpp) (1 diff)
-
Source/WebCore/css/CSSFontPaletteValuesOverrideColorsValue.h (moved) (moved from trunk/Source/WebCore/css/CSSFontPaletteValuesOverrideColorValue.h) (3 diffs, 1 prop)
-
Source/WebCore/css/CSSFontPaletteValuesRule.cpp (modified) (2 diffs)
-
Source/WebCore/css/CSSProperties.json (modified) (1 diff)
-
Source/WebCore/css/CSSValue.cpp (modified) (4 diffs)
-
Source/WebCore/css/CSSValue.h (modified) (2 diffs)
-
Source/WebCore/css/StyleRule.cpp (modified) (1 diff)
-
Source/WebCore/css/StyleRule.h (modified) (3 diffs)
-
Source/WebCore/css/parser/CSSParserImpl.cpp (modified) (3 diffs)
-
Source/WebCore/css/parser/CSSPropertyParser.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/FontPaletteValues.h (modified) (4 diffs)
-
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r283154 r283159 1 2021-09-27 Myles C. Maxfield <mmaxfield@apple.com> 2 3 override-color has been renamed to override-colors 4 https://bugs.webkit.org/show_bug.cgi?id=230789 5 <rdar://problem/83529354> 6 7 Reviewed by Devin Rousso. 8 9 This is being upstreamed in https://github.com/web-platform-tests/wpt/pull/30962. 10 11 * web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html: 12 * web-platform-tests/css/css-fonts/font-palette-modify-2.html: 13 * web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html: 14 * web-platform-tests/css/css-fonts/font-palette-modify.html: 15 * web-platform-tests/css/css-fonts/font-palette.html: 16 * web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html: 17 * web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html: 18 1 19 2021-09-27 Myles C. Maxfield <mmaxfield@apple.com> 2 20 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2-expected.html
r283077 r283159 20 20 font-family: "Ahem-COLR"; 21 21 base-palette: 0; 22 override-color : 1 #00FF00;22 override-colors: 1 #00FF00; 23 23 } 24 24 </style> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-2.html
r283077 r283159 21 21 font-family: "Ahem-COLR"; 22 22 base-palette: 0; 23 override-color : 1 #00FF00;23 override-colors: 1 #00FF00; 24 24 } 25 25 </style> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify-expected-mismatch.html
r283077 r283159 20 20 font-family: "Ahem-COLR"; 21 21 base-palette: 0; 22 override-color : 1 #00FF00;22 override-colors: 1 #00FF00; 23 23 } 24 24 </style> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify.html
r283077 r283159 21 21 font-family: "Ahem-COLR"; 22 22 base-palette: 0; 23 override-color : 1 #00FF00;23 override-colors: 1 #00FF00; 24 24 } 25 25 </style> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette.html
r283077 r283159 27 27 font-family: "WebFont"; 28 28 base-palette: 1; 29 override-color : 1 #FFFF00;29 override-colors: 1 #FFFF00; 30 30 } 31 31 … … 33 33 font-family: "WebFont"; 34 34 base-palette: 1; 35 override-color : 0 #00FF00, 1 #000000;35 override-colors: 0 #00FF00, 1 #000000; 36 36 } 37 37 … … 39 39 font-family: "WebFont"; 40 40 base-palette: 1; 41 override-color : 1 #000000, 0 #00FF00;41 override-colors: 1 #000000, 0 #00FF00; 42 42 } 43 43 </style> -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html
r283154 r283159 52 52 /* 7 */ 53 53 @font-palette-values A { 54 override-color : ident #123;54 override-colors: ident #123; 55 55 } 56 56 57 57 /* 8 */ 58 58 @font-palette-values A { 59 override-color : 0 "red";59 override-colors: 0 "red"; 60 60 } 61 61 62 62 /* 9 */ 63 63 @font-palette-values A { 64 override-color : 0 #123, 1;64 override-colors: 0 #123, 1; 65 65 } 66 66 67 67 /* 10 */ 68 68 @font-palette-values A { 69 override-color : ;69 override-colors: ; 70 70 } 71 71 72 72 /* 11 */ 73 73 @font-palette-values A { 74 override-color : 0 #123 1;74 override-colors: 0 #123 1; 75 75 } 76 76 77 77 /* 12 */ 78 78 @font-palette-values A { 79 override-color : 0;79 override-colors: 0; 80 80 } 81 81 … … 88 88 @font-palette-values A { 89 89 base-palette: initial; 90 override-color : initial;90 override-colors: initial; 91 91 } 92 92 … … 94 94 @font-palette-values A { 95 95 base-palette: inherit; 96 override-color : inherit;96 override-colors: inherit; 97 97 } 98 98 … … 100 100 @font-palette-values A { 101 101 base-palette: unset; 102 override-color : unset;102 override-colors: unset; 103 103 } 104 104 </style> … … 177 177 let text = rules[7].cssText; 178 178 let rule = rules[7]; 179 assert_equals(text.indexOf("override-color "), -1);179 assert_equals(text.indexOf("override-colors"), -1); 180 180 assert_equals(rule.size, 0); 181 181 }); … … 184 184 let text = rules[8].cssText; 185 185 let rule = rules[8]; 186 assert_equals(text.indexOf("override-color "), -1);186 assert_equals(text.indexOf("override-colors"), -1); 187 187 assert_equals(rule.size, 0); 188 188 }); … … 191 191 let text = rules[9].cssText; 192 192 let rule = rules[9]; 193 assert_equals(text.indexOf("override-color "), -1);193 assert_equals(text.indexOf("override-colors"), -1); 194 194 assert_equals(rule.size, 0); 195 195 }); … … 198 198 let text = rules[10].cssText; 199 199 let rule = rules[10]; 200 assert_equals(text.indexOf("override-color "), -1);200 assert_equals(text.indexOf("override-colors"), -1); 201 201 assert_equals(rule.size, 0); 202 202 }); … … 205 205 let text = rules[11].cssText; 206 206 let rule = rules[11]; 207 assert_equals(text.indexOf("override-color "), -1);207 assert_equals(text.indexOf("override-colors"), -1); 208 208 assert_equals(rule.size, 0); 209 209 }); … … 212 212 let text = rules[12].cssText; 213 213 let rule = rules[12]; 214 assert_equals(text.indexOf("override-color "), -1);214 assert_equals(text.indexOf("override-colors"), -1); 215 215 assert_equals(rule.size, 0); 216 216 }); … … 227 227 let rule = rules[14]; 228 228 assert_equals(text.indexOf("base-palette"), -1); 229 assert_equals(text.indexOf("override-color "), -1);229 assert_equals(text.indexOf("override-colors"), -1); 230 230 assert_equals(rule.size, 0); 231 231 assert_equals(rule.basePalette, ""); … … 236 236 let rule = rules[15]; 237 237 assert_equals(text.indexOf("base-palette"), -1); 238 assert_equals(text.indexOf("override-color "), -1);238 assert_equals(text.indexOf("override-colors"), -1); 239 239 assert_equals(rule.size, 0); 240 240 assert_equals(rule.basePalette, ""); … … 245 245 let rule = rules[16]; 246 246 assert_equals(text.indexOf("base-palette"), -1); 247 assert_equals(text.indexOf("override-color "), -1);247 assert_equals(text.indexOf("override-colors"), -1); 248 248 assert_equals(rule.size, 0); 249 249 assert_equals(rule.basePalette, ""); -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/parsing/font-palette-values-valid.html
r283140 r283159 25 25 base-palette: "baz"; 26 26 base-palette: 2; 27 override-color : "a" #123;28 override-color : 3 #123;29 override-color : "b" #123;27 override-colors: "a" #123; 28 override-colors: 3 #123; 29 override-colors: "b" #123; 30 30 } 31 31 … … 35 35 base-palette: 1; 36 36 base-palette: "bar"; 37 override-color : 3 #123;38 override-color : "baz" #123;39 override-color : 4 #123;37 override-colors: 3 #123; 38 override-colors: "baz" #123; 39 override-colors: 4 #123; 40 40 } 41 41 42 42 /* 4 */ 43 43 @font-palette-values E { 44 override-color : 3 rgb(17, 34, 51);45 override-color : 3 rgb(68, 85, 102);44 override-colors: 3 rgb(17, 34, 51); 45 override-colors: 3 rgb(68, 85, 102); 46 46 } 47 47 … … 53 53 /* 6 */ 54 54 @font-palette-values G { 55 override-color : 3 rgb(17, 34, 51), 4 rgb(68, 85, 102);55 override-colors: 3 rgb(17, 34, 51), 4 rgb(68, 85, 102); 56 56 } 57 57 58 58 /* 7 */ 59 59 @font-palette-values H { 60 override-color : 3 rgb(17, 34, 51), 3 rgb(68, 85, 102);60 override-colors: 3 rgb(17, 34, 51), 3 rgb(68, 85, 102); 61 61 } 62 62 … … 68 68 /* 9 */ 69 69 @font-palette-values J { 70 override-color : -3 rgb(17, 34, 51);70 override-colors: -3 rgb(17, 34, 51); 71 71 } 72 72 73 73 /* 10 */ 74 74 @font-palette-values K { 75 override-color : 0 #0000FF;75 override-colors: 0 #0000FF; 76 76 } 77 77 78 78 /* 11 */ 79 79 @font-palette-values L { 80 override-color : 0 green;80 override-colors: 0 green; 81 81 } 82 82 83 83 /* 12 */ 84 84 @font-palette-values M { 85 override-color : 0 transparent;85 override-colors: 0 transparent; 86 86 } 87 87 88 88 /* 13 */ 89 89 @font-palette-values N { 90 override-color : 0 rgba(1 2 3 / 4);90 override-colors: 0 rgba(1 2 3 / 4); 91 91 } 92 92 93 93 /* 14 */ 94 94 @font-palette-values O { 95 override-color : 0 lab(29.2345% 39.3825 20.0664);95 override-colors: 0 lab(29.2345% 39.3825 20.0664); 96 96 } 97 97 98 98 /* 15 */ 99 99 @font-palette-values P { 100 override-color : 0 color(display-p3 100% 100% 100%);100 override-colors: 0 color(display-p3 100% 100% 100%); 101 101 } 102 102 </style> … … 113 113 assert_equals(text.indexOf("font-family"), -1); 114 114 assert_equals(text.indexOf("base-palette"), -1); 115 assert_equals(text.indexOf("override-color "), -1);115 assert_equals(text.indexOf("override-colors"), -1); 116 116 }); 117 117 … … 145 145 assert_equals(text.indexOf("base-palette: \"baz\""), -1); 146 146 assert_not_equals(text.indexOf("base-palette: 2;"), -1); 147 assert_equals(text.indexOf("override-color : \"a\""), -1);148 assert_equals(text.indexOf("override-color : 3"), -1);149 assert_not_equals(text.indexOf("override-color : \"b\""), -1);147 assert_equals(text.indexOf("override-colors: \"a\""), -1); 148 assert_equals(text.indexOf("override-colors: 3"), -1); 149 assert_not_equals(text.indexOf("override-colors: \"b\""), -1); 150 150 }); 151 151 … … 163 163 assert_equals(text.indexOf("base-palette: 1"), -1); 164 164 assert_not_equals(text.indexOf("base-palette: \"bar\";"), -1); 165 assert_equals(text.indexOf("override-color : 3"), -1);166 assert_equals(text.indexOf("override-color : \"baz\""), -1);167 assert_not_equals(text.indexOf("override-color : 4"), -1);165 assert_equals(text.indexOf("override-colors: 3"), -1); 166 assert_equals(text.indexOf("override-colors: \"baz\""), -1); 167 assert_not_equals(text.indexOf("override-colors: 4"), -1); 168 168 }); 169 169 … … 256 256 test(function() { 257 257 let text = rules[9].cssText; 258 assert_not_equals(text.indexOf("override-color "), -1);258 assert_not_equals(text.indexOf("override-colors"), -1); 259 259 }); 260 260 … … 271 271 test(function() { 272 272 let text = rules[10].cssText; 273 assert_not_equals(text.indexOf("override-color "), -1);273 assert_not_equals(text.indexOf("override-colors"), -1); 274 274 assert_not_equals(text.indexOf("rgb(0, 0, 255)"), -1); 275 275 }); … … 286 286 test(function() { 287 287 let text = rules[11].cssText; 288 assert_not_equals(text.indexOf("override-color "), -1);288 assert_not_equals(text.indexOf("override-colors"), -1); 289 289 assert_not_equals(text.indexOf("rgb(0, 128, 0)"), -1); 290 290 }); … … 301 301 test(function() { 302 302 let text = rules[12].cssText; 303 assert_not_equals(text.indexOf("override-color "), -1);303 assert_not_equals(text.indexOf("override-colors"), -1); 304 304 assert_not_equals(text.indexOf("rgba(0, 0, 0, 0)"), -1); 305 305 }); … … 316 316 test(function() { 317 317 let text = rules[13].cssText; 318 assert_not_equals(text.indexOf("override-color "), -1);318 assert_not_equals(text.indexOf("override-colors"), -1); 319 319 assert_not_equals(text.indexOf("2"), -1); 320 320 }); … … 331 331 test(function() { 332 332 let text = rules[14].cssText; 333 assert_not_equals(text.indexOf("override-color "), -1);333 assert_not_equals(text.indexOf("override-colors"), -1); 334 334 assert_not_equals(text.indexOf("29"), -1); 335 335 }); … … 346 346 test(function() { 347 347 let text = rules[15].cssText; 348 assert_not_equals(text.indexOf("override-color "), -1);348 assert_not_equals(text.indexOf("override-colors"), -1); 349 349 assert_not_equals(text.indexOf("display-p3"), -1); 350 350 }); -
trunk/Source/WebCore/ChangeLog
r283158 r283159 1 2021-09-27 Myles C. Maxfield <mmaxfield@apple.com> 2 3 override-color has been renamed to override-colors 4 https://bugs.webkit.org/show_bug.cgi?id=230789 5 <rdar://problem/83529354> 6 7 Reviewed by Devin Rousso. 8 9 The spec was changed in 10 https://github.com/w3c/csswg-drafts/commit/9de250d6692d07ddb8af3e3face37b909e5aad7b. 11 No browser has shipped the old name, so this is just a mechanical find/replace. 12 13 Updated existing tests. 14 15 * Sources.txt: 16 * WebCore.xcodeproj/project.pbxproj: 17 * css/CSSComputedStyleDeclaration.cpp: 18 (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): 19 * css/CSSFontPaletteValuesOverrideColorsValue.cpp: Renamed from Source/WebCore/css/CSSFontPaletteValuesOverrideColorValue.cpp. 20 (WebCore::CSSFontPaletteValuesOverrideColorsValue::customCSSText const): 21 (WebCore::CSSFontPaletteValuesOverrideColorsValue::equals const): 22 * css/CSSFontPaletteValuesOverrideColorsValue.h: Renamed from Source/WebCore/css/CSSFontPaletteValuesOverrideColorValue.h. 23 * css/CSSFontPaletteValuesRule.cpp: 24 (WebCore::CSSFontPaletteValuesRule::initializeMapLike): 25 (WebCore::CSSFontPaletteValuesRule::cssText const): 26 * css/CSSProperties.json: 27 * css/CSSValue.cpp: 28 (WebCore::CSSValue::equals const): 29 (WebCore::CSSValue::cssText const): 30 (WebCore::CSSValue::destroy): 31 * css/CSSValue.h: 32 (WebCore::CSSValue::isFontPaletteValuesOverrideColorsValue const): 33 (WebCore::CSSValue::isFontPaletteValuesOverrideColorValue const): Deleted. 34 * css/StyleRule.cpp: 35 (WebCore::StyleRuleFontPaletteValues::StyleRuleFontPaletteValues): 36 * css/StyleRule.h: 37 * css/parser/CSSParserImpl.cpp: 38 (WebCore::CSSParserImpl::consumeFontPaletteValuesRule): 39 * css/parser/CSSPropertyParser.cpp: 40 (WebCore::consumeOverrideColorsDescriptor): 41 (WebCore::CSSPropertyParser::parseFontPaletteValuesDescriptor): 42 (WebCore::consumeOverrideColorDescriptor): Deleted. 43 * platform/graphics/FontPaletteValues.h: 44 (WebCore::FontPaletteValues::FontPaletteValues): 45 (WebCore::FontPaletteValues::overrideColors const): 46 (WebCore::FontPaletteValues::operator== const): 47 (WebCore::add): 48 (WebCore::FontPaletteValues::overrideColor const): Deleted. 49 * platform/graphics/cocoa/FontCacheCoreText.cpp: 50 (WebCore::addAttributesForFontPalettes): 51 1 52 2021-09-27 Antti Koivisto <antti@apple.com> 2 53 -
trunk/Source/WebCore/Sources.txt
r283072 r283159 660 660 css/CSSFontFaceSrcValue.cpp 661 661 css/CSSFontFeatureValue.cpp 662 css/CSSFontPaletteValuesOverrideColor Value.cpp662 css/CSSFontPaletteValuesOverrideColorsValue.cpp 663 663 css/CSSFontPaletteValuesRule.cpp 664 664 css/CSSFontSelector.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r283072 r283159 654 654 1CE8D12726185C0E00FC3AEF /* DisplayListItemBufferIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CE8D12526185BD800FC3AEF /* DisplayListItemBufferIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; 655 655 1CE8D12E261861C400FC3AEF /* DisplayListIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CE8D12C2618616400FC3AEF /* DisplayListIterator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 656 1CEAA53226F336FC00868507 /* CSSFontPaletteValuesOverrideColor Value.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CEAA53126F331C100868507 /* CSSFontPaletteValuesOverrideColorValue.h */; };656 1CEAA53226F336FC00868507 /* CSSFontPaletteValuesOverrideColorsValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CEAA53126F331C100868507 /* CSSFontPaletteValuesOverrideColorsValue.h */; }; 657 657 1CFAE3230A6D6A3F0032593D /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CFAE3220A6D6A3F0032593D /* libobjc.dylib */; }; 658 658 1D0026A42374D62400CA6CDF /* JSPictureInPictureWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D0026A22374D62300CA6CDF /* JSPictureInPictureWindow.h */; }; … … 7036 7036 1CEAA52D26F31A3C00868507 /* CSSFontPaletteValuesRule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSFontPaletteValuesRule.h; sourceTree = "<group>"; }; 7037 7037 1CEAA52F26F31AF800868507 /* CSSFontPaletteValuesRule.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CSSFontPaletteValuesRule.idl; sourceTree = "<group>"; }; 7038 1CEAA53026F331C100868507 /* CSSFontPaletteValuesOverrideColor Value.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontPaletteValuesOverrideColorValue.cpp; sourceTree = "<group>"; };7039 1CEAA53126F331C100868507 /* CSSFontPaletteValuesOverrideColor Value.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSFontPaletteValuesOverrideColorValue.h; sourceTree = "<group>"; };7038 1CEAA53026F331C100868507 /* CSSFontPaletteValuesOverrideColorsValue.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontPaletteValuesOverrideColorsValue.cpp; sourceTree = "<group>"; }; 7039 1CEAA53126F331C100868507 /* CSSFontPaletteValuesOverrideColorsValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSFontPaletteValuesOverrideColorsValue.h; sourceTree = "<group>"; }; 7040 7040 1CF0BFD42298706800ED2074 /* TextSizeAdjustment.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TextSizeAdjustment.cpp; sourceTree = "<group>"; }; 7041 7041 1CF18F3C26BB5AF2004B1722 /* LogInitialization.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogInitialization.cpp; sourceTree = "<group>"; }; … … 29576 29576 4A6E9FC113C17D1D0046A7F8 /* CSSFontFeatureValue.cpp */, 29577 29577 4A6E9FC213C17D1D0046A7F8 /* CSSFontFeatureValue.h */, 29578 1CEAA53026F331C100868507 /* CSSFontPaletteValuesOverrideColor Value.cpp */,29579 1CEAA53126F331C100868507 /* CSSFontPaletteValuesOverrideColor Value.h */,29578 1CEAA53026F331C100868507 /* CSSFontPaletteValuesOverrideColorsValue.cpp */, 29579 1CEAA53126F331C100868507 /* CSSFontPaletteValuesOverrideColorsValue.h */, 29580 29580 1CEAA52C26F31A3C00868507 /* CSSFontPaletteValuesRule.cpp */, 29581 29581 1CEAA52D26F31A3C00868507 /* CSSFontPaletteValuesRule.h */, … … 31957 31957 83520C7E1A71BFCC006BD2AA /* CSSFontFamily.h in Headers */, 31958 31958 4A6E9FC413C17D1D0046A7F8 /* CSSFontFeatureValue.h in Headers */, 31959 1CEAA53226F336FC00868507 /* CSSFontPaletteValuesOverrideColor Value.h in Headers */,31959 1CEAA53226F336FC00868507 /* CSSFontPaletteValuesOverrideColorsValue.h in Headers */, 31960 31960 BC64B4DC0CB4298A005F2B62 /* CSSFontSelector.h in Headers */, 31961 31961 C2E38F021E84573500CA3ADF /* CSSFontStyleRangeValue.h in Headers */, -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r282851 r283159 4074 4074 // Unimplemented @font-palette-values properties 4075 4075 case CSSPropertyBasePalette: 4076 case CSSPropertyOverrideColor :4076 case CSSPropertyOverrideColors: 4077 4077 break; 4078 4078 -
trunk/Source/WebCore/css/CSSFontPaletteValuesOverrideColorsValue.cpp
r283158 r283159 25 25 26 26 #include "config.h" 27 #include "CSSFontPaletteValuesOverrideColor Value.h"27 #include "CSSFontPaletteValuesOverrideColorsValue.h" 28 28 29 29 namespace WebCore { 30 30 31 String CSSFontPaletteValuesOverrideColor Value::customCSSText() const31 String CSSFontPaletteValuesOverrideColorsValue::customCSSText() const 32 32 { 33 33 return makeString(m_key->cssText(), " ", m_color->cssText()); 34 34 } 35 35 36 bool CSSFontPaletteValuesOverrideColor Value::equals(const CSSFontPaletteValuesOverrideColorValue& other) const36 bool CSSFontPaletteValuesOverrideColorsValue::equals(const CSSFontPaletteValuesOverrideColorsValue& other) const 37 37 { 38 38 return m_key->equals(other.key()) && m_color->equals(other.color()); -
trunk/Source/WebCore/css/CSSFontPaletteValuesOverrideColorsValue.h
-
Property
svn:keywords
set to
Author Date Id Rev URL
r283158 r283159 40 40 class ScriptExecutionContext; 41 41 42 class CSSFontPaletteValuesOverrideColor Value final : public CSSValue {42 class CSSFontPaletteValuesOverrideColorsValue final : public CSSValue { 43 43 public: 44 static Ref<CSSFontPaletteValuesOverrideColor Value> create(Ref<CSSPrimitiveValue>&& key, Ref<CSSPrimitiveValue>&& color)44 static Ref<CSSFontPaletteValuesOverrideColorsValue> create(Ref<CSSPrimitiveValue>&& key, Ref<CSSPrimitiveValue>&& color) 45 45 { 46 return adoptRef(*new CSSFontPaletteValuesOverrideColor Value(WTFMove(key), WTFMove(color)));46 return adoptRef(*new CSSFontPaletteValuesOverrideColorsValue(WTFMove(key), WTFMove(color))); 47 47 } 48 48 … … 59 59 String customCSSText() const; 60 60 61 bool equals(const CSSFontPaletteValuesOverrideColor Value&) const;61 bool equals(const CSSFontPaletteValuesOverrideColorsValue&) const; 62 62 63 63 private: 64 CSSFontPaletteValuesOverrideColor Value(Ref<CSSPrimitiveValue>&& key, Ref<CSSPrimitiveValue>&& color)65 : CSSValue(FontPaletteValuesOverrideColor Class)64 CSSFontPaletteValuesOverrideColorsValue(Ref<CSSPrimitiveValue>&& key, Ref<CSSPrimitiveValue>&& color) 65 : CSSValue(FontPaletteValuesOverrideColorsClass) 66 66 , m_key(WTFMove(key)) 67 67 , m_color(WTFMove(color)) … … 75 75 } // namespace WebCore 76 76 77 SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontPaletteValuesOverrideColor Value, isFontPaletteValuesOverrideColorValue())77 SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFontPaletteValuesOverrideColorsValue, isFontPaletteValuesOverrideColorsValue()) -
Property
svn:keywords
set to
-
trunk/Source/WebCore/css/CSSFontPaletteValuesRule.cpp
r283140 r283159 70 70 void CSSFontPaletteValuesRule::initializeMapLike(DOMMapAdapter& map) 71 71 { 72 for (auto& pair : m_fontPaletteValuesRule->overrideColor ()) {72 for (auto& pair : m_fontPaletteValuesRule->overrideColors()) { 73 73 if (!WTF::holds_alternative<int64_t>(pair.first)) 74 74 continue; … … 89 89 builder.append("base-palette: ", serializeString(basePalette.string()), "; "); 90 90 }); 91 if (!m_fontPaletteValuesRule->overrideColor ().isEmpty()) {92 builder.append("override-color :");93 for (size_t i = 0; i < m_fontPaletteValuesRule->overrideColor ().size(); ++i) {91 if (!m_fontPaletteValuesRule->overrideColors().isEmpty()) { 92 builder.append("override-colors:"); 93 for (size_t i = 0; i < m_fontPaletteValuesRule->overrideColors().size(); ++i) { 94 94 if (i) 95 95 builder.append(','); 96 96 builder.append(' '); 97 WTF::switchOn(m_fontPaletteValuesRule->overrideColor ()[i].first, [&](const AtomString& name) {97 WTF::switchOn(m_fontPaletteValuesRule->overrideColors()[i].first, [&](const AtomString& name) { 98 98 builder.append(serializeString(name.string())); 99 99 }, [&](int64_t index) { 100 100 builder.append(index); 101 101 }); 102 builder.append(' ', serializationForCSS(m_fontPaletteValuesRule->overrideColor ()[i].second));102 builder.append(' ', serializationForCSS(m_fontPaletteValuesRule->overrideColors()[i].second)); 103 103 } 104 104 builder.append("; "); -
trunk/Source/WebCore/css/CSSProperties.json
r282851 r283159 4108 4108 } 4109 4109 }, 4110 "override-color ": {4110 "override-colors": { 4111 4111 "codegen-properties": { 4112 4112 "skip-builder": true, -
trunk/Source/WebCore/css/CSSValue.cpp
r282806 r283159 41 41 #include "CSSFontFaceSrcValue.h" 42 42 #include "CSSFontFeatureValue.h" 43 #include "CSSFontPaletteValuesOverrideColor Value.h"43 #include "CSSFontPaletteValuesOverrideColorsValue.h" 44 44 #include "CSSFontStyleRangeValue.h" 45 45 #include "CSSFontStyleValue.h" … … 167 167 case FontFaceSrcClass: 168 168 return compareCSSValues<CSSFontFaceSrcValue>(*this, other); 169 case FontPaletteValuesOverrideColor Class:170 return compareCSSValues<CSSFontPaletteValuesOverrideColor Value>(*this, other);169 case FontPaletteValuesOverrideColorsClass: 170 return compareCSSValues<CSSFontPaletteValuesOverrideColorsValue>(*this, other); 171 171 case FontFeatureClass: 172 172 return compareCSSValues<CSSFontFeatureValue>(*this, other); … … 269 269 case FontFaceSrcClass: 270 270 return downcast<CSSFontFaceSrcValue>(*this).customCSSText(); 271 case FontPaletteValuesOverrideColor Class:272 return downcast<CSSFontPaletteValuesOverrideColor Value>(*this).customCSSText();271 case FontPaletteValuesOverrideColorsClass: 272 return downcast<CSSFontPaletteValuesOverrideColorsValue>(*this).customCSSText(); 273 273 case FontFeatureClass: 274 274 return downcast<CSSFontFeatureValue>(*this).customCSSText(); … … 384 384 delete downcast<CSSFontFaceSrcValue>(this); 385 385 return; 386 case FontPaletteValuesOverrideColor Class:387 delete downcast<CSSFontPaletteValuesOverrideColor Value>(this);386 case FontPaletteValuesOverrideColorsClass: 387 delete downcast<CSSFontPaletteValuesOverrideColorsValue>(this); 388 388 return; 389 389 case FontFeatureClass: -
trunk/Source/WebCore/css/CSSValue.h
r282806 r283159 98 98 bool isFontVariationValue() const { return m_classType == FontVariationClass; } 99 99 bool isFontFaceSrcValue() const { return m_classType == FontFaceSrcClass; } 100 bool isFontPaletteValuesOverrideColor Value() const { return m_classType == FontPaletteValuesOverrideColorClass; }100 bool isFontPaletteValuesOverrideColorsValue() const { return m_classType == FontPaletteValuesOverrideColorsClass; } 101 101 bool isFontValue() const { return m_classType == FontClass; } 102 102 bool isFontStyleValue() const { return m_classType == FontStyleClass; } … … 189 189 FontStyleRangeClass, 190 190 FontFaceSrcClass, 191 FontPaletteValuesOverrideColor Class,191 FontPaletteValuesOverrideColorsClass, 192 192 FunctionClass, 193 193 -
trunk/Source/WebCore/css/StyleRule.cpp
r283120 r283159 329 329 } 330 330 331 StyleRuleFontPaletteValues::StyleRuleFontPaletteValues(const AtomString& name, const AtomString& fontFamily, const FontPaletteValues::PaletteIndex& basePalette, Vector<FontPaletteValues::OverriddenColor>&& overrideColor )331 StyleRuleFontPaletteValues::StyleRuleFontPaletteValues(const AtomString& name, const AtomString& fontFamily, const FontPaletteValues::PaletteIndex& basePalette, Vector<FontPaletteValues::OverriddenColor>&& overrideColors) 332 332 : StyleRuleBase(StyleRuleType::FontPaletteValues) 333 333 , m_name(name) 334 334 , m_fontFamily(fontFamily) 335 , m_fontPaletteValues(basePalette, WTFMove(overrideColor ))335 , m_fontPaletteValues(basePalette, WTFMove(overrideColors)) 336 336 { 337 337 } -
trunk/Source/WebCore/css/StyleRule.h
r283120 r283159 160 160 class StyleRuleFontPaletteValues final : public StyleRuleBase { 161 161 public: 162 static Ref<StyleRuleFontPaletteValues> create(const AtomString& name, const AtomString& fontFamily, const FontPaletteValues::PaletteIndex& basePalette, Vector<FontPaletteValues::OverriddenColor>&& overrideColor ) { return adoptRef(*new StyleRuleFontPaletteValues(name, fontFamily, basePalette, WTFMove(overrideColor))); }162 static Ref<StyleRuleFontPaletteValues> create(const AtomString& name, const AtomString& fontFamily, const FontPaletteValues::PaletteIndex& basePalette, Vector<FontPaletteValues::OverriddenColor>&& overrideColors) { return adoptRef(*new StyleRuleFontPaletteValues(name, fontFamily, basePalette, WTFMove(overrideColors))); } 163 163 164 164 ~StyleRuleFontPaletteValues(); … … 184 184 } 185 185 186 const Vector<FontPaletteValues::OverriddenColor>& overrideColor () const186 const Vector<FontPaletteValues::OverriddenColor>& overrideColors() const 187 187 { 188 return m_fontPaletteValues.overrideColor ();188 return m_fontPaletteValues.overrideColors(); 189 189 } 190 190 … … 192 192 193 193 private: 194 StyleRuleFontPaletteValues(const AtomString& name, const AtomString& fontFamily, const FontPaletteValues::PaletteIndex& basePalette, Vector<FontPaletteValues::OverriddenColor>&& overrideColor );194 StyleRuleFontPaletteValues(const AtomString& name, const AtomString& fontFamily, const FontPaletteValues::PaletteIndex& basePalette, Vector<FontPaletteValues::OverriddenColor>&& overrideColors); 195 195 StyleRuleFontPaletteValues(const StyleRuleFontPaletteValues&); 196 196 -
trunk/Source/WebCore/css/parser/CSSParserImpl.cpp
r283120 r283159 36 36 #include "CSSDeferredParser.h" 37 37 #include "CSSFontFamily.h" 38 #include "CSSFontPaletteValuesOverrideColor Value.h"38 #include "CSSFontPaletteValuesOverrideColorsValue.h" 39 39 #include "CSSKeyframeRule.h" 40 40 #include "CSSKeyframesRule.h" … … 690 690 } 691 691 692 Vector<FontPaletteValues::OverriddenColor> overrideColor ;693 if (auto overrideColor Value = properties->getPropertyCSSValue(CSSPropertyOverrideColor)) {694 const auto& list = downcast<CSSValueList>(*overrideColor Value);692 Vector<FontPaletteValues::OverriddenColor> overrideColors; 693 if (auto overrideColorsValue = properties->getPropertyCSSValue(CSSPropertyOverrideColors)) { 694 const auto& list = downcast<CSSValueList>(*overrideColorsValue); 695 695 for (const auto& item : list) { 696 696 FontPaletteValues::PaletteColorIndex key(nullAtom()); 697 const auto& pair = downcast<CSSFontPaletteValuesOverrideColor Value>(item.get());697 const auto& pair = downcast<CSSFontPaletteValuesOverrideColorsValue>(item.get()); 698 698 if (pair.key().isString()) 699 699 key = pair.key().stringValue(); … … 703 703 continue; 704 704 Color color = pair.color().isRGBColor() ? pair.color().color() : StyleColor::colorFromKeyword(pair.color().valueID(), { }); 705 overrideColor .append(std::make_pair(key, color));706 } 707 } 708 709 return StyleRuleFontPaletteValues::create(name->stringValue(), fontFamily, basePalette, WTFMove(overrideColor ));705 overrideColors.append(std::make_pair(key, color)); 706 } 707 } 708 709 return StyleRuleFontPaletteValues::create(name->stringValue(), fontFamily, basePalette, WTFMove(overrideColors)); 710 710 } 711 711 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r282851 r283159 39 39 #include "CSSFontFaceSrcValue.h" 40 40 #include "CSSFontFeatureValue.h" 41 #include "CSSFontPaletteValuesOverrideColor Value.h"41 #include "CSSFontPaletteValuesOverrideColorsValue.h" 42 42 #if ENABLE(VARIATION_FONTS) 43 43 #include "CSSFontVariationValue.h" … … 4854 4854 } 4855 4855 4856 static RefPtr<CSSValueList> consumeOverrideColor Descriptor(CSSParserTokenRange& range, const CSSParserContext& context)4856 static RefPtr<CSSValueList> consumeOverrideColorsDescriptor(CSSParserTokenRange& range, const CSSParserContext& context) 4857 4857 { 4858 4858 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); … … 4870 4870 return nullptr; 4871 4871 4872 RefPtr<CSSValue> value = CSSFontPaletteValuesOverrideColor Value::create(key.releaseNonNull(), color.releaseNonNull());4872 RefPtr<CSSValue> value = CSSFontPaletteValuesOverrideColorsValue::create(key.releaseNonNull(), color.releaseNonNull()); 4873 4873 list->append(value.releaseNonNull()); 4874 4874 } while (consumeCommaIncludingWhitespace(range)); … … 4890 4890 parsedValue = consumeBasePaletteDescriptor(m_range); 4891 4891 break; 4892 case CSSPropertyOverrideColor :4893 parsedValue = consumeOverrideColor Descriptor(m_range, m_context);4892 case CSSPropertyOverrideColors: 4893 parsedValue = consumeOverrideColorsDescriptor(m_range, m_context); 4894 4894 break; 4895 4895 default: -
trunk/Source/WebCore/platform/graphics/FontPaletteValues.h
r283031 r283159 43 43 FontPaletteValues() = default; 44 44 45 FontPaletteValues(const PaletteIndex& basePalette, Vector<OverriddenColor>&& overrideColor )45 FontPaletteValues(const PaletteIndex& basePalette, Vector<OverriddenColor>&& overrideColors) 46 46 : m_basePalette(basePalette) 47 , m_overrideColor (WTFMove(overrideColor))47 , m_overrideColors(WTFMove(overrideColors)) 48 48 { 49 49 } … … 54 54 } 55 55 56 const Vector<OverriddenColor>& overrideColor () const56 const Vector<OverriddenColor>& overrideColors() const 57 57 { 58 return m_overrideColor ;58 return m_overrideColors; 59 59 } 60 60 61 61 bool operator==(const FontPaletteValues& other) const 62 62 { 63 return m_basePalette == other.m_basePalette && m_overrideColor == other.m_overrideColor;63 return m_basePalette == other.m_basePalette && m_overrideColors == other.m_overrideColors; 64 64 } 65 65 … … 71 71 private: 72 72 PaletteIndex m_basePalette; 73 Vector<OverriddenColor> m_overrideColor ;73 Vector<OverriddenColor> m_overrideColors; 74 74 }; 75 75 … … 77 77 { 78 78 add(hasher, fontPaletteValues.basePalette()); 79 add(hasher, fontPaletteValues.overrideColor ());79 add(hasher, fontPaletteValues.overrideColors()); 80 80 } 81 81 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
r282922 r283159 471 471 // This is unimplementable in Core Text. 472 472 }); 473 if (!fontPaletteValues.overrideColor ().isEmpty()) {473 if (!fontPaletteValues.overrideColors().isEmpty()) { 474 474 auto overrideDictionary = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); 475 for (const auto& pair : fontPaletteValues.overrideColor ()) {475 for (const auto& pair : fontPaletteValues.overrideColors()) { 476 476 const auto& paletteColorIndex = pair.first; 477 477 const auto& color = pair.second;
Note: See TracChangeset
for help on using the changeset viewer.