[iOS][WK2] Add tap highlight on the simple UITapGestureRecognizer
[WebKit-https.git] / Source / WebKit2 / UIProcess / ios / WebPageProxyIOS.mm
1 /*
2  * Copyright (C) 2012 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #import "config.h"
27 #import "WebPageProxy.h"
28
29 #if PLATFORM(IOS)
30
31 #import "APIUIClient.h"
32 #import "DataReference.h"
33 #import "EditingRange.h"
34 #import "NativeWebKeyboardEvent.h"
35 #import "PageClient.h"
36 #import "RemoteLayerTreeTransaction.h"
37 #import "ViewUpdateDispatcherMessages.h"
38 #import "WKBrowsingContextControllerInternal.h"
39 #import "WebContextUserMessageCoders.h"
40 #import "WebKitSystemInterfaceIOS.h"
41 #import "WebPageMessages.h"
42 #import "WebProcessProxy.h"
43 #import "WebVideoFullscreenManagerProxy.h"
44 #import <WebCore/NotImplemented.h>
45 #import <WebCore/SharedBuffer.h>
46 #import <WebCore/UserAgent.h>
47
48 #if USE(QUICK_LOOK)
49 #import "APILoaderClient.h"
50 #import <wtf/text/WTFString.h>
51 #endif
52
53 using namespace WebCore;
54
55 namespace WebKit {
56
57 void WebPageProxy::platformInitialize()
58 {
59 }
60
61 static String userVisibleWebKitVersionString()
62 {
63     // If the version is longer than 3 digits then the leading digits represent the version of the OS. Our user agent
64     // string should not include the leading digits, so strip them off and report the rest as the version. <rdar://problem/4997547>
65     NSString *fullVersion = [[NSBundle bundleForClass:NSClassFromString(@"WKView")] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
66     NSRange nonDigitRange = [fullVersion rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]];
67     if (nonDigitRange.location == NSNotFound && fullVersion.length > 3)
68         return [fullVersion substringFromIndex:fullVersion.length - 3];
69     if (nonDigitRange.location != NSNotFound && nonDigitRange.location > 3)
70         return [fullVersion substringFromIndex:nonDigitRange.location - 3];
71     return fullVersion;
72 }
73
74 String WebPageProxy::standardUserAgent(const String& applicationName)
75 {
76     return standardUserAgentWithApplicationName(applicationName, userVisibleWebKitVersionString());
77 }
78
79 void WebPageProxy::getIsSpeaking(bool&)
80 {
81     notImplemented();
82 }
83
84 void WebPageProxy::speak(const String&)
85 {
86     notImplemented();
87 }
88
89 void WebPageProxy::stopSpeaking()
90 {
91     notImplemented();
92 }
93
94 void WebPageProxy::searchWithSpotlight(const String&)
95 {
96     notImplemented();
97 }
98
99 void WebPageProxy::searchTheWeb(const String&)
100 {
101     notImplemented();
102 }
103
104 void WebPageProxy::windowAndViewFramesChanged(const FloatRect&, const FloatPoint&)
105 {
106     notImplemented();
107 }
108
109 String WebPageProxy::stringSelectionForPasteboard()
110 {
111     notImplemented();
112     return String();
113 }
114
115 PassRefPtr<WebCore::SharedBuffer> WebPageProxy::dataSelectionForPasteboard(const String&)
116 {
117     notImplemented();
118     return 0;
119 }
120
121 bool WebPageProxy::readSelectionFromPasteboard(const String&)
122 {
123     notImplemented();
124     return false;
125 }
126
127 void WebPageProxy::performDictionaryLookupAtLocation(const WebCore::FloatPoint&)
128 {
129     notImplemented();
130 }
131
132 void WebPageProxy::gestureCallback(const WebCore::IntPoint& point, uint32_t gestureType, uint32_t gestureState, uint32_t flags, uint64_t callbackID)
133 {
134     RefPtr<GestureCallback> callback = m_gestureCallbacks.take(callbackID);
135     if (!callback) {
136         ASSERT_NOT_REACHED();
137         return;
138     }
139     
140     callback->performCallbackWithReturnValue(point, gestureType, gestureState, flags);
141 }
142
143 void WebPageProxy::touchesCallback(const WebCore::IntPoint& point, uint32_t touches, uint64_t callbackID)
144 {
145     RefPtr<TouchesCallback> callback = m_touchesCallbacks.take(callbackID);
146     if (!callback) {
147         ASSERT_NOT_REACHED();
148         return;
149     }
150
151     callback->performCallbackWithReturnValue(point, touches);
152 }
153
154 void WebPageProxy::autocorrectionDataCallback(const Vector<WebCore::FloatRect>& rects, const String& fontName, float fontSize, uint64_t fontTraits, uint64_t callbackID)
155 {
156     RefPtr<AutocorrectionDataCallback> callback = m_autocorrectionCallbacks.take(callbackID);
157     if (!callback) {
158         ASSERT_NOT_REACHED();
159         return;
160     }
161
162     callback->performCallbackWithReturnValue(rects, fontName, fontSize, fontTraits);
163 }
164
165 void WebPageProxy::dictationContextCallback(const String& selectedText, const String& beforeText, const String& afterText, uint64_t callbackID)
166 {
167     RefPtr<DictationContextCallback> callback = m_dictationContextCallbacks.take(callbackID);
168     if (!callback) {
169         ASSERT_NOT_REACHED();
170         return;
171     }
172
173     callback->performCallbackWithReturnValue(selectedText, beforeText, afterText);
174 }
175
176 void WebPageProxy::autocorrectionContextCallback(const String& beforeText, const String& markedText, const String& selectedText, const String& afterText, uint64_t location, uint64_t length, uint64_t callbackID)
177 {
178     RefPtr<AutocorrectionContextCallback> callback = m_autocorrectionContextCallbacks.take(callbackID);
179     if (!callback) {
180         ASSERT_NOT_REACHED();
181         return;
182     }
183
184     callback->performCallbackWithReturnValue(beforeText, markedText, selectedText, afterText, location, length);
185 }
186
187 bool WebPageProxy::updateVisibleContentRects(const VisibleContentRectUpdateInfo& visibleContentRectUpdateInfo)
188 {
189     if (visibleContentRectUpdateInfo == m_lastVisibleContentRectUpdate)
190         return false;
191
192     m_lastVisibleContentRectUpdate = visibleContentRectUpdateInfo;
193     m_process->send(Messages::ViewUpdateDispatcher::VisibleContentRectUpdate(m_pageID, visibleContentRectUpdateInfo), 0);
194     return true;
195 }
196
197 void WebPageProxy::dynamicViewportSizeUpdate(const FloatSize& minimumLayoutSize, const FloatRect& targetExposedContentRect, const FloatRect& targetUnobscuredRect, double targetScale)
198 {
199     m_process->send(Messages::WebPage::DynamicViewportSizeUpdate(minimumLayoutSize, targetExposedContentRect, targetUnobscuredRect, targetScale), m_pageID);
200 }
201
202 void WebPageProxy::setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize& size)
203 {
204     m_process->send(Messages::WebPage::SetViewportConfigurationMinimumLayoutSize(size), m_pageID);
205 }
206
207 void WebPageProxy::setMinimumLayoutSizeForMinimalUI(const WebCore::FloatSize& size)
208 {
209     m_process->send(Messages::WebPage::SetMinimumLayoutSizeForMinimalUI(size), m_pageID);
210 }
211
212 void WebPageProxy::didCommitLayerTree(const WebKit::RemoteLayerTreeTransaction& layerTreeTransaction)
213 {
214     m_pageExtendedBackgroundColor = layerTreeTransaction.pageExtendedBackgroundColor();
215
216     m_pageClient.didCommitLayerTree(layerTreeTransaction);
217 }
218
219 void WebPageProxy::selectWithGesture(const WebCore::IntPoint point, WebCore::TextGranularity granularity, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback> callback)
220 {
221     if (!isValid()) {
222         callback->invalidate();
223         return;
224     }
225     
226     uint64_t callbackID = callback->callbackID();
227     m_gestureCallbacks.set(callbackID, callback);
228     m_process->send(Messages::WebPage::SelectWithGesture(point, (uint32_t)granularity, gestureType, gestureState, callbackID), m_pageID);
229 }
230
231 void WebPageProxy::updateSelectionWithTouches(const WebCore::IntPoint point, uint32_t touches, bool baseIsStart, PassRefPtr<TouchesCallback> callback)
232 {
233     if (!isValid()) {
234         callback->invalidate();
235         return;
236     }
237
238     uint64_t callbackID = callback->callbackID();
239     m_touchesCallbacks.set(callbackID, callback);
240     m_process->send(Messages::WebPage::UpdateSelectionWithTouches(point, touches, baseIsStart, callbackID), m_pageID);
241 }
242     
243 void WebPageProxy::replaceDictatedText(const String& oldText, const String& newText)
244 {
245     m_process->send(Messages::WebPage::ReplaceDictatedText(oldText, newText), m_pageID);
246 }
247
248 void WebPageProxy::replaceSelectedText(const String& oldText, const String& newText)
249 {
250     m_process->send(Messages::WebPage::ReplaceSelectedText(oldText, newText), m_pageID);
251 }
252
253 void WebPageProxy::requestAutocorrectionData(const String& textForAutocorrection, PassRefPtr<AutocorrectionDataCallback> callback)
254 {
255     if (!isValid()) {
256         callback->invalidate();
257         return;
258     }
259
260     uint64_t callbackID = callback->callbackID();
261     m_autocorrectionCallbacks.set(callbackID, callback);
262     m_process->send(Messages::WebPage::RequestAutocorrectionData(textForAutocorrection, callbackID), m_pageID);
263 }
264
265 void WebPageProxy::applyAutocorrection(const String& correction, const String& originalText, PassRefPtr<StringCallback> callback)
266 {
267     if (!isValid()) {
268         callback->invalidate();
269         return;
270     }
271
272     uint64_t callbackID = callback->callbackID();
273     m_stringCallbacks.set(callbackID, callback);
274     m_process->send(Messages::WebPage::ApplyAutocorrection(correction, originalText, callbackID), m_pageID);
275 }
276
277 bool WebPageProxy::applyAutocorrection(const String& correction, const String& originalText)
278 {
279     bool autocorrectionApplied = false;
280     m_process->sendSync(Messages::WebPage::SyncApplyAutocorrection(correction, originalText), Messages::WebPage::SyncApplyAutocorrection::Reply(autocorrectionApplied), m_pageID);
281     return autocorrectionApplied;
282 }
283
284 void WebPageProxy::requestDictationContext(PassRefPtr<DictationContextCallback> callback)
285 {
286     if (!isValid()) {
287         callback->invalidate();
288         return;
289     }
290
291     uint64_t callbackID = callback->callbackID();
292     m_dictationContextCallbacks.set(callbackID, callback);
293     m_process->send(Messages::WebPage::RequestDictationContext(callbackID), m_pageID);
294 }
295
296 void WebPageProxy::requestAutocorrectionContext(PassRefPtr<AutocorrectionContextCallback> callback)
297 {
298     if (!isValid()) {
299         callback->invalidate();
300         return;
301     }
302
303     uint64_t callbackID = callback->callbackID();
304     m_autocorrectionContextCallbacks.set(callbackID, callback);
305     m_process->send(Messages::WebPage::RequestAutocorrectionContext(callbackID), m_pageID);
306 }
307
308 void WebPageProxy::getAutocorrectionContext(String& beforeContext, String& markedText, String& selectedText, String& afterContext, uint64_t& location, uint64_t& length)
309 {
310     m_process->sendSync(Messages::WebPage::GetAutocorrectionContext(), Messages::WebPage::GetAutocorrectionContext::Reply(beforeContext, markedText, selectedText, afterContext, location, length), m_pageID);
311 }
312
313 void WebPageProxy::selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, PassRefPtr<GestureCallback> callback)
314 {
315     if (!isValid()) {
316         callback->invalidate();
317         return;
318     }
319
320     uint64_t callbackID = callback->callbackID();
321     m_gestureCallbacks.set(callbackID, callback);
322     m_process->send(Messages::WebPage::SelectWithTwoTouches(from, to, gestureType, gestureState, callbackID), m_pageID);
323 }
324
325 void WebPageProxy::updateBlockSelectionWithTouch(const WebCore::IntPoint point, uint32_t touch, uint32_t handlePosition)
326 {
327     m_process->send(Messages::WebPage::UpdateBlockSelectionWithTouch(point, touch, handlePosition), m_pageID);
328 }
329
330 void WebPageProxy::didReceivePositionInformation(const InteractionInformationAtPosition& info)
331 {
332     m_pageClient.positionInformationDidChange(info);
333 }
334
335 void WebPageProxy::getPositionInformation(const WebCore::IntPoint& point, InteractionInformationAtPosition& info)
336 {
337     m_process->sendSync(Messages::WebPage::GetPositionInformation(point), Messages::WebPage::GetPositionInformation::Reply(info), m_pageID);
338 }
339
340 void WebPageProxy::requestPositionInformation(const WebCore::IntPoint& point)
341 {
342     m_process->send(Messages::WebPage::RequestPositionInformation(point), m_pageID);
343 }
344
345 void WebPageProxy::startInteractionWithElementAtPosition(const WebCore::IntPoint& point)
346 {
347     m_process->send(Messages::WebPage::StartInteractionWithElementAtPosition(point), m_pageID);
348 }
349
350 void WebPageProxy::stopInteraction()
351 {
352     m_process->send(Messages::WebPage::StopInteraction(), m_pageID);
353 }
354
355 void WebPageProxy::performActionOnElement(uint32_t action)
356 {
357     m_process->send(Messages::WebPage::PerformActionOnElement(action), m_pageID);
358 }
359
360 void WebPageProxy::saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize)
361 {
362     RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(imageHandle, SharedMemory::ReadOnly);
363     RefPtr<SharedBuffer> buffer = SharedBuffer::create(static_cast<unsigned char*>(sharedMemoryBuffer->data()), imageSize);
364     m_pageClient.saveImageToLibrary(buffer);
365 }
366
367 void WebPageProxy::didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold)
368 {
369     m_pageClient.didUpdateBlockSelectionWithTouch(touch, flags, growThreshold, shrinkThreshold);
370 }
371
372 void WebPageProxy::applicationWillEnterForeground()
373 {
374     m_process->send(Messages::WebPage::ApplicationWillEnterForeground(), m_pageID);
375 }
376
377 void WebPageProxy::applicationWillResignActive()
378 {
379     m_process->send(Messages::WebPage::ApplicationWillResignActive(), m_pageID);
380 }
381
382 void WebPageProxy::applicationDidBecomeActive()
383 {
384     m_process->send(Messages::WebPage::ApplicationDidBecomeActive(), m_pageID);
385 }
386
387 void WebPageProxy::notifyRevealedSelection()
388 {
389     m_pageClient.selectionDidChange();
390 }
391
392 void WebPageProxy::extendSelection(WebCore::TextGranularity granularity)
393 {
394     m_process->send(Messages::WebPage::ExtendSelection(static_cast<uint32_t>(granularity)), m_pageID);
395 }
396
397 void WebPageProxy::interpretKeyEvent(const EditorState& state, bool isCharEvent, bool& handled)
398 {
399     m_editorState = state;
400     handled = m_pageClient.interpretKeyEvent(m_keyEventQueue.first(), isCharEvent);
401 }
402
403 // Complex text input support for plug-ins.
404 void WebPageProxy::sendComplexTextInputToPlugin(uint64_t, const String&)
405 {
406     notImplemented();
407 }
408
409 void WebPageProxy::setSmartInsertDeleteEnabled(bool)
410 {
411     notImplemented();
412 }
413
414 void WebPageProxy::registerWebProcessAccessibilityToken(const IPC::DataReference& data)
415 {
416     m_pageClient.accessibilityWebProcessTokenReceived(data);
417 }    
418
419 void WebPageProxy::makeFirstResponder()
420 {
421     notImplemented();
422 }
423
424 void WebPageProxy::registerUIProcessAccessibilityTokens(const IPC::DataReference& elementToken, const IPC::DataReference& windowToken)
425 {
426     if (!isValid())
427         return;
428     
429     process().send(Messages::WebPage::RegisterUIProcessAccessibilityTokens(elementToken, windowToken), m_pageID);
430 }
431
432 void WebPageProxy::pluginFocusOrWindowFocusChanged(uint64_t, bool)
433 {
434     notImplemented();
435 }
436
437 void WebPageProxy::setPluginComplexTextInputState(uint64_t, uint64_t)
438 {
439     notImplemented();
440 }
441
442 void WebPageProxy::executeSavedCommandBySelector(const String&, bool&)
443 {
444     notImplemented();
445 }
446
447 bool WebPageProxy::shouldDelayWindowOrderingForEvent(const WebKit::WebMouseEvent&)
448 {
449     notImplemented();
450     return false;
451 }
452
453 bool WebPageProxy::acceptsFirstMouse(int, const WebKit::WebMouseEvent&)
454 {
455     notImplemented();
456     return false;
457 }
458
459 void WebPageProxy::willStartUserTriggeredZooming()
460 {
461     process().send(Messages::WebPage::WillStartUserTriggeredZooming(), m_pageID);
462 }
463
464 void WebPageProxy::potentialTapAtPosition(const WebCore::FloatPoint& position, uint64_t& requestID)
465 {
466     process().send(Messages::WebPage::PotentialTapAtPosition(requestID, position), m_pageID);
467 }
468
469 void WebPageProxy::commitPotentialTap()
470 {
471     process().send(Messages::WebPage::CommitPotentialTap(), m_pageID);
472 }
473
474 void WebPageProxy::cancelPotentialTap()
475 {
476     process().send(Messages::WebPage::CancelPotentialTap(), m_pageID);
477 }
478
479 void WebPageProxy::tapHighlightAtPosition(const WebCore::FloatPoint& position, uint64_t& requestID)
480 {
481     process().send(Messages::WebPage::TapHighlightAtPosition(requestID, position), m_pageID);
482 }
483
484 void WebPageProxy::blurAssistedNode()
485 {
486     process().send(Messages::WebPage::BlurAssistedNode(), m_pageID);
487 }
488
489 FloatSize WebPageProxy::screenSize()
490 {
491     return FloatSize(WKGetScreenSize());
492 }
493
494 FloatSize WebPageProxy::availableScreenSize()
495 {
496     return FloatSize(WKGetAvailableScreenSize());
497 }
498     
499 float WebPageProxy::textAutosizingWidth()
500 {
501     return WKGetScreenSize().width;
502 }
503     
504 void WebPageProxy::dynamicViewportUpdateChangedTarget(double newScale, const WebCore::FloatPoint& newScrollPosition)
505 {
506     m_pageClient.dynamicViewportUpdateChangedTarget(newScale, newScrollPosition);
507 }
508
509 void WebPageProxy::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius)
510 {
511     m_pageClient.didGetTapHighlightGeometries(requestID, color, highlightedQuads, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
512 }
513
514 void WebPageProxy::startAssistingNode(const AssistedNodeInformation& information, bool userIsInteracting, IPC::MessageDecoder& decoder)
515 {
516     RefPtr<API::Object> userData;
517     WebContextUserMessageDecoder messageDecoder(userData, process());
518     if (!decoder.decode(messageDecoder))
519         return;
520
521     m_pageClient.startAssistingNode(information, userIsInteracting, userData.get());
522 }
523
524 void WebPageProxy::stopAssistingNode()
525 {
526     m_pageClient.stopAssistingNode();
527 }
528
529 #if ENABLE(INSPECTOR)
530 void WebPageProxy::showInspectorIndication()
531 {
532     m_pageClient.showInspectorIndication();
533 }
534
535 void WebPageProxy::hideInspectorIndication()
536 {
537     m_pageClient.hideInspectorIndication();
538 }
539 #endif
540
541 void WebPageProxy::focusNextAssistedNode(bool isForward)
542 {
543     process().send(Messages::WebPage::FocusNextAssistedNode(isForward), m_pageID);
544 }
545
546 void WebPageProxy::setAssistedNodeValue(const String& value)
547 {
548     process().send(Messages::WebPage::SetAssistedNodeValue(value), m_pageID);
549 }
550
551 void WebPageProxy::setAssistedNodeValueAsNumber(double value)
552 {
553     process().send(Messages::WebPage::SetAssistedNodeValueAsNumber(value), m_pageID);
554 }
555
556 void WebPageProxy::setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection)
557 {
558     process().send(Messages::WebPage::SetAssistedNodeSelectedIndex(index, allowMultipleSelection), m_pageID);
559 }
560
561 void WebPageProxy::didPerformDictionaryLookup(const AttributedString&, const DictionaryPopupInfo&)
562 {
563     notImplemented();
564 }
565
566 void WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication(const String&, const String&, const IPC::DataReference&, const String&)
567 {
568     notImplemented();
569 }
570
571 void WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw(const String&, const String&, const uint8_t*, unsigned long, const String&)
572 {
573     notImplemented();
574 }
575
576 void WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication(const String&)
577 {
578     notImplemented();
579 }
580
581 void WebPageProxy::setAcceleratedCompositingRootLayer(LayerOrView* rootLayer)
582 {
583     m_pageClient.setAcceleratedCompositingRootLayer(rootLayer);
584 }
585
586 void WebPageProxy::showPlaybackTargetPicker(bool hasVideo, const IntRect& elementRect)
587 {
588     m_pageClient.showPlaybackTargetPicker(hasVideo, elementRect);
589 }
590
591 void WebPageProxy::zoomToRect(FloatRect rect, double minimumScale, double maximumScale)
592 {
593     m_pageClient.zoomToRect(rect, minimumScale, maximumScale);
594 }
595
596 void WebPageProxy::commitPotentialTapFailed()
597 {
598     m_pageClient.commitPotentialTapFailed();
599 }
600
601 void WebPageProxy::didNotHandleTapAsClick(const WebCore::IntPoint& point)
602 {
603     m_uiClient->didNotHandleTapAsClick(point);
604 }
605
606 #if USE(QUICK_LOOK)
607     
608 void WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame(const String& fileName, const String& uti)
609 {
610     // Ensure that fileName isn't really a path name
611     static_assert(notFound + 1 == 0, "The following line assumes WTF::notFound equals -1");
612     m_loaderClient->didStartLoadForQuickLookDocumentInMainFrame(fileName.substring(fileName.reverseFind('/') + 1), uti);
613 }
614
615 void WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData& data)
616 {
617     m_loaderClient->didFinishLoadForQuickLookDocumentInMainFrame(data);
618 }
619 #endif
620
621 } // namespace WebKit
622
623 #endif // PLATFORM(IOS)