From 2d31546ebada34270b9e2a2c8d0a3d4a0c77d70b Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 26 Sep 2016 16:29:24 -0700 Subject: [PATCH] resources: Give button elements `white-space: normal` again. Fixes Twitter. Originally regressed in 0a86543e6decf02860a5a98c46e01940e79af6fa. --- resources/servo.css | 5 +++- tests/wpt/mozilla/meta/MANIFEST.json | 24 +++++++++++++++++++ .../tests/css/button_whitespace_a.html | 7 ++++++ .../tests/css/button_whitespace_ref.html | 5 ++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 tests/wpt/mozilla/tests/css/button_whitespace_a.html create mode 100644 tests/wpt/mozilla/tests/css/button_whitespace_ref.html diff --git a/resources/servo.css b/resources/servo.css index 0c4bbeca12d..e5ed6f1bfed 100644 --- a/resources/servo.css +++ b/resources/servo.css @@ -9,7 +9,6 @@ input { color: black; font-family: sans-serif; font-size: 0.8333em; - white-space: pre; text-align: left; line-height: 1.8; } @@ -132,6 +131,10 @@ textarea { -servo-overflow-clip-box: content-box; } +input:not([type=radio i]):not([type=checkbox i]):not([type=reset i]):not([type=button i]):not([type=submit i]) { + white-space: pre; +} + textarea { overflow: auto; } diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index fc7ee02cb96..84b8cb72f56 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -1220,6 +1220,18 @@ "url": "/_mozilla/css/button_css_width.html" } ], + "css/button_whitespace_a.html": [ + { + "path": "css/button_whitespace_a.html", + "references": [ + [ + "/_mozilla/css/button_whitespace_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/button_whitespace_a.html" + } + ], "css/calc-basic.html": [ { "path": "css/calc-basic.html", @@ -14846,6 +14858,18 @@ "url": "/_mozilla/css/button_css_width.html" } ], + "css/button_whitespace_a.html": [ + { + "path": "css/button_whitespace_a.html", + "references": [ + [ + "/_mozilla/css/button_whitespace_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/button_whitespace_a.html" + } + ], "css/calc-basic.html": [ { "path": "css/calc-basic.html", diff --git a/tests/wpt/mozilla/tests/css/button_whitespace_a.html b/tests/wpt/mozilla/tests/css/button_whitespace_a.html new file mode 100644 index 00000000000..cf68d039365 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/button_whitespace_a.html @@ -0,0 +1,7 @@ + + + + + diff --git a/tests/wpt/mozilla/tests/css/button_whitespace_ref.html b/tests/wpt/mozilla/tests/css/button_whitespace_ref.html new file mode 100644 index 00000000000..651caabb1d7 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/button_whitespace_ref.html @@ -0,0 +1,5 @@ + + + + +