mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Devirtualize nsIAtom.
This commit is contained in:
parent
0160aaeeea
commit
7019d42523
5 changed files with 13 additions and 18 deletions
|
@ -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
|
||||
}) };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue