If focused node has overflow rect, moved as location of clipped rect.
authorYuni Jeong <yhnet.jung@samsung.com>
Tue, 22 Oct 2013 06:23:08 +0000 (15:23 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 24 Oct 2013 01:32:44 +0000 (01:32 +0000)
[Title] If focused node has overflow rect, moved as location of clipped rect.
[Issue#] N/A
[Problem] Position for showing selection popup menu is not properly.
[Cause] If focused node has overflow rect,
        location of clipped rect is not applied to location of focused node rect.
        Location should be moved as location of clipped rect.

[Solution] Moved as location of clipped rect.

Change-Id: I1f1968b36edb78e13b807bf6f07df38af65a5fb8

Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp

index 59ac06e..c021e25 100755 (executable)
@@ -1889,10 +1889,12 @@ void WebPage::calcFocusedRects(Node* node, Vector<IntRect>& rects) const
 
             if (layerRenderer->hasOverflowClip() && layerRenderer != currentRenderer) {
                 candidateRect.move(currentRenderer->offsetFromAncestorContainer(layerRenderer));
+                LayoutPoint baseLocation = candidateRect.location();
                 currentRenderer = layerRenderer;
 
                 ASSERT(layerRenderer->isBox());
                 candidateRect.intersect(toRenderBox(layerRenderer)->borderBoxRect());
+                originalLocation.move(candidateRect.location() - baseLocation);
 
                 if (candidateRect.isEmpty())
                     break;