Auto merge of #10361 - mbrubeck:empty-caret, r=pcwalton

Fixes for insertion point caret rendering

This contains several fixes for the code to position and render the insertion point.  The main effect is that the insertion point is now rendered correctly when in an empty input field.  See the individual commit messages for more detais.  r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10361)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-08 06:01:17 +05:30
commit c191dff04e
7 changed files with 132 additions and 37 deletions

View file

@ -2579,6 +2579,18 @@
"url": "/_mozilla/css/input_height_a.html"
}
],
"css/input_insertion_point_empty_a.html": [
{
"path": "css/input_insertion_point_empty_a.html",
"references": [
[
"/_mozilla/css/input_insertion_point_empty_ref.html",
"!="
]
],
"url": "/_mozilla/css/input_insertion_point_empty_a.html"
}
],
"css/input_placeholder.html": [
{
"path": "css/input_placeholder.html",
@ -9061,6 +9073,18 @@
"url": "/_mozilla/css/input_height_a.html"
}
],
"css/input_insertion_point_empty_a.html": [
{
"path": "css/input_insertion_point_empty_a.html",
"references": [
[
"/_mozilla/css/input_insertion_point_empty_ref.html",
"!="
]
],
"url": "/_mozilla/css/input_insertion_point_empty_a.html"
}
],
"css/input_placeholder.html": [
{
"path": "css/input_placeholder.html",

View file

@ -11,5 +11,8 @@
<body>
<input id="a">
<input id="b">
<script>
document.getElementById("a").focus();
</script>
</body>
</html>

View file

@ -0,0 +1,14 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>empty input insertion point test</title>
<link rel="mismatch" href="input_insertion_point_empty_ref.html">
</head>
<body>
<input>
<script>
document.querySelector("input").focus();
</script>
</body>
</html>

View file

@ -0,0 +1,10 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>empty input insertion point reference</title>
</head>
<body>
<input>
</body>
</html>