Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.

This commit is contained in:
Simon Sapin 2015-04-23 00:14:02 +02:00 committed by Josh Matthews
parent 7b87085c18
commit ef8edd4e87
168 changed files with 2247 additions and 2408 deletions

View file

@ -16,8 +16,8 @@ use properties::PropertyDeclaration;
use properties::longhands::{self, border_spacing};
use selector_matching::Stylist;
use selectors::smallvec::VecLike;
use util::geometry::Au;
use util::smallvec::VecLike;
use util::str::LengthOrPercentageOrAuto;
/// Legacy presentational attributes that take a length as defined in HTML5 § 2.4.4.4.
@ -88,9 +88,9 @@ impl PresentationalHintSynthesis for Stylist {
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>> {
let element = node.as_element();
let length = matching_rules_list.vec_len();
let length = matching_rules_list.len();
element.synthesize_presentational_hints_for_legacy_attributes(matching_rules_list);
if matching_rules_list.vec_len() != length {
if matching_rules_list.len() != length {
// Never share style for elements with preshints
*shareable = false;
}
@ -101,13 +101,13 @@ impl PresentationalHintSynthesis for Stylist {
LengthOrPercentageOrAuto::Auto => {}
LengthOrPercentageOrAuto::Percentage(percentage) => {
let width_value = specified::LengthOrPercentageOrAuto::Percentage(percentage);
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::Width(SpecifiedValue(width_value))));
*shareable = false
}
LengthOrPercentageOrAuto::Length(length) => {
let width_value = specified::LengthOrPercentageOrAuto::Length(specified::Length::Absolute(length));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::Width(SpecifiedValue(width_value))));
*shareable = false
}
@ -127,7 +127,7 @@ impl PresentationalHintSynthesis for Stylist {
None => {}
Some(length) => {
let width_value = specified::Length::Absolute(Au::from_px(length as isize));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::BorderSpacing(
SpecifiedValue(
border_spacing::SpecifiedValue {
@ -146,7 +146,7 @@ impl PresentationalHintSynthesis for Stylist {
Some(value) if value != 0 => {
let value = specified::Length::ServoCharacterWidth(
specified::CharacterWidth(value));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::Width(SpecifiedValue(
specified::LengthOrPercentageOrAuto::Length(value)))));
*shareable = false
@ -166,7 +166,7 @@ impl PresentationalHintSynthesis for Stylist {
//
// https://html.spec.whatwg.org/multipage/#textarea-effective-width
let value = specified::Length::ServoCharacterWidth(specified::CharacterWidth(value));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::Width(SpecifiedValue(
specified::LengthOrPercentageOrAuto::Length(value)))));
*shareable = false
@ -179,7 +179,7 @@ impl PresentationalHintSynthesis for Stylist {
//
// https://html.spec.whatwg.org/multipage/#textarea-effective-height
let value = specified::Length::FontRelative(specified::FontRelativeLength::Em(value as CSSFloat));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::Height(SpecifiedValue(
longhands::height::SpecifiedValue(
specified::LengthOrPercentageOrAuto::Length(value))))));
@ -205,16 +205,16 @@ impl PresentationalHintSynthesis for Stylist {
None => {}
Some(length) => {
let width_value = specified::Length::Absolute(Au::from_px(length as isize));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::BorderTopWidth(SpecifiedValue(
longhands::border_top_width::SpecifiedValue(width_value)))));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::BorderLeftWidth(SpecifiedValue(
longhands::border_left_width::SpecifiedValue(width_value)))));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::BorderBottomWidth(SpecifiedValue(
longhands::border_bottom_width::SpecifiedValue(width_value)))));
matching_rules_list.vec_push(from_declaration(
matching_rules_list.push(from_declaration(
PropertyDeclaration::BorderRightWidth(SpecifiedValue(
longhands::border_right_width::SpecifiedValue(width_value)))));
*shareable = false