Bug 28145 - novalidate/formnovalidate support
Summary: novalidate/formnovalidate support
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Michelangelo De Simone
URL: http://www.whatwg.org/specs/web-apps/...
Depends on:
Blocks: HTML5Forms 28649 28988
  Show dependency treegraph
Reported: 2009-08-10 06:27 PDT by Michelangelo De Simone
Modified: 2009-09-04 15:50 PDT (History)
2 users (show)

See Also:

Patch v1 (12.72 KB, patch)
2009-08-21 13:29 PDT, Michelangelo De Simone
no flags Details | Formatted Diff | Diff
Patch v.1a (15.07 KB, patch)
2009-08-21 17:46 PDT, Michelangelo De Simone
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michelangelo De Simone 2009-08-10 06:27:24 PDT
Support for such attributes should be implemented in WebKit. These attributes do nothing but "deactivate" validation on form elements.
Comment 1 Peter Kasting 2009-08-20 22:48:51 PDT
Sadly, much was lost on this bug due to database corruption.

The key points were: Michelangelo attached a patch for review; eseidel gave it r-, with the following comment:

--- Comment #10 from Eric Seidel <eric@webkit.org>  2009-08-20 17:21:28 PDT ---
(From update of attachment 35234)
These tests look pretty vacuous.  They would pass w/o any of the code changes
it seems.

+v = document.getElementsByName("victim");
+for (i = 0; i < v.length; i++) {
+    shouldBe("v[i].formNoValidate", "false");
+    v[i].formNoValidate = true;
+for (i = 0; i < v.length; i++)
+    shouldBe("v[i].formNoValidate", "true");

Personally I prefer to write js-only tests, instead of making manual templates
as you have done.  Meaning, if you convert your form dom creation into JS
calls, this whole test can just live in a single .js file in resources/ and you
can use make-script-test-wrappers to generate the wrapper for you.

It seems it would be more interesting to test what getAttribute('novalidate')
gets set to when you change the JS properties.
Comment 2 Michelangelo De Simone 2009-08-21 13:29:10 PDT
Created attachment 38391 [details]
Patch v1
Comment 3 Michelangelo De Simone 2009-08-21 16:12:33 PDT
Adele commented about the proposed patch: HTMLFormControlElement::isInNoValidateState() should land once it's being used.

Eliminating it, for now. But it shall be back.:)
Comment 4 Michelangelo De Simone 2009-08-21 17:46:01 PDT
Created attachment 38425 [details]
Patch v.1a
Comment 5 Peter Kasting 2009-08-21 18:17:47 PDT
Fixed in r47655.
Comment 6 Michelangelo De Simone 2009-08-21 18:57:53 PDT
Tree broken, investigating...
Comment 7 Michelangelo De Simone 2009-08-21 19:12:44 PDT
Fixed in r47658.

Committed patch was incomplete, modifications in HTMLFormControlElement.h present in the r+'ed patch were missing.;)