From 09c3cf7ed418fa47dec94cdf074f4359ad0ae36a Mon Sep 17 00:00:00 2001 From: Taeyun An Date: Wed, 12 Jun 2013 23:30:00 +0900 Subject: [PATCH] Fix the position of the magnifier for text selection [Title] Fix the position of the magnifier for text selection [Issue#] P130610-4150 [Problem] the magnifier for text selection was displayed at the invalid postion in the email viewer in landscape mode [Cause] the position of the view was calculcated [Solution] add the position of the view when calculcating the position of the magnifier Change-Id: Ib426df956b3b1c0c7939843fc19ebee82a8f5a6f --- .../API/efl/tizen/TextSelectionMagnifier.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionMagnifier.cpp b/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionMagnifier.cpp index 7d98fa1..2d28d03 100755 --- a/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionMagnifier.cpp +++ b/Source/WebKit2/UIProcess/API/efl/tizen/TextSelectionMagnifier.cpp @@ -141,20 +141,20 @@ static int s_defaultEdjeHeight = 177; void TextSelectionMagnifier::move(const IntPoint& point) { - int viewWidth, viewHeight; - evas_object_geometry_get(m_viewImpl->view(), 0, 0, &viewWidth, &viewHeight); + int viewX, viewY, viewWidth, viewHeight; + evas_object_geometry_get(m_viewImpl->view(), &viewX, &viewY, &viewWidth, &viewHeight); int xPosition = point.x(); - if (xPosition < (m_width / 2)) - xPosition = m_width / 2 + s_magnifierMargin; - if (xPosition > viewWidth - (m_width / 2)) - xPosition = viewWidth - (m_width / 2) - s_magnifierMargin; + if (xPosition < viewX + (m_width / 2)) + xPosition = viewX + m_width / 2 + s_magnifierMargin; + if (xPosition > viewX + viewWidth - (m_width / 2)) + xPosition = viewX + viewWidth - (m_width / 2) - s_magnifierMargin; int yPosition = point.y() - ((float)s_magnifierOffsetY * ((float)m_edjeHeight / s_defaultEdjeHeight)); - if (yPosition < (m_height / 2)) - yPosition = m_height / 2; - if (yPosition > viewHeight - (m_height / 2)) - yPosition = viewHeight - (m_height / 2); + if (yPosition < viewY) + yPosition = viewY; + if (yPosition > viewY + viewHeight) + yPosition = viewY + viewHeight; evas_object_move(m_magnifier, xPosition, yPosition); } -- 2.7.4