aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/properties.mako.rs9
-rw-r--r--tests/ref/basic.list1
-rw-r--r--tests/ref/text_decoration_smoke_a.html18
-rw-r--r--tests/ref/text_decoration_smoke_ref.html17
4 files changed, 40 insertions, 5 deletions
diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs
index f052520643a..9318aae871f 100644
--- a/components/style/properties.mako.rs
+++ b/components/style/properties.mako.rs
@@ -1443,7 +1443,7 @@ pub mod longhands {
impl ComputedValueAsSpecified for SpecifiedValue {}
- #[derive(PartialEq, Eq, Copy, Clone)]
+ #[derive(PartialEq, Eq, Copy, Clone, Debug)]
pub struct SpecifiedValue {
pub underline: bool,
pub overline: bool,
@@ -1495,8 +1495,8 @@ pub mod longhands {
}
let mut blink = false;
let mut empty = true;
- loop {
- match_ignore_ascii_case! { try!(input.expect_ident()),
+ while let Ok(ident) = input.expect_ident() {
+ match_ignore_ascii_case! { ident,
"underline" => if result.underline { return Err(()) }
else { empty = false; result.underline = true },
"overline" => if result.overline { return Err(()) }
@@ -1521,7 +1521,7 @@ pub mod longhands {
impl ComputedValueAsSpecified for SpecifiedValue {}
- #[derive(Clone, PartialEq, Copy)]
+ #[derive(Clone, PartialEq, Copy, Debug)]
pub struct SpecifiedValue {
pub underline: Option<RGBA>,
pub overline: Option<RGBA>,
@@ -1574,7 +1574,6 @@ pub mod longhands {
if result.line_through.is_none() {
result.line_through = maybe(context.text_decoration.line_through, context)
}
-
result
}
diff --git a/tests/ref/basic.list b/tests/ref/basic.list
index 939c651dd04..67dfebfdd6d 100644
--- a/tests/ref/basic.list
+++ b/tests/ref/basic.list
@@ -250,3 +250,4 @@ fragment=top != ../html/acid2.html acid2_ref.html
== text_align_complex_a.html text_align_complex_ref.html
== percentage_height_root.html percentage_height_root_ref.html
== canvas_transform_a.html canvas_transform_ref.html
+!= text_decoration_smoke_a.html text_decoration_smoke_ref.html
diff --git a/tests/ref/text_decoration_smoke_a.html b/tests/ref/text_decoration_smoke_a.html
new file mode 100644
index 00000000000..443e1bd1502
--- /dev/null
+++ b/tests/ref/text_decoration_smoke_a.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!-- Tests that `text-decoration` does something. -->
+<style>
+#a {
+ text-decoration: underline;
+ color: red;
+ font-size: 96px;
+ width: 300px;
+}
+</style>
+</head>
+<body>
+<div id=a>Foo</div>
+</body>
+</html>
+
diff --git a/tests/ref/text_decoration_smoke_ref.html b/tests/ref/text_decoration_smoke_ref.html
new file mode 100644
index 00000000000..4bb7e6def4c
--- /dev/null
+++ b/tests/ref/text_decoration_smoke_ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!-- Tests that `text-decoration` does something. -->
+<style>
+#a {
+ color: red;
+ font-size: 96px;
+ width: 300px;
+}
+</style>
+</head>
+<body>
+<div id=a>Foo</div>
+</body>
+</html>
+