Skip to content

Commit

Permalink
resources: Give button elements white-space: normal again.
Browse files Browse the repository at this point in the history
Fixes Twitter.

Originally regressed in 0a86543.
  • Loading branch information
pcwalton committed Sep 26, 2016
1 parent 22ba0e1 commit 2d31546
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/servo.css
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
24 changes: 24 additions & 0 deletions tests/wpt/mozilla/meta/MANIFEST.json
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions tests/wpt/mozilla/tests/css/button_whitespace_a.html
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title></title>
<link rel="match" href="button_whitespace_ref.html">
<button>A

B</button>
5 changes: 5 additions & 0 deletions tests/wpt/mozilla/tests/css/button_whitespace_ref.html
@@ -0,0 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title></title>
<button>A B</button>

0 comments on commit 2d31546

Please sign in to comment.