[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
commit-queue at webkit.org
commit-queue at webkit.org
Mon Feb 21 00:37:16 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit cf6148354677d6ced376df31bd1c5e2d642c755d
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 2 08:50:41 2011 +0000
2011-02-02 Naoki Takano <takano.naoki at gmail.com>
Reviewed by Kent Tamura.
Fix popup menu RTL bug introduced by Changeset 75982.
https://bugs.webkit.org/show_bug.cgi?id=53567
PopupMenuChromium::layout() calculates X position according to RTL or not. So Change the X position calculation in layoutAndCalculateWidgetRect().
No new tests. However we can check manually with select_dropdown_box_alignment.html, autofill_alignment.html, select_alignment.html, select_dropdown_box_alignment.html, autofill-popup-width-and-item-direction.html
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupContainer::layoutAndCalculateWidgetRect): Fix calculation of x position, because layout() considers RTL. And change the parameter from both X and Y positions to only Y position.
(WebCore::PopupContainer::showPopup): Change the passing parameter.
(WebCore::PopupContainer::refresh): Change the passing parameter.
* platform/chromium/PopupMenuChromium.h: Change the parameter declaration.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 6c4a5d8..5ad01a9 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2011-02-02 Naoki Takano <takano.naoki at gmail.com>
+
+ Reviewed by Kent Tamura.
+
+ Fix popup menu RTL bug introduced by Changeset 75982.
+ https://bugs.webkit.org/show_bug.cgi?id=53567
+
+ PopupMenuChromium::layout() calculates X position according to RTL or not. So Change the X position calculation in layoutAndCalculateWidgetRect().
+
+ No new tests. However we can check manually with select_dropdown_box_alignment.html, autofill_alignment.html, select_alignment.html, select_dropdown_box_alignment.html, autofill-popup-width-and-item-direction.html
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Fix calculation of x position, because layout() considers RTL. And change the parameter from both X and Y positions to only Y position.
+ (WebCore::PopupContainer::showPopup): Change the passing parameter.
+ (WebCore::PopupContainer::refresh): Change the passing parameter.
+ * platform/chromium/PopupMenuChromium.h: Change the parameter declaration.
+
2011-02-02 Alejandro G. Castro <alex at igalia.com>
Reviewed by Martin Robinson.
diff --git a/Source/WebCore/platform/chromium/PopupMenuChromium.cpp b/Source/WebCore/platform/chromium/PopupMenuChromium.cpp
index 7bbc0bb..18a2819 100644
--- a/Source/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/Source/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -329,7 +329,7 @@ PopupContainer::~PopupContainer()
removeChild(m_listBox.get());
}
-IntRect PopupContainer::layoutAndCalculateWidgetRect(int targetControlHeight, const IntPoint& popupInitialCoordinate)
+IntRect PopupContainer::layoutAndCalculateWidgetRect(int targetControlHeight, int popupInitialY)
{
// Reset the max height to its default value, it will be recomputed below
// if necessary.
@@ -349,7 +349,9 @@ IntRect PopupContainer::layoutAndCalculateWidgetRect(int targetControlHeight, co
// If the popup would extend past the bottom of the screen, open upwards
// instead.
FloatRect screen = screenAvailableRect(m_frameView.get());
- widgetRect = chromeClient->windowToScreen(IntRect(popupInitialCoordinate, targetSize));
+ // Use this::x() for location because RTL position is considered
+ // in layout().
+ widgetRect = chromeClient->windowToScreen(IntRect(x(), popupInitialY, targetSize.width(), targetSize.height()));
if (widgetRect.bottom() > static_cast<int>(screen.bottom())) {
if (widgetRect.y() - widgetRect.height() - targetControlHeight > 0) {
// There is enough room to open upwards.
@@ -382,7 +384,7 @@ void PopupContainer::showPopup(FrameView* view)
ChromeClientChromium* chromeClient = chromeClientChromium();
if (chromeClient) {
IntRect popupRect = frameRect();
- chromeClient->popupOpened(this, layoutAndCalculateWidgetRect(popupRect.height(), popupRect.location()), false);
+ chromeClient->popupOpened(this, layoutAndCalculateWidgetRect(popupRect.height(), popupRect.y()), false);
m_popupOpen = true;
}
@@ -580,7 +582,7 @@ void PopupContainer::refresh(const IntRect& targetControlRect)
listBox()->updateFromElement();
// Store the original height to check if we need to request the location.
int originalHeight = height();
- IntRect widgetRect = layoutAndCalculateWidgetRect(targetControlRect.height(), location);
+ IntRect widgetRect = layoutAndCalculateWidgetRect(targetControlRect.height(), location.y());
if (originalHeight != widgetRect.height())
setFrameRect(widgetRect);
diff --git a/Source/WebCore/platform/chromium/PopupMenuChromium.h b/Source/WebCore/platform/chromium/PopupMenuChromium.h
index f326b48..84810c7 100644
--- a/Source/WebCore/platform/chromium/PopupMenuChromium.h
+++ b/Source/WebCore/platform/chromium/PopupMenuChromium.h
@@ -194,7 +194,7 @@ private:
void paintBorder(GraphicsContext*, const IntRect&);
// Layout and calculate popup widget size and location and returns it as IntRect.
- IntRect layoutAndCalculateWidgetRect(int targetControlHeight, const IntPoint& popupInitialCoordinate);
+ IntRect layoutAndCalculateWidgetRect(int targetControlHeight, int popupInitialY);
// Returns the ChromeClient of the page this popup is associated with.
ChromeClientChromium* chromeClientChromium();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list