RESOLVED FIXED 91913
If select element is off screen horizontally, menu is either inappropriately resized or positioned offscreen
https://bugs.webkit.org/show_bug.cgi?id=91913
Summary If select element is off screen horizontally, menu is either inappropriately ...
Roger Fong
Reported 2012-07-20 17:53:07 PDT
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.
Attachments
Patch to fix Windows menu list positioning code. (4.34 KB, patch)
2012-07-23 13:03 PDT, Roger Fong
thorton: review-
thorton: commit-queue-
Remove executable property from test file (3.90 KB, patch)
2012-07-23 13:23 PDT, Roger Fong
no flags
Correction to make sure that if width is larger than screen width, left side of menus will always appear. Changed test file to use more generic menu items. (3.97 KB, patch)
2012-07-23 15:40 PDT, Roger Fong
no flags
Roger Fong
Comment 1 2012-07-20 17:54:40 PDT
Roger Fong
Comment 2 2012-07-23 13:03:10 PDT
Created attachment 153847 [details] Patch to fix Windows menu list positioning code.
Tim Horton
Comment 3 2012-07-23 13:11:41 PDT
Comment on attachment 153847 [details] Patch to fix Windows menu list positioning code. View in context: https://bugs.webkit.org/attachment.cgi?id=153847&action=review > ManualTests/win/select-menu-off-screen.html:8 > +<select id = "left-select-over" style="margin-left:-50px;"> You have extra space around the = > ManualTests/win/select-menu-off-screen.html:12 > + <option value="volvo">Volvo</option> > + <option value="saab">Saab</option> > + <option value="mercedes">Mercedes</option> > + <option value="audi">Audi</option> I wonder if we should use something more neutral than car manufacturers :) > ManualTests/win/select-menu-off-screen.html:14 > +<select id = "right-select-over" style="float:right; margin-right:-50px;"> You have extra space around the = > Source/WebCore/platform/win/PopupMenuWin.cpp:-382 > - if (popupRect.x() < screen.x()) { > - popupRect.setWidth(popupRect.width() - (screen.x() - popupRect.x())); What happens now if the popup is super wide?
Tim Horton
Comment 4 2012-07-23 13:12:16 PDT
You've got that executable flag set again. I wonder if there's something you can do in your svn config to stop that from happening.
Roger Fong
Comment 5 2012-07-23 13:23:35 PDT
Created attachment 153851 [details] Remove executable property from test file
WebKit Review Bot
Comment 6 2012-07-23 13:26:38 PDT
Attachment 153851 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'ChangeLog', u'ManualTests/win/select-menu-..." exit_code: 1 ManualTests/win/select-menu-off-screen.html:1: One or more unexpected \r (^M) found; better to use only a \n [whitespace/carriage_return] [1] Suppressing further [whitespace/carriage_return] reports for this file. Total errors found: 21 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Roger Fong
Comment 7 2012-07-23 13:53:09 PDT
If the width is too large it just flows off screen according to whichever case it first hits. I guess however that I may as well adjust the width. It should probably also always show the beginning of the menu entries.
Roger Fong
Comment 8 2012-07-23 15:40:56 PDT
Created attachment 153879 [details] Correction to make sure that if width is larger than screen width, left side of menus will always appear. Changed test file to use more generic menu items.
WebKit Review Bot
Comment 9 2012-07-23 17:48:24 PDT
Comment on attachment 153879 [details] Correction to make sure that if width is larger than screen width, left side of menus will always appear. Changed test file to use more generic menu items. Clearing flags on attachment: 153879 Committed r123411: <http://trac.webkit.org/changeset/123411>
WebKit Review Bot
Comment 10 2012-07-23 17:48:27 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.