From 08d6336b53efa0268ae2c987347fb83e3b72b298 Mon Sep 17 00:00:00 2001 From: "prathmesh.m" Date: Tue, 23 Apr 2013 00:35:41 +0530 Subject: [PATCH] Improper position of selection handlers on scroll [Title] Improper position of selection handlers on scroll [Issue#] WEB-2943 [Problem] When a long text is selcted and then the page is scrolled with the selection the handlers get algned to start of the view port insteed of start of the selection [Cause] Invalid point calculation of the handlers if the selection rect does not fall in the view port. So the first intersection point was considred for the calculation which was the start of view port [Solution] This calculation is not required. The rect which is obtained is including all the text rects Change-Id: I66a484269eee252605c1b733a5d9be5cc7d86802 --- Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp b/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp index 383c515..3144b36 100755 --- a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp +++ b/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp @@ -1397,19 +1397,8 @@ void WebPage::getSelectionHandlers(IntRect& leftRect, IntRect& rightRect) RefPtr selectedRange = focusedFrame->selection()->toNormalizedRange(); - Vector rects, tempRects; - selectedRange->boundingBoxEx(tempRects, true); - - IntRect boundsRect = enclosingIntRect(focusedFrame->selection()->bounds()); - for (size_t i = 0; i < tempRects.size(); i++) { - if (boundsRect.contains(tempRects[i])) - rects.append(tempRects[i]); - else { - tempRects[i].intersect(boundsRect); - if (!tempRects[i].isEmpty()) - rects.append(tempRects[i]); - } - } + Vector rects; + selectedRange->boundingBoxEx(rects, true); unsigned size = rects.size(); if (size > 0) { -- 2.7.4