Experiment with restricting form submission with open elements.

HTML's parsing mechanism will automatically close form controls at the
end of a file. This is fine from a parsing perspective, but the behavior
does enable dangling markup attacks, such as those described in
http://www.thespanner.co.uk/2011/12/21/html-scriptless-attacks/ and
section 2 of http://lcamtuf.coredump.cx/postxss/.

Based on some discussion at https://github.com/whatwg/html/issues/2253,
this patch adds metrics to measure how often this happens in the wild
for `<textarea>` and `<select>` elements, and an experimental flag which
prevents form submission in the presence of those elements if they're
closed by reaching the end-of-file.

BUG=680462

Review-Url: https://codereview.chromium.org/2628723004
Cr-Commit-Position: refs/heads/master@{#443544}
12 files changed