Bug 205901 - Fix specification violation in Font Loading API
Summary: Fix specification violation in Font Loading API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-07 19:46 PST by Myles C. Maxfield
Modified: 2020-01-08 13:28 PST (History)
9 users (show)

See Also:


Attachments
Patch (12.87 KB, patch)
2020-01-07 19:48 PST, Myles C. Maxfield
bfulgham: review+
Details | Formatted Diff | Diff
Patch for committing (12.97 KB, patch)
2020-01-08 12:19 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2020-01-07 19:46:20 PST
Supplying CSS global keywords to the Font Loading API can cause crashes
Comment 1 Myles C. Maxfield 2020-01-07 19:48:04 PST
Created attachment 387062 [details]
Patch
Comment 2 Myles C. Maxfield 2020-01-07 19:48:33 PST
<rdar://problem/58083743>
Comment 3 Brent Fulgham 2020-01-08 12:14:15 PST
Comment on attachment 387062 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=387062&action=review

> Source/WebCore/ChangeLog:3
> +        Supplying CSS global keywords to the Font Loading API can cause crashes

Suggest changing the title to something like:

"Fix specification violation in Font Loading API"

> Source/WebCore/ChangeLog:9
> +        Simply add a check. The spec says:

Then say: "Our Font Loading API does not comply with the spec: <<< spec language >>>"

"Rather than crashing, we should return a syntax error."

> LayoutTests/fast/text/font-loading-global-keyword-expected.txt:1
> +This test passes if there is no crash.

I don't think this is true. The test passes if we get the expected syntax errors. No need to say something about a crash (all of our tests are expected to pass without crashing!)

> LayoutTests/fast/text/font-loading-global-keyword.html:8
> +description("This test passes if there is no crash.");

description("This test ensure that global CSS keywords generate expected syntax errors.");
Comment 4 Myles C. Maxfield 2020-01-08 12:19:22 PST
Created attachment 387128 [details]
Patch for committing
Comment 5 WebKit Commit Bot 2020-01-08 13:26:09 PST
Comment on attachment 387128 [details]
Patch for committing

Clearing flags on attachment: 387128

Committed r254220: <https://trac.webkit.org/changeset/254220>