mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #16774 - emilio:unbust-stylo, r=Manishearth
Unbust stylo <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16774) <!-- Reviewable:end -->
This commit is contained in:
commit
fca15d3782
8 changed files with 29660 additions and 22316 deletions
|
@ -2273,10 +2273,11 @@ fn static_assert() {
|
|||
use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_no_properties;
|
||||
use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
|
||||
use gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
|
||||
let property = self.gecko.mTransitions[index].mProperty;
|
||||
if property == eCSSProperty_UNKNOWN || property == eCSSPropertyExtra_variable {
|
||||
let atom = self.gecko.mTransitions[index].mUnknownProperty.raw();
|
||||
let atom = self.gecko.mTransitions[index].mUnknownProperty.raw::<nsIAtom>();
|
||||
debug_assert!(!atom.is_null());
|
||||
TransitionProperty::Unsupported(atom.into())
|
||||
} else if property == eCSSPropertyExtra_no_properties {
|
||||
|
@ -2295,6 +2296,7 @@ fn static_assert() {
|
|||
pub fn copy_transition_property_from(&mut self, other: &Self) {
|
||||
use gecko_bindings::structs::nsCSSPropertyID::eCSSPropertyExtra_variable;
|
||||
use gecko_bindings::structs::nsCSSPropertyID::eCSSProperty_UNKNOWN;
|
||||
use gecko_bindings::structs::nsIAtom;
|
||||
unsafe { self.gecko.mTransitions.ensure_len(other.gecko.mTransitions.len()) };
|
||||
|
||||
let count = other.gecko.mTransitionPropertyCount;
|
||||
|
@ -2304,7 +2306,7 @@ fn static_assert() {
|
|||
transition.mProperty = other.gecko.mTransitions[index].mProperty;
|
||||
if transition.mProperty == eCSSProperty_UNKNOWN ||
|
||||
transition.mProperty == eCSSPropertyExtra_variable {
|
||||
let atom = other.gecko.mTransitions[index].mUnknownProperty.raw();
|
||||
let atom = other.gecko.mTransitions[index].mUnknownProperty.raw::<nsIAtom>();
|
||||
debug_assert!(!atom.is_null());
|
||||
unsafe { Gecko_StyleTransition_SetUnsupportedProperty(transition, atom) };
|
||||
}
|
||||
|
|
|
@ -695,7 +695,7 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
#[inline]
|
||||
fn to_computed_value(&self, cx: &Context) -> computed_value::T {
|
||||
use gecko_bindings::bindings::Gecko_GetBaseSize;
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{self, nsIAtom};
|
||||
use values::specified::length::au_to_int_px;
|
||||
// Data from nsRuleNode.cpp in Gecko
|
||||
// Mapping from base size and HTML size to pixels
|
||||
|
@ -721,7 +721,7 @@ ${helpers.single_keyword_system("font-variant-caps",
|
|||
// XXXManishearth handle quirks mode
|
||||
|
||||
let ref gecko_font = cx.style().get_font().gecko();
|
||||
let base_size = unsafe { Atom::with(gecko_font.mLanguage.raw(), &mut |atom| {
|
||||
let base_size = unsafe { Atom::with(gecko_font.mLanguage.raw::<nsIAtom>(), &mut |atom| {
|
||||
cx.font_metrics_provider.get_size(atom, gecko_font.mGenericID).0
|
||||
}) };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue