Bug 94086

Summary: [Chromium] Make the popup positioning code testable
Product: WebKit Reporter: Kent Tamura <tkent>
Component: New BugsAssignee: Kent Tamura <tkent>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, dglazkov, morrita, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 94087    
Bug Blocks:    
Attachments:
Description Flags
Patch 1
none
Patch 2 none

Description Kent Tamura 2012-08-15 01:58:51 PDT
We have complex logic in PopupContainer::layoutAndCalculateWidgetRect(). But we don't have automated tests for it.
Comment 1 Kent Tamura 2012-08-17 00:43:32 PDT
Created attachment 159028 [details]
Patch 1
Comment 2 WebKit Review Bot 2012-08-17 01:14:08 PDT
Comment on attachment 159028 [details]
Patch 1

Attachment 159028 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13518513
Comment 3 Kent Tamura 2012-08-17 01:22:07 PDT
Created attachment 159043 [details]
Patch 2

Fix signed-unsinged comparison
Comment 4 Hajime Morrita 2012-08-20 18:41:26 PDT
Comment on attachment 159043 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=159043&action=review

> Source/WebCore/platform/chromium/PopupContainer.h:122
> +    static IntRect layoutAndCalculateWidgetRectInternal(IntRect widgetRectInScreen, int targetControlHeight, const FloatRect& windowRect, const FloatRect& screen, bool isRTL, const int rtlOffset, PopupContent*, bool& needToResizeView);

This method has too many parameters. Probably these can be packed into a separate class then this method can be a part of that class.
Comment 5 Kent Tamura 2012-08-20 18:46:14 PDT
Comment on attachment 159043 [details]
Patch 2

View in context: https://bugs.webkit.org/attachment.cgi?id=159043&action=review

>> Source/WebCore/platform/chromium/PopupContainer.h:122
>> +    static IntRect layoutAndCalculateWidgetRectInternal(IntRect widgetRectInScreen, int targetControlHeight, const FloatRect& windowRect, const FloatRect& screen, bool isRTL, const int rtlOffset, PopupContent*, bool& needToResizeView);
> 
> This method has too many parameters. Probably these can be packed into a separate class then this method can be a part of that class.

Sounds good.  I might work on it later.
Comment 6 WebKit Review Bot 2012-08-20 19:34:04 PDT
Comment on attachment 159043 [details]
Patch 2

Clearing flags on attachment: 159043

Committed r126121: <http://trac.webkit.org/changeset/126121>
Comment 7 WebKit Review Bot 2012-08-20 19:34:08 PDT
All reviewed patches have been landed.  Closing bug.