mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
auto merge of #5531 : Ms2ger/servo/int, r=jdm
This commit is contained in:
commit
92b6a0b8e0
4 changed files with 9 additions and 10 deletions
|
@ -147,7 +147,7 @@ impl PresentationalHintSynthesis for Stylist {
|
|||
UnsignedIntegerAttribute::CellSpacing) {
|
||||
None => {}
|
||||
Some(length) => {
|
||||
let width_value = specified::Length::Absolute(Au::from_px(length as int));
|
||||
let width_value = specified::Length::Absolute(Au::from_px(length as isize));
|
||||
matching_rules_list.vec_push(from_declaration(
|
||||
PropertyDeclaration::BorderSpacing(
|
||||
SpecifiedValue(
|
||||
|
@ -177,7 +177,7 @@ impl PresentationalHintSynthesis for Stylist {
|
|||
Some("text") | Some("password") => {
|
||||
specified::Length::ServoCharacterWidth(specified::CharacterWidth(value))
|
||||
}
|
||||
_ => specified::Length::Absolute(Au::from_px(value as int)),
|
||||
_ => specified::Length::Absolute(Au::from_px(value as isize)),
|
||||
};
|
||||
matching_rules_list.vec_push(from_declaration(
|
||||
PropertyDeclaration::Width(SpecifiedValue(
|
||||
|
@ -256,7 +256,7 @@ impl PresentationalHintSynthesis for Stylist {
|
|||
match element.get_unsigned_integer_attribute(UnsignedIntegerAttribute::Border) {
|
||||
None => {}
|
||||
Some(length) => {
|
||||
let width_value = specified::Length::Absolute(Au::from_px(length as int));
|
||||
let width_value = specified::Length::Absolute(Au::from_px(length as isize));
|
||||
matching_rules_list.vec_push(from_declaration(
|
||||
PropertyDeclaration::BorderTopWidth(SpecifiedValue(
|
||||
longhands::border_top_width::SpecifiedValue(width_value)))));
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#![feature(alloc)]
|
||||
#![feature(plugin)]
|
||||
#![feature(int_uint)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(core)]
|
||||
#![feature(collections)]
|
||||
|
|
|
@ -1607,7 +1607,7 @@ pub mod longhands {
|
|||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
% for weight in range(100, 901, 100):
|
||||
&T::Weight${weight} => write!(f, "{}", ${weight}i),
|
||||
&T::Weight${weight} => write!(f, "{}", ${weight}),
|
||||
% endfor
|
||||
}
|
||||
}
|
||||
|
@ -1682,7 +1682,7 @@ pub mod longhands {
|
|||
use util::geometry::Au;
|
||||
pub type T = Au;
|
||||
}
|
||||
const MEDIUM_PX: int = 16;
|
||||
const MEDIUM_PX: isize = 16;
|
||||
#[inline] pub fn get_initial_value() -> computed_value::T {
|
||||
Au::from_px(MEDIUM_PX)
|
||||
}
|
||||
|
@ -4359,11 +4359,11 @@ mod property_bit_field {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn get(&self, bit: uint) -> bool {
|
||||
fn get(&self, bit: usize) -> bool {
|
||||
(self.storage[bit / 32] & (1 << (bit % 32))) != 0
|
||||
}
|
||||
#[inline]
|
||||
fn set(&mut self, bit: uint) {
|
||||
fn set(&mut self, bit: usize) {
|
||||
self.storage[bit / 32] |= 1 << (bit % 32)
|
||||
}
|
||||
% for i, property in enumerate(LONGHANDS):
|
||||
|
|
|
@ -38,7 +38,7 @@ pub struct Stylist {
|
|||
element_map: PerPseudoElementSelectorMap,
|
||||
before_map: PerPseudoElementSelectorMap,
|
||||
after_map: PerPseudoElementSelectorMap,
|
||||
rules_source_order: uint,
|
||||
rules_source_order: usize,
|
||||
}
|
||||
|
||||
impl Stylist {
|
||||
|
@ -52,7 +52,7 @@ impl Stylist {
|
|||
element_map: PerPseudoElementSelectorMap::new(),
|
||||
before_map: PerPseudoElementSelectorMap::new(),
|
||||
after_map: PerPseudoElementSelectorMap::new(),
|
||||
rules_source_order: 0u,
|
||||
rules_source_order: 0,
|
||||
};
|
||||
// FIXME: Add iso-8859-9.css when the document’s encoding is ISO-8859-8.
|
||||
// FIXME: presentational-hints.css should be at author origin with zero specificity.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue