Measure the impact of a propsed change to createAttribute()

There is a proposal to lowercase name in HTML documents:
https://bugzilla.mozilla.org/show_bug.cgi?id=1165851#c34

The counter in Document::createAttribute will catch any case where the
change would be observable, providing an upper limit to the risk.

The counter in Element::setAttributeNode is a reasonable proxy for the
case which is most likely problematic, namely trying to set a camelCase
Attr created by an HTML document on a non-HTML element, likely SVG, as
suggested by Boris Zbarsky:
https://bugzilla.mozilla.org/show_bug.cgi?id=1175031#c5

(The source of the Attr object need not be createAttribute, but extra
bookkeeping to determine that would either increase sizeof(Attr) or
require a new NodeFlags entry, so don't do that for now.)

BUG=502301

Review URL: https://codereview.chromium.org/1195583002

git-svn-id: svn://svn.chromium.org/blink/trunk@197549 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: 87dbebe76e0255ad2b9f0e6f6cc2e273da9d88ca
  1. third_party/