.: If select element in Windows is off screen horizontally,
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2012 00:48:06 +0000 (00:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2012 00:48:06 +0000 (00:48 +0000)
commit716a14bd9731e54dc2c46235e1e77b4b4a2949e4
tree88873b1ddc9b9616ddb571f29d9b628f5eec29e3
parent61db1a4959f5d937296c8733b1ad03c688cdd48f
.: If select element in Windows is off screen horizontally,
menu is either inappropriately resized or positioned offscreen.
https://bugs.webkit.org/show_bug.cgi?id=91913
<rdar://problem/7611229>

Patch by Roger Fong <roger_fong@apple.com> on 2012-07-23
Reviewed by Tim Horton.

Add a manual test to verify that popup menus render in the correct place.

* ManualTests/win/select-menu-off-screen.html: Added.

Source/WebCore: On Windows, if select element is off screen horizontally,
menu is either inappropriately resized or positioned offscreen.
https://bugs.webkit.org/show_bug.cgi?id=91913
<rdar://problem/7611229>

Patch by Roger Fong <roger_fong@apple.com> on 2012-07-23
Reviewed by Tim Horton.

If the select element is positioned off the edge of the screen to the left,
the menu is resized. It should not be resized, just shifted to remain on the screen.
If the select element is positioned off the edge of the screen to the right,
the menu goes off screen instead of being shifted over to appear on screen.
This problem only occurs on Windows.

Test: ManualTests/win/select-menu-off-screen.html

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
Modified final horizontal position calculation code to position
popup menu on screen if it would otherwise go off.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/win/select-menu-off-screen.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/win/PopupMenuWin.cpp