Bug 196381 - font-family descriptor allows a list of values
Summary: font-family descriptor allows a list of values
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-28 17:12 PDT by Myles C. Maxfield
Modified: 2019-03-30 23:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch (15.89 KB, patch)
2019-03-28 19:35 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (15.85 KB, patch)
2019-03-29 11:22 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (18.46 KB, patch)
2019-03-29 11:44 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (19.37 KB, patch)
2019-03-29 12:17 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (2.18 MB, application/zip)
2019-03-29 12:46 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.74 MB, application/zip)
2019-03-29 13:26 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews115 for mac-highsierra (1.54 MB, application/zip)
2019-03-29 13:40 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.93 MB, application/zip)
2019-03-29 13:54 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews202 for win-future (12.24 MB, application/zip)
2019-03-29 17:07 PDT, EWS Watchlist
no flags Details
WIP (23.12 KB, patch)
2019-03-29 18:13 PDT, Myles C. Maxfield
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (2.61 MB, application/zip)
2019-03-29 19:13 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (3.50 MB, application/zip)
2019-03-29 19:20 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews115 for mac-highsierra (2.62 MB, application/zip)
2019-03-29 19:49 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews200 for win-future (12.86 MB, application/zip)
2019-03-29 20:20 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (3.23 MB, application/zip)
2019-03-29 22:20 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2019-03-28 17:12:11 PDT
The syntax is just <family-name>
Comment 1 Myles C. Maxfield 2019-03-28 19:35:06 PDT
Created attachment 366235 [details]
Patch
Comment 2 Myles C. Maxfield 2019-03-29 11:22:43 PDT
Created attachment 366284 [details]
Patch
Comment 3 EWS Watchlist 2019-03-29 11:25:20 PDT
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.
Comment 4 Myles C. Maxfield 2019-03-29 11:44:53 PDT
Created attachment 366287 [details]
Patch
Comment 5 Myles C. Maxfield 2019-03-29 12:17:01 PDT
Created attachment 366292 [details]
Patch
Comment 6 EWS Watchlist 2019-03-29 12:46:08 PDT
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.
Comment 7 EWS Watchlist 2019-03-29 12:46:09 PDT
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 8 EWS Watchlist 2019-03-29 13:26:13 PDT
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.
Comment 9 EWS Watchlist 2019-03-29 13:26:16 PDT
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 10 EWS Watchlist 2019-03-29 13:40:36 PDT
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.
Comment 11 EWS Watchlist 2019-03-29 13:40:38 PDT
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 12 EWS Watchlist 2019-03-29 13:54:44 PDT
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.
Comment 13 EWS Watchlist 2019-03-29 13:54:46 PDT
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 14 EWS Watchlist 2019-03-29 17:06:52 PDT
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.
Comment 15 EWS Watchlist 2019-03-29 17:07:04 PDT
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
Comment 16 Myles C. Maxfield 2019-03-29 17:16:04 PDT
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.
Comment 17 Myles C. Maxfield 2019-03-29 17:39:24 PDT
(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).
Comment 18 Myles C. Maxfield 2019-03-29 18:13:43 PDT
Created attachment 366338 [details]
WIP
Comment 19 Myles C. Maxfield 2019-03-29 18:30:16 PDT
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.
Comment 20 Myles C. Maxfield 2019-03-29 18:47:55 PDT
The parser has a CSSParserContext which owns a CSSParserMode.
Comment 21 Myles C. Maxfield 2019-03-29 18:48:14 PDT
And the context is created before the parser is created, and passed in to the constructor.
Comment 22 EWS Watchlist 2019-03-29 19:13:05 PDT
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
Comment 23 EWS Watchlist 2019-03-29 19:13:06 PDT
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 24 EWS Watchlist 2019-03-29 19:20:39 PDT
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
Comment 25 EWS Watchlist 2019-03-29 19:20:41 PDT
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 26 EWS Watchlist 2019-03-29 19:49:13 PDT
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
Comment 27 EWS Watchlist 2019-03-29 19:49:14 PDT
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 28 EWS Watchlist 2019-03-29 20:19:52 PDT
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
Comment 29 EWS Watchlist 2019-03-29 20:20:05 PDT
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 30 EWS Watchlist 2019-03-29 22:20:51 PDT
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
Comment 31 EWS Watchlist 2019-03-29 22:20:53 PDT
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
Comment 32 Myles C. Maxfield 2019-03-30 23:25:26 PDT
CSSParserImpl::consumeFontFaceRule() is the place that supplies the CSSParserMode into the StyleProperties (and then wraps a StyleRuleFontFace around it).
Comment 33 Myles C. Maxfield 2019-03-30 23:31:18 PDT
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.
Comment 34 Myles C. Maxfield 2019-03-30 23:34:02 PDT
CSSPropertyParser::parseValue() in CSSPropertyParser.cpp is a static function that lets you set StyleRule::FontFace for the StyleRule::Type.
Comment 35 Myles C. Maxfield 2019-03-30 23:39:54 PDT
MutableStyleProperties::setProperty() calls CSSParser::parseValue() with the parser context that uses the mode from the style properties