servo/tests/wpt/mozilla/meta/css
Jon Leighton 691c6c6f1a Implement font fallback
Prior to this change, if none of the fonts specified in CSS contained a
glyph for a codepoint, we tried only one fallback font. If that font
didn't contain the glyph, we'd give up.

With this change, we try multiple fonts in turn. The font names we try
differ across each platform, and based on the codepoint we're trying to
match. The current implementation is heavily inspired by the analogous
code in Gecko, but I've used to ucd lib to make it more readable,
whereas Gecko matches raw unicode ranges.

This fixes some of the issues reported in #17267, although colour emoji
support is not implemented.

== Notes on changes to WPT metadata ==

=== css/css-text/i18n/css3-text-line-break-opclns-* ===

A bunch of these have started failing on macos when they previously
passed.

These tests check that the browser automatically inserts line breaks
near certain characters that are classified as "opening and closing
punctuation". The idea is that if we have e.g. an opening parenthesis,
it does not make sense for it to appear at the end of a line box; it
should "stick" to the next character and go into the next line box.

Before this change, a lot of these codepoints rendered as a missing
glyph on Mac and Linux. In some cases, that meant that the test was
passing.

After this change, a bunch of these codepoints are now rendering glyphs
on Mac (but not Linux). In some cases, the test should continue to pass
where it previously did when rendering with the missing glyph.

However, it seems this has also exposed a layout bug. The "ref" div in
these tests contains a <br> element, and it seems that this, combined
with these punctuation characters, makes the spacing between glyphs ever
so slightly different to the "test" div. (Speculation: might be
something to do with shaping?)

Therefore I've had to mark a bunch of these tests failing on mac.

=== css/css-text/i18n/css3-text-line-break-baspglwj-* ===

Some of these previously passed on Mac due to a missing glyph. Now that
we're rendering the correct glyph, they are failing.

=== css/css-text/word-break/word-break-normal-bo-000.html ===

The characters now render correctly on Mac, and the test is passing. But
we do not find a suitable fallback font on Linux, so it is still failing
on that platform.

=== css/css-text/word-break/word-break-break-all-007.html ===

This was previously passing on Mac, but only because missing character
glyphs were rendered. Now that a fallback font is able to be found, it
(correctly) fails.

=== mozilla/tests/css/font_fallback_* ===

These are new tests added in this commit. 01 and 02 are marked failing
on Linux because the builders don't have the appropriate fonts installed
(that will be a follow-up).

Fix build errors from rebase

