| Index: Source/web/WebViewImpl.cpp
|
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
|
| index d0e3c2cae7c998aec3438814e8836494037fac60..12980dbb9887db9ce69e7e70a5445a2659a6cbb0 100644
|
| --- a/Source/web/WebViewImpl.cpp
|
| +++ b/Source/web/WebViewImpl.cpp
|
| @@ -751,20 +751,31 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
|
| // Don't trigger a disambiguation popup when screencasting, since it's implemented outside of
|
| // compositor pipeline and is not being screencasted itself. This leads to bad user experience.
|
| if (event.data.tap.width > 0 && !shouldDisableDesktopWorkarounds() && !page()->inspectorController().screencastEnabled()) {
|
| - // FIXME: didTapMultipleTargets should just take a rect instead of
|
| - // an event.
|
| WebGestureEvent scaledEvent = event;
|
| scaledEvent.x = event.x / pageScaleFactor();
|
| scaledEvent.y = event.y / pageScaleFactor();
|
| scaledEvent.data.tap.width = event.data.tap.width / pageScaleFactor();
|
| scaledEvent.data.tap.height = event.data.tap.height / pageScaleFactor();
|
| - IntRect boundingBox(scaledEvent.x - scaledEvent.data.tap.width / 2, scaledEvent.y - scaledEvent.data.tap.height / 2, scaledEvent.data.tap.width, scaledEvent.data.tap.height);
|
| + IntRect boundingBox(
|
| + scaledEvent.x - scaledEvent.data.tap.width / 2,
|
| + scaledEvent.y - scaledEvent.data.tap.height / 2,
|
| + scaledEvent.data.tap.width,
|
| + scaledEvent.data.tap.height);
|
| +
|
| + WebSize pinchViewportOffset = pinchVirtualViewportEnabled() ?
|
| + flooredIntSize(page()->frameHost().pinchViewport().location()) : IntSize();
|
| +
|
| + // Keep bounding box relative to the main frame.
|
| + boundingBox.move(pinchViewportOffset);
|
| +
|
| Vector<IntRect> goodTargets;
|
| WillBeHeapVector<RawPtrWillBeMember<Node> > highlightNodes;
|
| findGoodTouchTargets(boundingBox, mainFrameImpl()->frame(), goodTargets, highlightNodes);
|
| // FIXME: replace touch adjustment code when numberOfGoodTargets == 1?
|
| // Single candidate case is currently handled by: https://bugs.webkit.org/show_bug.cgi?id=85101
|
| - if (goodTargets.size() >= 2 && m_client && m_client->didTapMultipleTargets(scaledEvent, goodTargets)) {
|
| + if (goodTargets.size() >= 2 && m_client
|
| + && m_client->didTapMultipleTargets(pinchViewportOffset, boundingBox, goodTargets)) {
|
| +
|
| enableTapHighlights(highlightNodes);
|
| for (size_t i = 0; i < m_linkHighlights.size(); ++i)
|
| m_linkHighlights[i]->startHighlightAnimationIfNeeded();
|
|
|