+2012-04-04 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ [Qt] Entire page highlighted on panning.
+ https://bugs.webkit.org/show_bug.cgi?id=83158
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::highlightPotentialActivation):
+
2012-04-04 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] QtWebKit2 should support Page Visibility API
IntPoint adjustedPoint;
if (point != IntPoint::zero()) {
+ Node* adjustedNode = 0;
#if ENABLE(TOUCH_ADJUSTMENT)
- mainframe->eventHandler()->bestClickableNodeForTouchPoint(point, IntSize(area.width() / 2, area.height() / 2), adjustedPoint, activationNode);
+ mainframe->eventHandler()->bestClickableNodeForTouchPoint(point, IntSize(area.width() / 2, area.height() / 2), adjustedPoint, adjustedNode);
#else
HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
- activationNode = result.innerNode();
-#endif
- if (activationNode && !activationNode->isFocusable()) {
- for (Node* node = activationNode; node; node = node->parentOrHostNode()) {
- if (node->isFocusable()) {
- activationNode = node;
- break;
- }
+ adjustedNode = result.innerNode();
+#endif
+ // Find the node to highlight. This is not the same as the node responding the tap gesture, because many
+ // pages has a global click handler and we do not want to highlight the body.
+ // Instead find the enclosing link or focusable element, or the last enclosing inline element.
+ for (Node* node = adjustedNode; node; node = node->parentOrHostNode()) {
+ if (node->isMouseFocusable() || node->isLink()) {
+ activationNode = node;
+ break;
}
+ if (node->renderer() && node->renderer()->isInline())
+ activationNode = node;
+ else if (activationNode)
+ break;
}
}