From adf68626bdaf4b4afba932476b8264f90161ad5f Mon Sep 17 00:00:00 2001 From: Joel Santos Date: Tue, 12 Apr 2016 21:44:16 +0100 Subject: [PATCH 1/2] Fixed line-height for input and textarea + use correct font * [fix] Input line height and styling * [new] Input line height ref test * [fix] Test for input in manifest * Updated CSS tests with new expected failures. --- resources/servo.css | 4 ++-- .../html/transform-input-017.htm.ini | 4 ++++ .../html/transform-input-018.htm.ini | 5 ++-- tests/wpt/mozilla/meta/MANIFEST.json | 24 +++++++++++++++++++ .../mozilla/tests/css/input_line_height.html | 12 ++++++++++ .../tests/css/input_line_height_ref.html | 11 +++++++++ 6 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-017.htm.ini create mode 100644 tests/wpt/mozilla/tests/css/input_line_height.html create mode 100644 tests/wpt/mozilla/tests/css/input_line_height_ref.html diff --git a/resources/servo.css b/resources/servo.css index 5fe1b27bf46..d5aa93e3e51 100644 --- a/resources/servo.css +++ b/resources/servo.css @@ -1,5 +1,5 @@ -input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; text-align: left; } -textarea { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: pre; } +input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: nowrap; text-align: left; line-height: 1.8; } +textarea { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: pre; } input::selection, textarea::selection { background: rgba(176, 214, 255, 1.0); color: black; } button, diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-017.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-017.htm.ini new file mode 100644 index 00000000000..4dc53b8f843 --- /dev/null +++ b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-017.htm.ini @@ -0,0 +1,4 @@ +[transform-input-017.htm] + type: reftest + expected: FAIL + bug: https://github.com/servo/servo/issues/10881 diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-018.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-018.htm.ini index 1c005ae8a57..69c5b778d30 100644 --- a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-018.htm.ini +++ b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-input-018.htm.ini @@ -1,5 +1,4 @@ [transform-input-018.htm] type: reftest - expected: - if os == "mac": PASS - FAIL + expected: FAIL + bug: https://github.com/servo/servo/issues/10881 diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index bc31d8c61a5..1c0f071c85f 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -2700,6 +2700,18 @@ "url": "/_mozilla/css/input_insertion_point_empty_a.html" } ], + "css/input_line_height.html": [ + { + "path": "css/input_line_height.html", + "references": [ + [ + "/_mozilla/css/input_line_height_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/input_line_height.html" + } + ], "css/input_placeholder.html": [ { "path": "css/input_placeholder.html", @@ -9446,6 +9458,18 @@ "url": "/_mozilla/css/input_insertion_point_empty_a.html" } ], + "css/input_line_height.html": [ + { + "path": "css/input_line_height.html", + "references": [ + [ + "/_mozilla/css/input_line_height_ref.html", + "==" + ] + ], + "url": "/_mozilla/css/input_line_height.html" + } + ], "css/input_placeholder.html": [ { "path": "css/input_placeholder.html", diff --git a/tests/wpt/mozilla/tests/css/input_line_height.html b/tests/wpt/mozilla/tests/css/input_line_height.html new file mode 100644 index 00000000000..1de07c88ae2 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/input_line_height.html @@ -0,0 +1,12 @@ + + + + Input elements shouldn't inherit parent containers line height + + + +
+ +
+ + diff --git a/tests/wpt/mozilla/tests/css/input_line_height_ref.html b/tests/wpt/mozilla/tests/css/input_line_height_ref.html new file mode 100644 index 00000000000..16d4fd99712 --- /dev/null +++ b/tests/wpt/mozilla/tests/css/input_line_height_ref.html @@ -0,0 +1,11 @@ + + + + Input elements shouldn't inherit parent containers line height + + +
+ +
+ + From 220722e321cae7d13f75a2f90e3bfed154438b53 Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Sat, 30 Apr 2016 22:01:04 +0300 Subject: [PATCH 2/2] Fixed test failures. --- resources/servo.css | 1 + tests/wpt/mozilla/tests/css/submit_focus_a.html | 5 ----- tests/wpt/mozilla/tests/css/submit_focus_b.html | 6 ------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/resources/servo.css b/resources/servo.css index d5aa93e3e51..bcdab2bb568 100644 --- a/resources/servo.css +++ b/resources/servo.css @@ -1,3 +1,4 @@ +button, input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: nowrap; text-align: left; line-height: 1.8; } textarea { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; font-family: sans-serif; font-size: 0.7em; white-space: pre; } input::selection, diff --git a/tests/wpt/mozilla/tests/css/submit_focus_a.html b/tests/wpt/mozilla/tests/css/submit_focus_a.html index e351bd22fa7..2f45fb0ac1b 100644 --- a/tests/wpt/mozilla/tests/css/submit_focus_a.html +++ b/tests/wpt/mozilla/tests/css/submit_focus_a.html @@ -1,9 +1,4 @@ -