Devirtualize nsIAtom.

This commit is contained in:
Nicholas Nethercote 2017-09-27 12:40:31 +10:00
parent 0160aaeeea
commit 7019d42523
5 changed files with 13 additions and 18 deletions

View file

@ -168,7 +168,6 @@ impl ToComputedValue for KeywordSize {
type ComputedValue = NonNegativeLength;
#[inline]
fn to_computed_value(&self, cx: &Context) -> NonNegativeLength {
use gecko_bindings::structs::nsIAtom;
use values::specified::length::au_to_int_px;
// Data from nsRuleNode.cpp in Gecko
// Mapping from base size and HTML size to pixels
@ -194,7 +193,7 @@ impl ToComputedValue for KeywordSize {
// XXXManishearth handle quirks mode (bug 1401322)
let ref gecko_font = cx.style().get_font().gecko();
let base_size = unsafe { Atom::with(gecko_font.mLanguage.raw::<nsIAtom>(), |atom| {
let base_size = unsafe { Atom::with(gecko_font.mLanguage.mRawPtr, |atom| {
cx.font_metrics_provider.get_size(atom, gecko_font.mGenericID).0
}) };