Bug 610415 - Make :-moz-ui-invalid and :-moz-ui-valid not applying when the form element has novalidate attribute set. r+a=sicking

This commit is contained in:
Mounir Lamouri
2010-12-17 15:26:24 -08:00
parent d3a9a1e5a4
commit 14f99c88ea
27 changed files with 239 additions and 16 deletions

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementById('b').setCustomValidity('foo');
document.documentElement.className = '';">
<form novalidate>
<button id='b' class='notinvalid'></button>
</form>
</body>
</html>

View File

@@ -10,3 +10,4 @@
== button-disabled-fieldset-1.html button-fieldset-ref.html
== button-disabled-fieldset-2.html button-fieldset-ref.html
== button-fieldset-legend.html button-fieldset-legend-ref.html
== button-novalidate.html button-ref.html

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html class="reftest-wait">
<!-- When the form has @novalidate, :-moz-ui-invalid doesn't apply. -->
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementById('i').value = '';
document.documentElement.className = '';">
<form novalidate>
<input id='i' class='notinvalid' required>
</form>
</body>
</html>

View File

@@ -41,4 +41,5 @@
== input-radio-dyn-valid-2.html success-ref.html
== input-radio-nogroup-required-valid.html success-ref.html
== input-radio-nogroup-required-invalid.html success-ref.html
== input-novalidate.html input-ref.html
# input type='hidden' shouldn't show

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementById('o').setCustomValidity('foo');
document.documentElement.className = '';">
<form novalidate>
<output id='o' class='notinvalid'>foo</output>
</form>
</body>
</html>

View File

@@ -1,2 +1,3 @@
== output-valid.html output-ref.html
== output-invalid.html output-ref.html
== output-novalidate.html output-ref.html

View File

@@ -15,3 +15,4 @@
== select-disabled-fieldset-1.html select-fieldset-ref.html
== select-disabled-fieldset-2.html select-fieldset-ref.html
== select-fieldset-legend.html select-fieldset-legend-ref.html
== select-novalidate.html select-ref.html

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html class="reftest-wait">
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementById('s').setCustomValidity('foo');
document.documentElement.className = '';">
<form novalidate>
<select id='s' class='notinvalid'></select>
</form>
</body>
</html>

View File

@@ -15,3 +15,4 @@
== textarea-required-invalid-changed.html textarea-ref.html
== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
== textarea-novalidate.html textarea-ref.html

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel='stylesheet' type='text/css' href='style.css'>
<body onload="document.getElementById('t').value = '';
document.documentElement.className = '';">
<form novalidate>
<textarea id='t' required class='notinvalid'></textarea>
</form>
</body>
</html>