Bug 94086 - [Chromium] Make the popup positioning code testable
Summary: [Chromium] Make the popup positioning code testable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on: 94087
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-15 01:58 PDT by Kent Tamura
Modified: 2012-08-20 19:34 PDT (History)
4 users (show)

See Also:


Attachments
Patch 1 (15.30 KB, patch)
2012-08-17 00:43 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch 2 (15.30 KB, patch)
2012-08-17 01:22 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.