WebCore:
authortristan <tristan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2007 19:22:11 +0000 (19:22 +0000)
committertristan <tristan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2007 19:22:11 +0000 (19:22 +0000)
commit859e284350fdd6aa155029a796652ceceffd380c
tree84dee3c214688b91536ca5de89fffd4c280c4db9
parentba920c54db6d0c84c34a46e218903a3efeec3c28
WebCore:

        Reviewed by Darin Adler.

        <rdar://problem/5555053> REGRESSION:9A581: Window disappears when opening http://research.microsoft.com/users/darkok/
        The problem was caused by checkin r24654. This change moved explicit bounds checking into adjustWindowRect
        but failed to account for bounds checking (instead replaced with bounds clipping).  This caused issues
        when NaN was used. This patch goes one step further and does NaN checking to prevent the possibility of
        setting window bounds to NaN before an update occurs.

        Test: fast/dom/Window/window-resize-nan.html

        * bindings/js/kjs_window.cpp:
        (KJS::adjustWindowRect):
        Added a new parameter, pendingChanges, which takes pending changes to the window
        rect, and if they are valid (not NaN) sets them on window.

        (KJS::WindowFunc::callAsFunction):
        Adjusted uses of adjustWindowRect to take new update parameter.

LayoutTests:

        Reviewed by Darin Adler.

        Added new test cases to handle non-number input to window adjusting
        functions like resizeTo, resizeBy, moveTo, and moveBy for
        <rdar://problem/5555053>.

        * fast/dom/Window/window-resize-nan-expected.txt: Added.
        * fast/dom/Window/window-resize-nan.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-resize-nan-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-resize-nan.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bindings/js/kjs_window.cpp