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,9 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<form novalidate>
<button class='notvalid'></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 = 'foo';
document.documentElement.className = '';">
<form novalidate>
<input id='i' class='notvalid' required>
</form>
</body>
</html>

View File

@@ -40,4 +40,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-withtext-ref.html
# input type='hidden' shouldn't show

View File

@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<body>
<form novalidate>
<output class='notvalid'>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-required-ref.html

View File

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

View File

@@ -17,3 +17,4 @@
== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
== textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
== textarea-novalidate.html textarea-withtext-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 = 'foo';
document.documentElement.className = '';">
<form novalidate>
<textarea id='t' required class='notvalid'></textarea>
</form>
</body>
</html>