-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 271213@main (b1f4d81). https://bugs.webkit.org/show_bug.c…
…gi?id=265000 FontFace with data: URI crashes Worker https://bugs.webkit.org/show_bug.cgi?id=265000 rdar://118546120 Reviewed by Alex Christensen. Make sure to reject the promise when font loading fails in a worker. Align implementation with spec on data URL font loading by allowing them. * LayoutTests/http/wpt/workers/font-loading-error.any-expected.txt: Added. * LayoutTests/http/wpt/workers/font-loading-error.any.html: Added. * LayoutTests/http/wpt/workers/font-loading-error.any.js: Added. (promise_test.async return): (promise_test): * LayoutTests/http/wpt/workers/font-loading-error.any.worker-expected.txt: Added. * LayoutTests/http/wpt/workers/font-loading-error.any.worker.html: Added. * Source/WebCore/dom/DocumentFontLoader.cpp: (WebCore::DocumentFontLoader::cachedFont): * Source/WebCore/workers/WorkerFontLoadRequest.cpp: (WebCore::WorkerFontLoadRequest::load): (WebCore::WorkerFontLoadRequest::didFail): Canonical link: https://commits.webkit.org/271213@main
- Loading branch information
Showing
7 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
LayoutTests/http/wpt/workers/font-loading-error.any-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
PASS Data URL should not trigger CORS errors and if failing should reject the promise. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- This file is required for WebKit test infrastructure to run the templated test --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
promise_test(async () => { | ||
return new FontFace("ABC", "url(data:font/woff2,abcd) format('woff2')").load().catch(e => { | ||
assert_equals(e.name, "NetworkError"); | ||
}); | ||
}, "Data URL should not trigger CORS errors and if failing should reject the promise."); |
3 changes: 3 additions & 0 deletions
3
LayoutTests/http/wpt/workers/font-loading-error.any.worker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
PASS Data URL should not trigger CORS errors and if failing should reject the promise. | ||
|
1 change: 1 addition & 0 deletions
1
LayoutTests/http/wpt/workers/font-loading-error.any.worker.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- This file is required for WebKit test infrastructure to run the templated test --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters