WindowFeatures arguments shoud ignore invalid characters in values
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 22:41:03 +0000 (22:41 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 22:41:03 +0000 (22:41 +0000)
commitc985267ab8fffcdd05c64930162175d89c279c8a
tree1063c452a4f9912d911d37b028c418a532f15f02
parent78cf9138c3cff2cd5d4890e527bc31fea8080b7a
WindowFeatures arguments shoud ignore invalid characters in values
<http://webkit.org/b/133703>
<rdar://problem/17254118>

Reviewed by Andy Estes.

Source/WebCore:

Test: fast/dom/Window/window-property-invalid-characters-ignored.html

* page/WindowFeatures.cpp:
(WebCore::WindowFeatures::WindowFeatures): Set |length| based on
|buffer|, not |features|.  Switch to using a for loop.  Switch
to unsigned types since we are working with positive offsets
into a String.

LayoutTests:

* fast/dom/Window/resources/window-property-invalid-characters-ignored.html: Added.
* fast/dom/Window/window-property-invalid-characters-ignored-expected.txt: Added.
* fast/dom/Window/window-property-invalid-characters-ignored.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/resources/window-property-invalid-characters-ignored.html [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-property-invalid-characters-ignored-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-property-invalid-characters-ignored.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/WindowFeatures.cpp