Bug 612752 - Change :-moz-ui-invalid default style when the invalid element is focused. r=dbaron ui-r=limi a=blocking-final

--HG--
rename : layout/reftests/css-ui-invalid/default-style/button-ref.html => layout/reftests/css-ui-invalid/default-style/button-focus-ref.html
rename : layout/reftests/css-ui-invalid/default-style/button.html => layout/reftests/css-ui-invalid/default-style/button-focus.html
rename : layout/reftests/css-ui-invalid/default-style/input-ref.html => layout/reftests/css-ui-invalid/default-style/input-focus-ref.html
rename : layout/reftests/css-ui-invalid/default-style/input.html => layout/reftests/css-ui-invalid/default-style/input-focus.html
rename : layout/reftests/css-ui-invalid/default-style/select-ref.html => layout/reftests/css-ui-invalid/default-style/select-focus-ref.html
rename : layout/reftests/css-ui-invalid/default-style/select.html => layout/reftests/css-ui-invalid/default-style/select-focus.html
rename : layout/reftests/css-ui-invalid/default-style/textarea-ref.html => layout/reftests/css-ui-invalid/default-style/textarea-focus-ref.html
rename : layout/reftests/css-ui-invalid/default-style/textarea.html => layout/reftests/css-ui-invalid/default-style/textarea-focus.html
This commit is contained in:
Mounir Lamouri 2010-12-21 19:58:04 -05:00
parent 1e6d44f319
commit 2db721d9de
11 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,7 @@
<!DOCTYPE>
<html class="reftest-wait">
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementsByTagName('button')[0].focus();">
<button class='invalid-ref' onfocus="document.documentElement.className='';"></button>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE>
<html class="reftest-wait">
<script>
function onloadHandler()
{
document.getElementById('e').setCustomValidity('foo');
document.getElementById('e').focus();
}
</script>
<body onload="onloadHandler();">
<button id='e' onfocus="document.documentElement.className='';"></button>
</body>
</html>

View File

@ -0,0 +1,7 @@
<!DOCTYPE>
<html class="reftest-wait">
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementsByTagName('input')[0].focus();">
<input class='invalid-ref' onfocus="document.documentElement.className='';">
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE>
<html class="reftest-wait">
<script>
function onloadHandler()
{
document.getElementById('e').setCustomValidity('foo');
document.getElementById('e').focus();
}
</script>
<body onload="onloadHandler();">
<input id='e' onfocus="document.documentElement.className='';">
</body>
</html>

View File

@ -4,3 +4,8 @@
== select.html select-ref.html
== fieldset.html fieldset-ref.html
== output.html output-ref.html
== input-focus.html input-focus-ref.html
== button-focus.html button-focus-ref.html
== textarea-focus.html textarea-focus-ref.html
== select-focus.html select-focus-ref.html
== textarea-focus.html textarea-focus-ref.html

View File

@ -0,0 +1,7 @@
<!DOCTYPE>
<html class="reftest-wait">
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementsByTagName('select')[0].focus();">
<select class='invalid-ref' onfocus="document.documentElement.className='';"></select>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE>
<html class="reftest-wait">
<script>
function onloadHandler()
{
document.getElementById('e').setCustomValidity('foo');
document.getElementById('e').focus();
}
</script>
<body onload="onloadHandler();">
<select id='e' onfocus="document.documentElement.className='';"></select>
</body>
</html>

View File

@ -2,6 +2,10 @@
box-shadow: 0 0 1.5px 1px red;
}
:not(output):-moz-focusring.invalid-ref {
box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
}
output.invalid-ref {
color: red;
}

View File

@ -0,0 +1,7 @@
<!DOCTYPE>
<html class="reftest-wait">
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementsByTagName('textarea')[0].focus();">
<textarea class='invalid-ref' onfocus="document.documentElement.className='';"></textarea>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE>
<html class="reftest-wait">
<script>
function onloadHandler()
{
document.getElementById('e').setCustomValidity('foo');
document.getElementById('e').focus();
}
</script>
<body onload="onloadHandler();">
<textarea id='e' onfocus="document.documentElement.className='';"></textarea>
</body>
</html>

View File

@ -629,6 +629,10 @@ input[type="file"] > input[type="text"] {
box-shadow: 0 0 1.5px 1px red;
}
:not(output):-moz-ui-invalid:-moz-focusring {
box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
}
output:-moz-ui-invalid {
color: red;
}