Make sure 'font-display: optional' doesn't cause relayout
This patch ensures that an 'optional' web font never causes relayout: - When document rendering starts, any 'optional' web font that hasn't been loaded enters the failure period directly. - When an @font-face rule is added, if document rendering has started and the font is not available from memory cache, then it enters the failure period directly. In this way, any element attempting to use such 'optional' fonts will always use a font that's further down in the 'font-family' list during the document's lifetime. Bug: 1040632 Change-Id: Idde675a8dddadf15d22c13b95db649410fd9cd0e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2057502Reviewed-by:Kunihiko Sakamoto <ksakamoto@chromium.org> Reviewed-by:
Chris Harrelson <chrishtr@chromium.org> Reviewed-by:
Takashi Toyoshima <toyoshim@chromium.org> Reviewed-by:
Rune Lillesveen <futhark@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#749080}
Showing
File added
Please register or sign in to comment