Skip to content

Commit

Permalink
Revert "FontAccess: Sort fonts in lexicographical order"
Browse files Browse the repository at this point in the history
This reverts commit 404b7cc426e259c11276d673630c9f094628259f.

Reason for revert: Breaks tests on Win 7 Builder: https://ci.chromium.org/p/chromium/builders/ci/Win7%20Tests%20%281%29/108048

Original change's description:
> FontAccess: Sort fonts in lexicographical order
>
> This change ensures fonts are sorted before being cached. This change is
> due to a concern about fingerprinting:
> w3ctag/design-reviews#399 (comment)
>
> This change ensures that fonts are sorted in lexicographical order.
>
> Bug: 1043306
> Change-Id: Ia3acf2a45cb473124df4e489683bdc7bac15dde4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427040
> Commit-Queue: Olivier Yiptong <[email protected]>
> Reviewed-by: Joshua Bell <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#810519}

[email protected],[email protected]

Change-Id: I75926b99ebb7e663875e0eae3d89d877f623a6ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1043306
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431025
Reviewed-by: Jan Wilken Dörrie <[email protected]>
Commit-Queue: Jan Wilken Dörrie <[email protected]>
Cr-Commit-Position: refs/heads/master@{#810547}
GitOrigin-RevId: 1117bd9f0c2c79301ea57956b1cba8bd34d8dc1e
  • Loading branch information
jdoerrie authored and copybara-github committed Sep 25, 2020
1 parent 1c61674 commit 73dee94
Showing 1 changed file with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,3 @@ font_access_test(async t => {

assert_fonts_exist(availableFonts, getEnumerationTestSet());
}, 'query(): standard fonts returned');

font_access_test(async t => {
const iterator = navigator.fonts.query();

if (!isPlatformSupported()) {
await promise_rejects_dom(t, 'NotSupportedError', (async () => {
for await (const f of iterator) {
}
})());
return;
}

// The following tests that fonts are sorted. Postscript names are expected to
// be encoded in a subset of the ASCII character set.
// See: https://docs.microsoft.com/en-us/typography/opentype/spec/name
// Should the Postscript name contain characters that are multi-byte, this
// test may erroneously fail.
let previousFont = null;
for await (const font of iterator) {
if (previousFont) {
assert_true(
previousFont.postscriptName < font.postscriptName,
'fonts are sorted');
}

previousFont = font;
}
}, 'query(): fonts are sorted');

0 comments on commit 73dee94

Please sign in to comment.