Bug 582277 - Default style for :-moz-submit-invalid pseudo-class. r+a=dbaron

This commit is contained in:
Mounir Lamouri 2010-09-10 20:40:49 +02:00
Родитель 9e6a44eb5b
Коммит 4418d853e2
14 изменённых файлов: 108 добавлений и 14 удалений

Просмотреть файл

@ -2,10 +2,8 @@
<html>
<body>
<table id='t'>
<form>
<tr><td><input required></td></tr>
<tr><td><button type='submit'></button></td></tr>
</form>
<tr><td><input required></td></tr>
<tr><td><button type='submit'></button></td></tr>
</table>
</body>
</html>

Просмотреть файл

@ -3,7 +3,7 @@
<body>
<form>
<input required>
<button></button>
<button type='button'></button>
</form>
</body>
</html>

Просмотреть файл

@ -0,0 +1,9 @@
<!DOCTYPE>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<form>
<button type='submit' class='submit-invalid-ref'>Submit!</button>
</form>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<!DOCTYPE>
<html class="reftest-wait">
<style>
:invalid {
display: none;
}
</style>
<script>
function onloadHandler()
{
document.getElementById('e').setCustomValidity('foo');
document.documentElement.className='';
}
</script>
<body onload="onloadHandler();">
<form>
<input id='e'>
<button type='submit'>Submit!</button>
</form>
</body>
</html>

Просмотреть файл

@ -0,0 +1,9 @@
<!DOCTYPE>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<form>
<input type='image' class='submit-invalid-ref'>
</form>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<!DOCTYPE>
<html class="reftest-wait">
<style>
:invalid {
display: none;
}
</style>
<script>
function onloadHandler()
{
document.getElementById('e').setCustomValidity('foo');
document.documentElement.className='';
}
</script>
<body onload="onloadHandler();">
<form>
<input id='e'>
<input type='image'>
</form>
</body>
</html>

Просмотреть файл

@ -0,0 +1,9 @@
<!DOCTYPE>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<form>
<input type='submit' class='submit-invalid-ref'>
</form>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<!DOCTYPE>
<html class="reftest-wait">
<style>
:invalid {
display: none;
}
</style>
<script>
function onloadHandler()
{
document.getElementById('e').setCustomValidity('foo');
document.documentElement.className='';
}
</script>
<body onload="onloadHandler();">
<form>
<input id='e'>
<input type='submit'>
</form>
</body>
</html>

Просмотреть файл

@ -0,0 +1,3 @@
== input-submit.html input-submit-ref.html
== input-image.html input-image-ref.html
== button-submit.html button-submit-ref.html

Просмотреть файл

@ -0,0 +1,3 @@
.submit-invalid-ref {
-moz-box-shadow: 0 0 2px 1px red;
}

Просмотреть файл

@ -2,10 +2,8 @@
<html>
<body>
<table id='t'>
<form>
<tr><td><input required></td></tr>
<tr><td><input type='image'></td></tr>
</form>
<tr><td><input required></td></tr>
<tr><td><input type='image'></td></tr>
</table>
</body>
</html>

Просмотреть файл

@ -2,10 +2,8 @@
<html>
<body>
<table id='t'>
<form>
<tr><td><input required></td></tr>
<tr><td><input type='submit'></td></tr>
</form>
<tr><td><input required></td></tr>
<tr><td><input type='submit'></td></tr>
</table>
</body>
</html>

Просмотреть файл

@ -1,3 +1,4 @@
include button-submit/reftest.list
include input-image/reftest.list
include input-submit/reftest.list
include default-style/reftest.list

Просмотреть файл

@ -625,8 +625,11 @@ input[type="file"] > input[type="text"] {
* <output> is the only element which may not follow this rule (but color: red).
* However it is barred from constraint validation per the specifications so, at
* least for now, it will not be affected by :invalid.
*
* This style also applies for submit controls when the form is invalid.
*/
:invalid {
:invalid,
:-moz-submit-invalid {
-moz-box-shadow: 0 0 2px 1px red;
}