FontTemplateDescriptor can no longer just derive(Hash). We need to
implement it on each component part, because the components now
generally wrap floats, which do not impl Hash because of NaN. However in
this case we know that we won't have a NaN, so it is safe to manually
impl Hash.
2018-05-19 14:33:36 +10:00
..
animations Disable /_mozilla/css/animations/transition-raf.html.ini 2017-08-21 19:07:51 +02:00
css-position-3 script: Fix code generation for named getters. 2017-09-17 18:42:23 +02:00
iframe Update web-platform-tests to revision 3589b85af366d5c53bf03cfeb5e0ccb3ac2a38e9 2018-04-01 23:17:45 -04:00
__dir__.ini Test for flexbox crasher 2015-09-07 09:02:53 +02:00
abs-overflow-stackingcontext.html.ini Vindictively disable all intermittent tests that failed #9787 2016-02-29 20:07:07 +01:00
acid2-wrapper.html.ini Move acid2.html to wpt reftests. 2016-01-14 09:49:41 +01:00
acid2_noscroll.html.ini Add OSMesa headless mode, run WPT against Webrender, update tests. 2016-09-28 11:57:33 +10:00
acid2_ref.html.ini Move acid2.html to wpt reftests. 2016-01-14 09:49:41 +01:00
border-image-linear-gradient.html.ini Update web-platform-tests to revision 3678c44dfe811f93a796285e9531ee34d7d15682 2018-02-27 22:03:50 -05:00
border_black_ridge_a.html.ini Add OSMesa headless mode, run WPT against Webrender, update tests. 2016-09-28 11:57:33 +10:00
border_black_ridge_b.html.ini Update WR (opaque rect optimization, stacking context culling). 2017-03-27 06:14:34 +10:00
border_radius_elliptical_a.html.ini Update web-platform-tests to revision 28300a0874230d668f0b02cfddfd994f2a735a56 2018-03-12 23:08:35 -04:00
borders_a.html.ini Add OSMesa headless mode, run WPT against Webrender, update tests. 2016-09-28 11:57:33 +10:00
canvas_linear_gradient_a.html.ini Add OSMesa headless mode, run WPT against Webrender, update tests. 2016-09-28 11:57:33 +10:00
direction_style_caching.html.ini Add test for #11818 2016-08-13 16:48:54 -07:00
dirty_viewport.html.ini Disable some intermittently failing tests. 2016-11-21 10:14:45 +01:00
filter_sepia_a.html.ini Add OSMesa headless mode, run WPT against Webrender, update tests. 2016-09-28 11:57:33 +10:00
font_fallback_01.html.ini Implement font fallback 2018-05-19 14:33:36 +10:00
font_fallback_02.html.ini Implement font fallback 2018-05-19 14:33:36 +10:00
hide_after_create.html.ini Add OSMesa headless mode, run WPT against Webrender, update tests. 2016-09-28 11:57:33 +10:00
incremental_trailing_whitespace_a.html.ini Disable incremental_trailing_whitespace_a.html. 2016-11-20 01:09:33 +01:00
inline_block_opacity_change.html.ini Disable inline_block_opacity_change.html (intermittent #13360) 2016-11-16 11:52:17 -08:00
jumpiness_a.html.ini Disable some intermittents 2016-02-22 06:07:13 -05:00
line_break_nowrap.html.ini Update web-platform-tests to revision 0fe9f012a8ee5503b728a379705a6c5286ba1e96 2018-02-23 21:56:20 -05:00
matchMedia.html.ini Make non-initial about:blank loads asynchronous 2017-05-12 11:53:43 -06:00
meta_viewport_resize.html.ini Update web-platform-tests to 5582e4d2bfcfd1fa9f105406b143170ee2af7db1 2016-04-01 13:38:57 +02:00
mix_blend_mode_a.html.ini Vindictively disable all intermittent tests that failed #9787 2016-02-29 20:07:07 +01:00
pixel_snapping_glyphs.html.ini webrender: Don't use OpenGL round() for snapping pixels 2016-06-29 17:55:31 -07:00
position_relative_stacking_context_contents_a.html.ini Vindictively disable all intermittent tests that failed #9787 2016-02-29 20:07:07 +01:00
position_relative_vertical_percentage_overflow_a.html.ini Vindictively disable all intermittent tests that failed #9787 2016-02-29 20:07:07 +01:00
stacking_context_overflow_a.html.ini Disable some intermittents 2016-02-22 06:07:13 -05:00
text_shadow_blur_a.html.ini Update web-platform-tests to revision 28300a0874230d668f0b02cfddfd994f2a735a56 2018-03-12 23:08:35 -04:00
transition_calc_implicit.html.ini Update web-platform-tests to revision 28300a0874230d668f0b02cfddfd994f2a735a56 2018-03-12 23:08:35 -04:00
vertical-lr-blocks.html.ini Move vertical-lr-blocks.html to wpt reftests. 2015-12-02 16:07:20 +01:00
viewport_meta.html.ini Allow for redirects after a CORS-preflight 2017-03-10 16:39:33 +01:00
viewport_rule.html.ini Allow for redirects after a CORS-preflight 2017-03-10 16:39:33 +01:00
white_space_intrinsic_sizes_a.html.ini Move white_space_intrinsic_sizes_a.html to wpt reftests. 2015-12-09 01:03:59 -05:00
whitespace_nowrap_line_breaking_a.html.ini Share line breaking state across text runs 2018-01-24 12:51:33 +05:30
word-break-keep-all-008.htm.ini add tests 2016-09-27 11:25:21 +02:00
writing-mode_change_display.html.ini Enable the context and canvas webgl tests. 2017-03-31 18:42:44 -04:00