Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE

Backs out https://github.com/servo/servo/pull/18809
This commit is contained in:
Gecko Backout 2017-10-19 21:26:51 +00:00 committed by moz-servo-sync
parent fe16c1d5c3
commit 11c64178d8
142 changed files with 1635 additions and 1685 deletions

View file

@ -13,7 +13,7 @@
Method("has_line_through", "bool")]) %>
<%helpers:longhand name="text-overflow" animation_value_type="discrete" boxed="True"
flags="PropertyFlags::APPLIES_TO_PLACEHOLDER"
flags="APPLIES_TO_PLACEHOLDER"
spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow">
use std::fmt;
use style_traits::ToCss;
@ -141,20 +141,19 @@ ${helpers.single_keyword("unicode-bidi",
<%helpers:longhand name="text-decoration-line"
custom_cascade="${product == 'servo'}"
animation_value_type="discrete"
flags="""PropertyFlags::APPLIES_TO_FIRST_LETTER PropertyFlags::APPLIES_TO_FIRST_LINE
PropertyFlags::APPLIES_TO_PLACEHOLDER""",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line">
use std::fmt;
use style_traits::ToCss;
bitflags! {
#[derive(MallocSizeOf, ToComputedValue)]
pub struct SpecifiedValue: u8 {
const NONE = 0;
const UNDERLINE = 0x01;
const OVERLINE = 0x02;
const LINE_THROUGH = 0x04;
const BLINK = 0x08;
pub flags SpecifiedValue: u8 {
const NONE = 0,
const UNDERLINE = 0x01,
const OVERLINE = 0x02,
const LINE_THROUGH = 0x04,
const BLINK = 0x08,
% if product == "gecko":
/// Only set by presentation attributes
///
@ -163,7 +162,7 @@ ${helpers.single_keyword("unicode-bidi",
///
/// For example, this gives <a href=foo><font color="red">text</font></a>
/// a red text decoration
const COLOR_OVERRIDE = 0x10;
const COLOR_OVERRIDE = 0x10,
% endif
}
}
@ -173,7 +172,7 @@ ${helpers.single_keyword("unicode-bidi",
let mut has_any = false;
macro_rules! write_value {
($line:path => $css:expr) => {
($line:ident => $css:expr) => {
if self.contains($line) {
if has_any {
dest.write_str(" ")?;
@ -183,10 +182,10 @@ ${helpers.single_keyword("unicode-bidi",
}
}
}
write_value!(SpecifiedValue::UNDERLINE => "underline");
write_value!(SpecifiedValue::OVERLINE => "overline");
write_value!(SpecifiedValue::LINE_THROUGH => "line-through");
write_value!(SpecifiedValue::BLINK => "blink");
write_value!(UNDERLINE => "underline");
write_value!(OVERLINE => "overline");
write_value!(LINE_THROUGH => "line-through");
write_value!(BLINK => "blink");
if !has_any {
dest.write_str("none")?;
}
@ -223,17 +222,14 @@ ${helpers.single_keyword("unicode-bidi",
match input.expect_ident() {
Ok(ident) => {
(match_ignore_ascii_case! { &ident,
"underline" => if result.contains(SpecifiedValue::UNDERLINE) { Err(()) }
else { empty = false; result.insert(SpecifiedValue::UNDERLINE); Ok(()) },
"overline" => if result.contains(SpecifiedValue::OVERLINE) { Err(()) }
else { empty = false; result.insert(SpecifiedValue::OVERLINE); Ok(()) },
"line-through" => if result.contains(SpecifiedValue::LINE_THROUGH) { Err(()) }
else {
empty = false;
result.insert(SpecifiedValue::LINE_THROUGH); Ok(())
},
"blink" => if result.contains(SpecifiedValue::BLINK) { Err(()) }
else { empty = false; result.insert(SpecifiedValue::BLINK); Ok(()) },
"underline" => if result.contains(UNDERLINE) { Err(()) }
else { empty = false; result.insert(UNDERLINE); Ok(()) },
"overline" => if result.contains(OVERLINE) { Err(()) }
else { empty = false; result.insert(OVERLINE); Ok(()) },
"line-through" => if result.contains(LINE_THROUGH) { Err(()) }
else { empty = false; result.insert(LINE_THROUGH); Ok(()) },
"blink" => if result.contains(BLINK) { Err(()) }
else { empty = false; result.insert(BLINK); Ok(()) },
_ => Err(())
}).map_err(|()| {
location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone()))
@ -265,8 +261,7 @@ ${helpers.single_keyword("text-decoration-style",
"solid double dotted dashed wavy -moz-none",
products="gecko",
animation_value_type="discrete",
flags="""PropertyFlags::APPLIES_TO_FIRST_LETTER PropertyFlags::APPLIES_TO_FIRST_LINE
PropertyFlags::APPLIES_TO_PLACEHOLDER""",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style")}
${helpers.predefined_type(
@ -277,8 +272,7 @@ ${helpers.predefined_type(
products="gecko",
animation_value_type="AnimatedColor",
ignored_when_colors_disabled=True,
flags="""PropertyFlags::APPLIES_TO_FIRST_LETTER PropertyFlags::APPLIES_TO_FIRST_LINE
PropertyFlags::APPLIES_TO_PLACEHOLDER""",
flags="APPLIES_TO_FIRST_LETTER APPLIES_TO_FIRST_LINE APPLIES_TO_PLACEHOLDER",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color",
)}
@ -289,5 +283,5 @@ ${helpers.predefined_type(
initial_specified_value="specified::InitialLetter::normal()",
animation_value_type="discrete",
products="gecko",
flags="PropertyFlags::APPLIES_TO_FIRST_LETTER",
flags="APPLIES_TO_FIRST_LETTER",
spec="https://drafts.csswg.org/css-inline/#sizing-drop-initials")}