Bug 1504991 - Update webrender to commit 46ee0ffd00da268faf04e3263ad41733f58a6573 (WR PR #3279). r=kats

Differential Revision: https://phabricator.services.mozilla.com/D11142

--HG--
extra : moz-landing-system : lando
This commit is contained in:
WR Updater Bot 2018-11-07 03:21:23 +00:00
Родитель 50f9ee4492
Коммит 7577fdbedb
2 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -141,7 +141,23 @@ impl FontContext {
{
font
} else {
panic!("font mismatch for descriptor {:?} {:?}", font_handle, font.to_descriptor())
// We can't depend on the family's fonts being in a particular order, so the first match may not
// be an exact match, even though it is sufficiently close to be a match. As a slower fallback,
// try looking through all of the fonts in the family for an exact match. The caller should have
// verified that an exact match exists so that this search shouldn't fail.
(0 .. family.get_font_count()).filter_map(|idx| {
let alt = family.get_font(idx);
if alt.weight() == font_handle.weight &&
alt.stretch() == font_handle.stretch &&
alt.style() == font_handle.style
{
Some(alt)
} else {
None
}
}).next().unwrap_or_else(|| {
panic!("font mismatch for descriptor {:?} {:?}", font_handle, font.to_descriptor())
})
}
} else {
panic!("missing font family for descriptor {:?}", font_handle)

Просмотреть файл

@ -1 +1 @@
790b76f1547453615262c3037e1fb04bda22fbc8
46ee0ffd00da268faf04e3263ad41733f58a6573