The syntax is just <family-name>
Created attachment 366235 [details] Patch
Created attachment 366284 [details] Patch
Attachment 366284 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 366287 [details] Patch
Created attachment 366292 [details] Patch
Comment on attachment 366292 [details] Patch Attachment 366292 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11704728 Number of test failures exceeded the failure limit.
Created attachment 366299 [details] Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 366292 [details] Patch Attachment 366292 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11705108 Number of test failures exceeded the failure limit.
Created attachment 366302 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 366292 [details] Patch Attachment 366292 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11705117 Number of test failures exceeded the failure limit.
Created attachment 366304 [details] Archive of layout-test-results from ews115 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 366292 [details] Patch Attachment 366292 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11705120 Number of test failures exceeded the failure limit.
Created attachment 366306 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 366292 [details] Patch Attachment 366292 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/11707234 Number of test failures exceeded the failure limit.
Created attachment 366330 [details] Archive of layout-test-results from ews202 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews202 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Looks like (one of the reasons) this is difficult is sheet.cssRules[0].style.setProperty("font-family", name) and sheet.cssRules[0].stylefontFamily = name. The CSSStyleDeclaration needs to know to parse the string as a declaration, not as a property.
(In reply to Myles C. Maxfield from comment #16) > Looks like (one of the reasons) this is difficult is > sheet.cssRules[0].style.setProperty("font-family", name) and > sheet.cssRules[0].stylefontFamily = name. The CSSStyleDeclaration needs to > know to parse the string as a declaration, not as a property. SVG does this too by SVGFontFaceElement::parseAttribute() calling properties.setProperty(propertyId, value).
Created attachment 366338 [details] WIP
Simon says we should educate the parser about the difference between @font-face descriptors and properties of the same name by adding a new value to the CSSParserMode enum.
The parser has a CSSParserContext which owns a CSSParserMode.
And the context is created before the parser is created, and passed in to the constructor.
Comment on attachment 366338 [details] WIP Attachment 366338 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11709009 New failing tests: fast/text/fontface-rebuild-during-loading-2.html fast/text/font-face-set-cssom.html
Created attachment 366341 [details] Archive of layout-test-results from ews101 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 366338 [details] WIP Attachment 366338 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11708998 New failing tests: fast/text/fontface-rebuild-during-loading-2.html fast/text/font-face-set-cssom.html
Created attachment 366342 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 366338 [details] WIP Attachment 366338 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11709045 New failing tests: fast/text/fontface-rebuild-during-loading-2.html fast/text/font-face-set-cssom.html
Created attachment 366345 [details] Archive of layout-test-results from ews115 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 366338 [details] WIP Attachment 366338 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/11709300 New failing tests: fast/text/fontface-rebuild-during-loading-2.html fast/text/font-face-set-cssom.html
Created attachment 366347 [details] Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment on attachment 366338 [details] WIP Attachment 366338 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11709887 New failing tests: fast/text/fontface-rebuild-during-loading-2.html fast/text/font-face-set-cssom.html
Created attachment 366356 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
CSSParserImpl::consumeFontFaceRule() is the place that supplies the CSSParserMode into the StyleProperties (and then wraps a StyleRuleFontFace around it).
StyleRuleFontFace is the internal class that represents an @font-face rule. It owns a StyleProperties object. StyleRuleFontFace's JS wrapper is CSSFontFaceRule. StyleProperties's JS wrapper is StyleRuleCSSStyleDeclaration.
CSSPropertyParser::parseValue() in CSSPropertyParser.cpp is a static function that lets you set StyleRule::FontFace for the StyleRule::Type.
MutableStyleProperties::setProperty() calls CSSParser::parseValue() with the parser context that uses the mode from the style properties