Bug 235656
| Summary: | Blocked link to font source does not emit error event | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Patrick Griffis <pgriffis> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | achristensen, bfulgham, mmaxfield, rreno, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 246663 | ||
| Bug Blocks: | |||
Patrick Griffis
There are a couple of WPT tests that rely on the onerror handler being called when a font source is blocked by CSP.
They can be seen here: https://wpt.fyi/results/content-security-policy/font-src?label=master&label=experimental&product=safari&product=webkitgtk
But a snippet is:
var link = document.createElement('link');
link.rel="preload";
link.as="font";
link.href="http://{{hosts[alt][]}}:{{ports[http][0]}}/fonts/Ahem.ttf?font-none-blocked";
link.onload = t.unreached_func("Should not have loaded the font.");
link.onerror = t.step_func_done();
document.getElementsByTagName('head')[0].appendChild(link);
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/88389961>
Ryan Reno
This was fixed by https://bugs.webkit.org/show_bug.cgi?id=246663