зеркало из https://github.com/mozilla/gecko-dev.git
Bug 582277 - Default style for :-moz-submit-invalid pseudo-class. r+a=dbaron
This commit is contained in:
Родитель
9e6a44eb5b
Коммит
4418d853e2
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче