2011-04-07 Naoki Takano <takano.naoki@gmail.com>

        Reviewed by Adam Barth.

        [Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
        https://bugs.webkit.org/show_bug.cgi?id=57911
        http://code.google.com/p/chromium/issues/detail?id=78073

        Manual test added: manual-tests/autofill-popup-location.html

        Originally only height is checked so that it introduces the bug.
        So I changed it to check both width and height as size.

        * manual-tests/autofill-popup-location.html: Added.
        * platform/chromium/PopupMenuChromium.cpp:
        (WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0d12048d
2011-04-07 Naoki Takano <takano.naoki@gmail.com>
Reviewed by Adam Barth.
[Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
https://bugs.webkit.org/show_bug.cgi?id=57911
http://code.google.com/p/chromium/issues/detail?id=78073
Manual test added: manual-tests/autofill-popup-location.html
Originally only height is checked so that it introduces the bug.
So I changed it to check both width and height as size.
* manual-tests/autofill-popup-location.html: Added.
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().
2011-04-07 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
<html>
<head>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8">
<title>
Test autofill popup window shows at the correct location.
</title>
</head>
<body>
<h3>Test autofill popup window shows at the correct location.</h3>
<ol>
<li> Enter 'Always show bookmarks bar' in the following text input area.</li>
<li> Enter 'Test' in the text input area.</li>
<li> Press 'a' and make sure 'Always show bookmarks bar' is shown in autofill popup window.</li>
<li> Select all with pressing Ctrl-a.</li>
<li> Press 't' and make sure 'Test' is shown and the popup window location is correct.</li>
</ol>
<br>
<form><input name=q autofocus></form>
</body>
</html>
......@@ -571,10 +571,10 @@ void PopupContainer::refresh(const IntRect& targetControlRect)
location.move(0, targetControlRect.height());
listBox()->updateFromElement();
// Store the original height to check if we need to request the location.
int originalHeight = height();
// Store the original size to check if we need to request the location.
IntSize originalSize = size();
IntRect widgetRect = layoutAndCalculateWidgetRect(targetControlRect.height(), location);
if (originalHeight != widgetRect.height())
if (originalSize != widgetRect.size())
setFrameRect(widgetRect);
invalidate();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment