WindowFeatures arguments shoud ignore invalid characters in values

Original patch from http://trac.webkit.org/changeset/169849

We were getting the length of the string before calling lower() on
it but we were looping over the new string which might have a
different length than the original.

BUG=383704

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176235 bbb929c8-8fbe-4397-9dbb-9b2b20218538