Avoid looking up empty font name in FontFaceCache
When document.fonts.load() is called with font specification such as '1px ""' (containing two quotes) as the argument, CSS font property parsing parses this successfully as the empty string. FontFaceCache was not prepared to handle that correctly. Fix FontFaceCache to guard against that. Add test to actually ensure that this font specification's load promise resolves successfully. In parallel, raised https://github.com/w3c/csswg-drafts/issues/4510 in CSS WG to discuss whether it would make sense to reject such a font specification at the parsing stage already. Bug: 1023206 Change-Id: If46aef0c7fcd2e06bc657480b9189857438d8cc1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1914392Reviewed-by:Rune Lillesveen <futhark@chromium.org> Reviewed-by:
Koji Ishii <kojii@chromium.org> Commit-Queue: Dominik Röttsches <drott@chromium.org> Cr-Commit-Position: refs/heads/master@{#715261}
Showing
Please register or sign in to comment