Implement that a text selection handle can be moved over another text selection handle.
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / efl / WebPageProxyEfl.cpp
1 /*
2  * Copyright (C) 2011 Samsung Electronics
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 #include "config.h"
27 #include "WebPageProxy.h"
28
29 #include "EwkViewImpl.h"
30 #include "NativeWebKeyboardEvent.h"
31 #include "NotImplemented.h"
32 #include "PageClientImpl.h"
33 #include "WebPageMessages.h"
34 #include "WebProcessProxy.h"
35
36 #include <sys/utsname.h>
37
38 #if OS(TIZEN)
39 #include "DrawingAreaMessages.h"
40
41 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE)
42 #include "LayerTreeCoordinatorProxy.h"
43 #endif
44 #include "NativeWebKeyboardEvent.h"
45 #include "WebImage.h"
46 #include "WebPageMessages.h"
47 #include "WebProcessProxy.h"
48 #include <WebCore/IntSize.h>
49 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
50 #include "WebContextMenuProxy.h"
51 #include "ewk_view_private.h"
52 #endif
53
54 #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, m_process->connection())
55
56 #if ENABLE(TIZEN_LINK_MAGNIFIER)
57 #include "LinkMagnifierProxy.h"
58 #endif
59
60 #if ENABLE(TIZEN_SCREEN_READER)
61 #include "ScreenReaderProxy.h"
62 #include "ewk_view_private.h"
63 #endif
64
65 #if ENABLE(TIZEN_CSP)
66 #include <WebCore/ContentSecurityPolicy.h>
67 #endif
68
69 using namespace WebCore;
70 #endif
71
72 namespace WebKit {
73
74 Evas_Object* WebPageProxy::viewWidget()
75 {
76     return static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->view();
77 }
78
79 String WebPageProxy::standardUserAgent(const String& applicationNameForUserAgent)
80 {
81 #if OS(TIZEN)
82     return String::fromUTF8("Mozilla/5.0 (Linux; Tizen 2.2; sdk) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.2 Mobile Safari/537.3");
83 #endif
84
85     WTF::String platform;
86     WTF::String version;
87     WTF::String osVersion;
88
89 #if PLATFORM(X11)
90     platform = "X11";
91 #else
92     platform = "Unknown";
93 #endif
94     version = makeString(String::number(WEBKIT_USER_AGENT_MAJOR_VERSION), '.',
95                          String::number(WEBKIT_USER_AGENT_MINOR_VERSION), '+');
96     struct utsname name;
97     if (uname(&name) != -1)
98         osVersion = WTF::String(name.sysname) + " " + WTF::String(name.machine);
99     else
100         osVersion = "Unknown";
101
102     if (applicationNameForUserAgent.isEmpty())
103         return makeString("Mozilla/5.0 (", platform, "; ", osVersion, ") AppleWebKit/", version,
104                " (KHTML, like Gecko) Version/5.0 Safari/", version);
105
106     return makeString("Mozilla/5.0 (", platform, "; ", osVersion, ") AppleWebKit/", version,
107            " (KHTML, like Gecko) Version/5.0 Safari/", version, applicationNameForUserAgent);
108 }
109
110 void WebPageProxy::getEditorCommandsForKeyEvent(Vector<WTF::String>& commandsList)
111 {
112     notImplemented();
113 }
114
115 void WebPageProxy::saveRecentSearches(const String&, const Vector<String>&)
116 {
117     notImplemented();
118 }
119
120 void WebPageProxy::loadRecentSearches(const String&, Vector<String>&)
121 {
122     notImplemented();
123 }
124
125 void WebPageProxy::setThemePath(const String& themePath)
126 {
127     process()->send(Messages::WebPage::SetThemePath(themePath), m_pageID, 0);
128 }
129
130 #if ENABLE(TIZEN_CUSTOM_HEADERS)
131 void WebPageProxy::addCustomHeader(const String& name, const String& value)
132 {
133     if (name.isEmpty())
134         return;
135
136     if (value.isEmpty())
137         return;
138
139     if (!isValid())
140         return;
141
142     process()->send(Messages::WebPage::AddCustomHeader(name, value), m_pageID);
143 }
144
145 void WebPageProxy::removeCustomHeader(const String& name)
146 {
147     if (name.isEmpty())
148         return;
149
150     if (!isValid())
151         return;
152
153     process()->send(Messages::WebPage::RemoveCustomHeader(name), m_pageID);
154 }
155
156 void WebPageProxy::clearCustomHeaders()
157 {
158     if (!isValid())
159         return;
160
161     process()->send(Messages::WebPage::ClearCustomHeaders(), m_pageID);
162 }
163 #endif
164
165 #if OS(TIZEN)
166 bool WebPageProxy::scrollMainFrameBy(const IntSize& scrollOffset)
167 {
168 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
169     return static_cast<PageClientImpl*>(m_pageClient)->scrollBy(scrollOffset);
170 #else
171     if (!isValid())
172         return false;
173
174     process()->send(Messages::WebPage::ScrollMainFrameBy(scrollOffset), m_pageID);
175     return true;
176 #endif
177 }
178
179 void WebPageProxy::scrollMainFrameTo(const IntPoint& scrollPosition)
180 {
181 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
182     static_cast<PageClientImpl*>(m_pageClient)->scrollTo(scrollPosition);
183 #else
184     if (!isValid())
185         return;
186
187     process()->send(Messages::WebPage::ScrollMainFrameTo(scrollPosition), m_pageID);
188 #endif
189 }
190
191 void WebPageProxy::didChangeScrollPositionForMainFrame(const IntPoint& scrollPosition)
192 {
193 #if !ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
194     m_scrollPosition = scrollPosition;
195 #endif
196 }
197
198 void WebPageProxy::didChangeContentsSize(const IntSize& size)
199 {
200     if (m_contentsSize == size)
201         return;
202
203     m_contentsSize = size;
204     m_pageClient->didChangeContentsSize(size);
205 }
206
207 PassRefPtr<WebImage> WebPageProxy::createSnapshot(const IntRect& rect, float scaleFactor)
208 {
209     if (!isValid())
210         return 0;
211
212     ShareableBitmap::Handle snapshotHandle;
213     // Do not wait for more than a second (arbitrary) for the WebProcess to get the snapshot so
214     // that the UI Process is not permanently stuck waiting on a potentially crashing Web Process.
215     static const double createSnapshotSyncMessageTimeout = 1.0;
216 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
217     float baseScaleFactor = static_cast<PageClientImpl*>(m_pageClient)->scaleFactor();
218     scaleFactor = scaleFactor * baseScaleFactor;
219
220     IntRect visibleContentRect = static_cast<PageClientImpl*>(m_pageClient)->visibleContentRect();
221     IntRect scaledRect = rect;
222     scaledRect.move(visibleContentRect.x(), visibleContentRect.y());
223     scaledRect.scale(1/baseScaleFactor);
224     process()->sendSync(Messages::WebPage::CreateSnapshot(scaledRect, scaleFactor), Messages::WebPage::CreateSnapshot::Reply(snapshotHandle), m_pageID, createSnapshotSyncMessageTimeout);
225 #else
226     process()->sendSync(Messages::WebPage::CreateSnapshot(rect, scaleFactor), Messages::WebPage::CreateSnapshot::Reply(snapshotHandle), m_pageID, createSnapshotSyncMessageTimeout);
227 #endif
228     if (snapshotHandle.isNull())
229         return 0;
230     return WebImage::create(ShareableBitmap::create(snapshotHandle));
231 }
232
233 #if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
234 void WebPageProxy::textChangeInTextField(const String& name, const String& value)
235 {
236     static_cast<PageClientImpl*>(m_pageClient)->textChangeInTextField(name, value);
237 }
238 #endif
239
240 #if ENABLE(TIZEN_ISF_PORT)
241 void WebPageProxy::prepareKeyDownEvent()
242 {
243     if (!isValid())
244         return;
245
246     process()->send(Messages::WebPage::PrepareKeyDownEvent(), m_pageID);
247 }
248
249 int WebPageProxy::getCursorOffset()
250 {
251     if (!isValid())
252         return 0;
253
254     int offset = 0;
255     process()->sendSync(Messages::WebPage::GetCursorOffset(), Messages::WebPage::GetCursorOffset::Reply(offset), m_pageID);
256     return offset;
257 }
258
259 void WebPageProxy::getSurroundingTextAndCursorOffset(String& text, int& offset)
260 {
261     if (!isValid())
262         return;
263
264     process()->sendSync(Messages::WebPage::GetSurroundingTextAndCursorOffset(), Messages::WebPage::GetSurroundingTextAndCursorOffset::Reply(text, offset), m_pageID);
265 }
266
267 IntRect WebPageProxy::getSelectionRect(bool isOnlyEditable)
268 {
269     IntRect rect;
270     process()->sendSync(Messages::WebPage::GetSelectionRect(isOnlyEditable), Messages::WebPage::GetSelectionRect::Reply(rect), m_pageID);
271     return rect;
272 }
273
274 void WebPageProxy::deleteSurroundingText(int offset, int count)
275 {
276     if (!isValid())
277         return;
278
279     process()->send(Messages::WebPage::DeleteSurroundingText(offset, count), m_pageID);
280 }
281
282 void WebPageProxy::didCancelComposition()
283 {
284     m_didCancelCompositionFromWebProcess = true;
285     InputMethodContextEfl* inputMethodContext = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->inputMethodContext();
286     if (inputMethodContext)
287         inputMethodContext->resetIMFContext();
288     m_didCancelCompositionFromWebProcess = false;
289 }
290
291 void WebPageProxy::removeInputMethodContext(uintptr_t id)
292 {
293     InputMethodContextEfl* inputMethodContext = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->inputMethodContext();
294     if (!inputMethodContext)
295         return;
296
297     inputMethodContext->removeIMFContext(id);
298 }
299 #endif // #if ENABLE(TIZEN_ISF_PORT)
300
301 void WebPageProxy::requestUpdateFormNavigation()
302 {
303     if (!isValid())
304         return;
305
306     process()->send(Messages::WebPage::RequestUpdateFormNavigation(), m_pageID);
307 }
308
309 void WebPageProxy::moveFocus(int newIndex)
310 {
311     if (!isValid())
312         return;
313
314     process()->send(Messages::WebPage::MoveFocus(newIndex), m_pageID);
315 }
316
317 void WebPageProxy::updateFormNavigation(int length, int offset)
318 {
319     static_cast<PageClientImpl*>(m_pageClient)->updateFormNavigation(length, offset);
320 }
321
322 #if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
323 Eina_Bool WebPageProxy::pageContentResumeTimerFired(void* data)
324 {
325     static_cast<WebPageProxy*>(data)->resumeActiveDOMObjectsAndAnimations();
326     static_cast<WebPageProxy*>(data)->m_pageContentResumeTimer = 0;
327     return ECORE_CALLBACK_CANCEL;
328 }
329 #endif
330
331 #if ENABLE(TIZEN_TEXT_CARET_HANDLING_WK2)
332 void WebPageProxy::setCaretPosition(const WebCore::IntPoint& pos)
333 {
334     if (!isValid())
335         return;
336
337     process()->send(Messages::WebPage::SetCaretPosition(pos), m_pageID);
338 }
339
340 void WebPageProxy::getCaretPosition(WebCore::IntRect& rect)
341 {
342     if (!isValid())
343         return;
344
345     process()->sendSync(Messages::WebPage::GetCaretPosition(), Messages::WebPage::GetCaretPosition::Reply(rect), m_pageID);
346 }
347 #endif
348
349 #if ENABLE(TIZEN_PLUGIN_CUSTOM_REQUEST)
350 void WebPageProxy::processPluginCustomRequest(const String& request, const String& msg)
351 {
352     if (String("requestKeyboard,plugin") == request) {
353         bool active = false;
354         if (String("show") == msg)
355             active = true;
356 #if ENABLE(TIZEN_ISF_PORT)
357         m_editorState = EditorState();
358         m_editorState.isContentEditable = active;
359         m_pageClient->updateTextInputState();
360 #endif
361     }
362 #if ENABLE(TIZEN_JSBRIDGE_PLUGIN)
363     else if (String("requestToNative,json") == request)
364         m_tizenClient.processJSBridgePlugin(this, request, msg);
365 #endif
366 }
367 #endif
368
369
370 #if ENABLE(TIZEN_INPUT_TAG_EXTENSION) || ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
371 void WebPageProxy::setFocusedInputElementValue(const String& inputValue)
372 {
373     if (!isValid())
374         return;
375
376     process()->send(Messages::WebPage::SetFocusedInputElementValue(inputValue), m_pageID);
377 }
378
379 String WebPageProxy::getFocusedInputElementValue()
380 {
381     if (!isValid())
382         return String();
383
384     String inputValue;
385     process()->sendSync(Messages::WebPage::GetFocusedInputElementValue(), Messages::WebPage::GetFocusedInputElementValue::Reply(inputValue), m_pageID);
386     return inputValue;
387 }
388 #endif
389
390 #if ENABLE(TIZEN_DATALIST_ELEMENT)
391 Vector<String> WebPageProxy::getFocusedInputElementDataList()
392 {
393     if (!isValid())
394         return Vector<String>();
395
396     Vector<String> optionList;
397     process()->sendSync(Messages::WebPage::GetFocusedInputElementDataList(), Messages::WebPage::GetFocusedInputElementDataList::Reply(optionList), m_pageID);
398     return optionList;
399 }
400 #endif
401
402 void WebPageProxy::focusedNodeChanged(const IntRect& focusedNodeRect)
403 {
404     static_cast<PageClientImpl*>(m_pageClient)->setFocusedNodeRect(focusedNodeRect);
405 }
406
407 void WebPageProxy::initializeTizenClient(const WKPageTizenClient* client)
408 {
409     m_tizenClient.initialize(client);
410 }
411
412 #if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
413 WebHitTestResult::Data WebPageProxy::hitTestResultAtPoint(const IntPoint& point, int hitTestMode)
414 {
415     WebHitTestResult::Data hitTestResultData;
416     if (!isValid())
417         return hitTestResultData;
418
419     process()->sendSync(Messages::WebPage::HitTestResultAtPoint(point, hitTestMode),
420                         Messages::WebPage::HitTestResultAtPoint::Reply(hitTestResultData), m_pageID);
421
422     return hitTestResultData;
423 }
424 #endif
425
426 #if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
427 void WebPageProxy::hideContextMenu()
428 {
429     if (m_activeContextMenu)
430         m_activeContextMenu->hideContextMenu();
431 }
432
433 String WebPageProxy::contextMenuAbsoluteLinkURLString()
434 {
435     if (!m_activeContextMenu)
436         return String();
437
438     return m_activeContextMenuHitTestResultData.absoluteLinkURL;
439 }
440
441 String WebPageProxy::contextMenuAbsoluteImageURLString()
442 {
443     if (!m_activeContextMenu)
444         return String();
445
446     return m_activeContextMenuHitTestResultData.absoluteImageURL;
447 }
448 #endif
449
450 #if ENABLE(TIZEN_WEBKIT2_CLIPBOARD_HELPER)
451 void WebPageProxy::pasteContextMenuSelected()
452 {
453     static_cast<PageClientImpl*>(m_pageClient)->pasteContextMenuSelected();
454 }
455
456 void WebPageProxy::didSelectPasteMenuFromContextMenu(const String& data, const String& type)
457 {
458     if (!isValid())
459         return;
460
461 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
462     process()->send(Messages::WebPage::SetClipboardDataForPaste(data, type), m_pageID);
463 #endif
464     WebContextMenuItemData item(ActionType, ContextMenuItemTagPaste, String("Paste"), true, false);
465     process()->send(Messages::WebPage::DidSelectItemFromActiveContextMenu(item), m_pageID);
466 }
467 #endif
468
469 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
470 void WebPageProxy::setClipboardData(const String& data, const String& type)
471 {
472     static_cast<PageClientImpl*>(m_pageClient)->setClipboardData(data, type);
473 }
474
475 void WebPageProxy::clearClipboardData()
476 {
477     static_cast<PageClientImpl*>(m_pageClient)->clearClipboardData();
478 }
479 #endif
480
481 #if ENABLE(TIZEN_WEBKIT2_CONTEXT_MENU_CLIPBOARD)
482 void WebPageProxy::executePasteFromClipboardItem(const String& data, const String& type)
483 {
484     if (!isValid())
485         return;
486
487 #if ENABLE(TIZEN_CLIPBOARD) || ENABLE(TIZEN_PASTEBOARD)
488     process()->send(Messages::WebPage::SetClipboardDataForPaste(data, type), m_pageID);
489 #endif
490     process()->send(Messages::WebPage::ExecuteEditCommandWithArgument("Paste", data), m_pageID);
491 }
492
493 void WebPageProxy::clipboardContextMenuSelected()
494 {
495     static_cast<PageClientImpl*>(m_pageClient)->clipboardContextMenuSelected();
496 }
497 #endif
498
499 #if ENABLE(TIZEN_REMOTE_WEB_INSPECTOR)
500 uint32_t WebPageProxy::startInspectorServer(uint32_t port)
501 {
502     if (!isValid())
503         return 0;
504
505     uint32_t assignedPort = 0;
506     process()->sendSync(Messages::WebPage::StartInspectorServer(port), Messages::WebPage::StartInspectorServer::Reply(assignedPort), m_pageID);
507     return assignedPort;
508 }
509
510 bool WebPageProxy::stopInspectorServer()
511 {
512     if (!isValid())
513         return false;
514
515     bool result = false;
516     process()->sendSync(Messages::WebPage::StopInspectorServer(), Messages::WebPage::StopInspectorServer::Reply(result), m_pageID);
517     return result;
518 }
519 #endif
520
521 #if ENABLE(TIZEN_MOBILE_WEB_PRINT)
522 void WebPageProxy::createPagesToPDF(const IntSize& surfaceSize, const IntSize& contentsSize, const String& fileName)
523 {
524     process()->send(Messages::WebPage::CreatePagesToPDF(surfaceSize, contentsSize, fileName), m_pageID);
525 }
526 #endif
527
528 #if ENABLE(TIZEN_WEB_STORAGE)
529 #if ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
530 void WebPageProxy::getWebStorageQuotaBytes(PassRefPtr<WebStorageQuotaCallback> prpCallback)
531 {
532     RefPtr<WebStorageQuotaCallback> callback = prpCallback;
533     if (!isValid()) {
534         callback->invalidate();
535         return;
536     }
537
538     uint64_t callbackID = callback->callbackID();
539     m_quotaCallbacks.set(callbackID, callback.get());
540     process()->send(Messages::WebPage::GetStorageQuotaBytes(callbackID), m_pageID);
541 }
542
543 void WebPageProxy::didGetWebStorageQuotaBytes(const uint32_t quota, uint64_t callbackID)
544 {
545     RefPtr<WebStorageQuotaCallback> callback = m_quotaCallbacks.take(callbackID);
546     if (!callback) {
547         // FIXME: Log error or assert.
548         // this can validly happen if a load invalidated the callback, though
549         return;
550     }
551
552     m_quotaCallbacks.remove(callbackID);
553
554     RefPtr<WebUInt32> uint32Object = WebUInt32::create(quota);
555     callback->performCallbackWithReturnValue(uint32Object.release().leakRef());
556 }
557 #endif
558
559 void WebPageProxy::setWebStorageQuotaBytes(uint32_t quota)
560 {
561     if (!isValid())
562         return;
563
564     process()->send(Messages::WebPage::SetStorageQuotaBytes(quota), m_pageID, 0);
565 }
566 #endif
567
568 void WebPageProxy::scale(double scaleFactor, const IntPoint& origin)
569 {
570 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
571     static_cast<PageClientImpl*>(m_pageClient)->scaleContents(scaleFactor, origin);
572 #else
573     scalePage(scaleFactor, origin);
574 #endif
575 }
576
577 void WebPageProxy::scaleImage(double scaleFactor, const IntPoint& origin)
578 {
579 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
580     static_cast<PageClientImpl*>(m_pageClient)->scaleImage(scaleFactor, origin);
581 #else
582     scalePage(scaleFactor, origin);
583 #endif
584 }
585
586 double WebPageProxy::scaleFactor()
587 {
588 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
589     return static_cast<PageClientImpl*>(m_pageClient)->scaleFactor();
590 #else
591     return pageScaleFactor();
592 #endif
593 }
594
595 #if ENABLE(TIZEN_ORIENTATION_EVENTS)
596 void WebPageProxy::sendOrientationChangeEvent(int orientation)
597 {
598     process()->send(Messages::WebPage::SendOrientationChangeEvent(orientation), m_pageID, 0);
599 }
600 #endif
601
602 void WebPageProxy::suspendPainting()
603 {
604     if (!isValid())
605         return;
606
607     process()->send(Messages::DrawingArea::SuspendPainting(), m_pageID);
608 }
609
610 void WebPageProxy::resumePainting()
611 {
612     if (!isValid())
613         return;
614
615     process()->send(Messages::DrawingArea::ResumePainting(), m_pageID);
616 }
617
618 void WebPageProxy::suspendJavaScriptAndResource()
619 {
620     if (!isValid())
621         return;
622
623     process()->send(Messages::WebPage::SuspendJavaScriptAndResources(), m_pageID);
624 }
625
626 void WebPageProxy::resumeJavaScriptAndResource()
627 {
628     if (!isValid())
629         return;
630
631     process()->send(Messages::WebPage::ResumeJavaScriptAndResources(), m_pageID);
632 }
633
634 void WebPageProxy::suspendAnimations()
635 {
636     if (!isValid())
637         return;
638
639     process()->send(Messages::WebPage::SuspendAnimations(), m_pageID);
640 }
641
642 void WebPageProxy::resumeAnimations()
643 {
644     if (!isValid())
645         return;
646
647     process()->send(Messages::WebPage::ResumeAnimations(), m_pageID);
648 }
649
650 #if ENABLE(TIZEN_PLUGIN_SUSPEND_RESUME)
651 void WebPageProxy::suspendPlugin()
652 {
653     if (!isValid())
654         return;
655
656     process()->send(Messages::WebPage::SuspendPlugin(), m_pageID);
657 }
658
659 void WebPageProxy::resumePlugin()
660 {
661     if (!isValid())
662         return;
663
664     process()->send(Messages::WebPage::ResumePlugin(), m_pageID);
665 }
666 #endif
667
668 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
669 void WebPageProxy::purgeBackingStoresOfInactiveView()
670 {
671     if (!isValid() || isViewVisible())
672         return;
673
674     process()->send(Messages::LayerTreeCoordinator::PurgeBackingStores(), m_pageID);
675 }
676 #endif
677
678 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
679 bool WebPageProxy::scrollOverflow(const FloatPoint& offset)
680 {
681     if (!isValid())
682         return false;
683
684 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION_ON_UI_SIDE)
685     if (static_cast<PageClientImpl*>(m_pageClient)->isScrollableLayerFocused())
686         return drawingArea()->layerTreeCoordinatorProxy()->setOffsetForFocusedScrollingContentsLayer(offset);
687 #endif
688     if (static_cast<PageClientImpl*>(m_pageClient)->isScrollableNodeFocused()) {
689         bool scrolled = false;
690         process()->sendSync(Messages::WebPage::ScrollOverflow(offset), Messages::WebPage::ScrollOverflow::Reply(scrolled), m_pageID);
691         return scrolled;
692     }
693
694     return false;
695 }
696
697 bool WebPageProxy::setPressedNodeAtPoint(const IntPoint& point, bool checkOverflowLayer, WebLayerID& webLayerID)
698 {
699     if (!isValid())
700         return false;
701
702     bool pressed = false;
703     process()->sendSync(Messages::WebPage::SetPressedNodeAtPoint(point, checkOverflowLayer), Messages::WebPage::SetPressedNodeAtPoint::Reply(pressed, webLayerID), m_pageID);
704
705     return pressed;
706 }
707
708 void WebPageProxy::setOverflowResult(bool pressed, uint32_t webLayerID)
709 {
710     static_cast<PageClientImpl*>(m_pageClient)->setOverflowResult(pressed, webLayerID);
711 }
712 #endif
713
714 void WebPageProxy::executeEditCommandWithArgument(const String& commandName, const String& argument)
715 {
716     if (!isValid())
717         return;
718
719     DEFINE_STATIC_LOCAL(String, ignoreSpellingCommandName, ("ignoreSpelling"));
720     if (commandName == ignoreSpellingCommandName)
721         ++m_pendingLearnOrIgnoreWordMessageCount;
722
723     process()->send(Messages::WebPage::ExecuteEditCommandWithArgument(commandName, argument), m_pageID);
724 }
725
726 void WebPageProxy::replyJavaScriptAlert()
727 {
728     if (!m_alertReply)
729         return;
730
731     m_alertReply->send();
732     m_alertReply = nullptr;
733 #if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
734     m_uiClient.notifyPopupReplyWaitingState(this, false);
735 #endif
736 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
737     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
738 #endif
739 }
740
741 void WebPageProxy::replyJavaScriptConfirm(bool result)
742 {
743     if (!m_confirmReply)
744         return;
745
746     m_confirmReply->send(result);
747     m_confirmReply = nullptr;
748 #if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
749     m_uiClient.notifyPopupReplyWaitingState(this, false);
750 #endif
751 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
752     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
753 #endif
754 }
755
756 void WebPageProxy::replyJavaScriptPrompt(const String& result)
757 {
758     if (!m_promptReply)
759         return;
760
761     m_promptReply->send(result);
762     m_promptReply = nullptr;
763 #if ENABLE(TIZEN_WEBKIT2_NOTIFY_POPUP_REPLY_STATUS)
764     m_uiClient.notifyPopupReplyWaitingState(this, false);
765 #endif
766 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
767     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
768 #endif
769 }
770
771 #if ENABLE(TIZEN_SUPPORT_BEFORE_UNLOAD_CONFIRM_PANEL)
772 void WebPageProxy::replyBeforeUnloadConfirmPanel(bool result)
773 {
774     if (!m_beforeUnloadConfirmPanelReply)
775         return;
776
777     m_beforeUnloadConfirmPanelReply->send(result);
778     m_beforeUnloadConfirmPanelReply = nullptr;
779 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
780     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
781 #endif
782 }
783 #endif
784
785 #if ENABLE(TIZEN_ON_AUTHENTICATION_REQUESTED)
786 void WebPageProxy::replyReceiveAuthenticationChallengeInFrame(bool result)
787 {
788     if (!m_AuthReply)
789         return;
790
791     m_AuthReply->send(result);
792     m_AuthReply = nullptr;
793 }
794 #endif
795
796 #if ENABLE(TIZEN_CERTIFICATE_HANDLING)
797 void WebPageProxy::replyPolicyForCertificateError(bool result)
798 {
799     if (!m_allowedReply)
800         return;
801
802     m_allowedReply->send(result);
803     m_allowedReply = nullptr;
804 }
805 #endif
806
807 #if PLUGIN_ARCHITECTURE(X11)
808 void WebPageProxy::createPluginContainer(uint64_t& windowID)
809 {
810     notImplemented();
811 }
812
813 void WebPageProxy::windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID)
814 {
815     notImplemented();
816 }
817 #endif
818
819 void WebPageProxy::didRenderFrame()
820 {
821     static_cast<PageClientImpl*>(m_pageClient)->didRenderFrame();
822 }
823
824 void WebPageProxy::setBackgroundColor(double red, double green, double blue, double alpha)
825 {
826     static_cast<PageClientImpl*>(m_pageClient)->setBackgroundColor(red, green, blue, alpha);
827 }
828
829 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
830 bool WebPageProxy::makeContextCurrent()
831 {
832     return static_cast<PageClientImpl*>(m_pageClient)->makeContextCurrent();
833 }
834 #endif
835
836 #if ENABLE(TIZEN_ICON_DATABASE)
837 void WebPageProxy::didReceiveIcon()
838 {
839     static_cast<PageClientImpl*>(m_pageClient)->didReceiveIcon();
840 }
841 #endif
842
843 #if ENABLE(TIZEN_MULTIPLE_SELECT)
844 void WebPageProxy::valueChangedForPopupMenuMultiple(WebPopupMenuProxy*, Vector<int32_t> newSelectedIndex)
845 {
846     process()->send(Messages::WebPage::DidChangeSelectedIndexForActivePopupMenuMultiple(newSelectedIndex), m_pageID);
847 }
848 #endif
849
850 #if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
851 void WebPageProxy::pageDidRequestRestoreVisibleContentRect(const IntPoint& point, float scale)
852 {
853     m_pageClient->pageDidRequestRestoreVisibleContentRect(point, scale);
854 }
855 #endif
856
857 #if ENABLE(TIZEN_OFFLINE_PAGE_SAVE)
858 void WebPageProxy::saveSerializedHTMLDataForMainPage(const String& serializedData, const String& fileName)
859 {
860     static_cast<PageClientImpl*>(m_pageClient)->saveSerializedHTMLDataForMainPage(serializedData, fileName);
861 }
862
863 void WebPageProxy::saveSubresourcesData(Vector<WebSubresourceTizen> subresourceData)
864 {
865     static_cast<PageClientImpl*>(m_pageClient)->saveSubresourcesData(subresourceData);
866 }
867
868 void WebPageProxy::startOfflinePageSave(String subresourceFolderName)
869 {
870     if (!isValid())
871         return;
872
873     process()->send(Messages::WebPage::StartOfflinePageSave(subresourceFolderName), m_pageID);
874 }
875 #endif
876
877 #if ENABLE(TIZEN_WEBKIT2_TEXT_SELECTION)
878 bool WebPageProxy::selectClosestWord(const IntPoint& point)
879 {
880     if (!isValid())
881         return false;
882
883     bool result = false;
884     process()->sendSync(Messages::WebPage::SelectClosestWord(point), Messages::WebPage::SelectClosestWord::Reply(result), m_pageID);
885     return result;
886 }
887
888 int WebPageProxy::setLeftSelection(const IntPoint& point, const int direction)
889 {
890     if (!isValid())
891         return 0;
892
893     int result = 0;
894     process()->sendSync(Messages::WebPage::SetLeftSelection(point, direction), Messages::WebPage::SetLeftSelection::Reply(result), m_pageID);
895     return result;
896 }
897
898 int WebPageProxy::setRightSelection(const IntPoint& point, const int direction)
899 {
900     if (!isValid())
901         return 0;
902
903     int result = 0;
904     process()->sendSync(Messages::WebPage::SetRightSelection(point, direction), Messages::WebPage::SetRightSelection::Reply(result), m_pageID);
905     return result;
906 }
907
908 bool WebPageProxy::getSelectionHandlers(IntRect& leftRect, IntRect& rightRect)
909 {
910     if (!isValid())
911         return false;
912
913     bool result = false;
914     process()->sendSync(Messages::WebPage::GetSelectionHandlers(), Messages::WebPage::GetSelectionHandlers::Reply(leftRect, rightRect), m_pageID);
915     if (!leftRect.size().isZero() || !rightRect.size().isZero())
916         result = true;
917
918     return result;
919 }
920
921 String WebPageProxy::getSelectionText()
922 {
923     String ret;
924     if (!isValid())
925         return ret;
926
927     process()->sendSync(Messages::WebPage::GetSelectionText(), Messages::WebPage::GetSelectionText::Reply(ret), m_pageID);
928     return ret;
929 }
930
931 bool WebPageProxy::selectionRangeClear()
932 {
933     if (!isValid())
934         return false;
935
936     bool result = false;
937     process()->sendSync(Messages::WebPage::SelectionRangeClear(), Messages::WebPage::SelectionRangeClear::Reply(result), m_pageID);
938     return result;
939 }
940
941 bool WebPageProxy::scrollContentByCharacter(const IntPoint& point, SelectionDirection direction)
942 {
943     if (!isValid())
944         return false;
945
946     bool result = false;
947     process()->sendSync(Messages::WebPage::ScrollContentByCharacter(point, direction), Messages::WebPage::ScrollContentByCharacter::Reply(result), m_pageID);
948     return result;
949 }
950
951 bool WebPageProxy::scrollContentByLine(const IntPoint& point, SelectionDirection direction)
952 {
953     if (!isValid())
954         return false;
955
956     bool result = false;
957     process()->sendSync(Messages::WebPage::ScrollContentByLine(point, direction), Messages::WebPage::ScrollContentByLine::Reply(result), m_pageID);
958     return result;
959 }
960 #endif
961
962 #if ENABLE(TIZEN_LINK_MAGNIFIER)
963 void WebPageProxy::getLinkMagnifierRect(const WebCore::IntPoint& position, const WebCore::IntSize& size)
964 {
965     process()->send(Messages::WebPage::GetLinkMagnifierRect(position, size), m_pageID);
966 }
967
968 void WebPageProxy::didGetLinkMagnifierRect(const IntPoint& position, const IntRect& rect)
969 {
970     if (!rect.isEmpty())
971         LinkMagnifierProxy::linkMagnifier().show(EwkViewImpl::fromEvasObject(viewWidget()), position, rect);
972     else
973         openLink(position);
974 }
975
976 void WebPageProxy::openLink(const IntPoint& position)
977 {
978 #if ENABLE(GESTURE_EVENTS)
979     IntPoint globalPosition(static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->transformToScreen().mapPoint(position));
980     WebGestureEvent gesture(WebEvent::GestureSingleTap, position, globalPosition, WebEvent::Modifiers(0), ecore_time_get());
981     handleGestureEvent(gesture);
982 #endif
983 }
984 #endif
985
986 #if ENABLE(TIZEN_SCREEN_READER)
987 bool WebPageProxy::moveScreenReaderFocus(bool forward)
988 {
989     bool result;
990     process()->sendSync(Messages::WebPage::MoveScreenReaderFocus(forward), Messages::WebPage::MoveScreenReaderFocus::Reply(result), m_pageID);
991     return result;
992 }
993
994 void WebPageProxy::moveScreenReaderFocusByPoint(const IntPoint& point)
995 {
996     process()->send(Messages::WebPage::MoveScreenReaderFocusByPoint(point), m_pageID);
997 }
998
999 void WebPageProxy::clearScreenReaderFocus()
1000 {
1001     process()->send(Messages::WebPage::ClearScreenReaderFocus(), m_pageID);
1002 }
1003
1004 bool WebPageProxy::raiseTapEvent(const IntPoint& position)
1005 {
1006     IntPoint globalPosition = static_cast<PageClientImpl*>(m_pageClient)->viewImpl()->transformToScreen().mapPoint(position);
1007     bool result;
1008     process()->sendSync(Messages::WebPage::RaiseTapEvent(position, globalPosition), Messages::WebPage::RaiseTapEvent::Reply(result), m_pageID);
1009
1010     return result;
1011 }
1012
1013 void WebPageProxy::adjustScreenReaderFocusedObjectValue(bool up)
1014 {
1015     process()->send(Messages::WebPage::AdjustScreenReaderFocusedObjectValue(up), m_pageID);
1016 }
1017
1018 void WebPageProxy::recalcScreenReaderFocusRect()
1019 {
1020     if (!ScreenReaderProxy::screenReader().isActive(static_cast<PageClientImpl*>(m_pageClient)->viewImpl()))
1021         return;
1022
1023     process()->send(Messages::WebPage::RecalcScreenReaderFocusRect(), m_pageID);
1024 }
1025
1026 void WebPageProxy::clearScreenReader()
1027 {
1028     process()->send(Messages::WebPage::ClearScreenReader(), m_pageID);
1029 }
1030
1031 void WebPageProxy::didScreenReaderFocusRectChanged(const IntRect& rect)
1032 {
1033 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
1034     FocusRing* focusRing = ewkViewGetFocusRing(viewWidget());
1035     if (!focusRing)
1036         return;
1037
1038     if (!rect.isEmpty())
1039         focusRing->show(rect);
1040     else
1041         focusRing->hide(false);
1042 #else
1043     UNUSED_PARAM(rect);
1044 #endif
1045 }
1046
1047 void WebPageProxy::didScreenReaderTextChanged(const String& text)
1048 {
1049     ScreenReaderProxy::screenReader().setText(text);
1050 }
1051 #endif
1052
1053 #if ENABLE(TIZEN_CSP)
1054 void WebPageProxy::setContentSecurityPolicy(const String& policy, WebCore::ContentSecurityPolicy::HeaderType type)
1055 {
1056     process()->send(Messages::WebPage::SetContentSecurityPolicy(policy, type), m_pageID);
1057 }
1058 #endif
1059
1060 #if ENABLE(TIZEN_APPLICATION_CACHE)
1061 void WebPageProxy::requestApplicationCachePermission(uint64_t frameID, const String& originIdentifier, PassRefPtr<Messages::WebPageProxy::RequestApplicationCachePermission::DelayedReply> allow)
1062 {
1063     WebFrameProxy* frame = process()->webFrame(frameID);
1064     MESSAGE_CHECK(frame);
1065
1066     // Since requestApplicationCachePermission() can spin a nested run loop we need to turn off the responsiveness timer.
1067     process()->responsivenessTimer()->stop();
1068
1069     m_applicationCacheReply = allow;
1070 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1071     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(true);
1072 #endif
1073     RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
1074
1075     if (!m_tizenClient.decidePolicyForApplicationCachePermissionRequest(this, origin.get(), frame))
1076         replyApplicationCachePermission(true);
1077 }
1078
1079 void WebPageProxy::replyApplicationCachePermission(bool allow)
1080 {
1081     if (!m_applicationCacheReply)
1082         return;
1083
1084     m_applicationCacheReply->send(allow);
1085     m_applicationCacheReply = nullptr;
1086 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1087     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
1088 #endif
1089 }
1090 #endif
1091
1092 #if ENABLE(TIZEN_INDEXED_DATABASE)
1093 void WebPageProxy::exceededIndexedDatabaseQuota(uint64_t frameID, const String& originIdentifier, int64_t currentUsage, PassRefPtr<Messages::WebPageProxy::ExceededIndexedDatabaseQuota::DelayedReply> reply)
1094 {
1095     WebFrameProxy* frame = process()->webFrame(frameID);
1096     MESSAGE_CHECK(frame);
1097
1098     // Since exceededIndexedDatabaseQuota() can spin a nested run loop we need to turn off the responsiveness timer.
1099     process()->responsivenessTimer()->stop();
1100
1101     m_exceededIndexedDatabaseQuotaReply = reply;
1102 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1103     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(true);
1104 #endif
1105
1106     RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
1107
1108     if (!m_tizenClient.exceededIndexedDatabaseQuota(this, origin.get(), currentUsage, frame))
1109         replyExceededIndexedDatabaseQuota(false);
1110 }
1111
1112 void WebPageProxy::replyExceededIndexedDatabaseQuota(bool allow)
1113 {
1114     if (!m_exceededIndexedDatabaseQuotaReply)
1115         return;
1116
1117     m_exceededIndexedDatabaseQuotaReply->send(allow);
1118     m_exceededIndexedDatabaseQuotaReply = nullptr;
1119 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1120     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
1121 #endif
1122 }
1123 #endif
1124
1125 #if ENABLE(TIZEN_SQL_DATABASE)
1126 void WebPageProxy::replyExceededDatabaseQuota(bool allow)
1127 {
1128     if (!m_exceededDatabaseQuotaReply) {
1129         TIZEN_LOGE("m_exceededDatabaseQuotaReply does not exist");
1130         return;
1131     }
1132
1133     m_exceededDatabaseQuotaReply->send(allow);
1134     m_exceededDatabaseQuotaReply = nullptr;
1135 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1136     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
1137 #endif
1138 }
1139 #endif
1140
1141 #if ENABLE(TIZEN_FILE_SYSTEM)
1142 void WebPageProxy::exceededLocalFileSystemQuota(uint64_t frameID, const String& originIdentifier, int64_t currentUsage, PassRefPtr<Messages::WebPageProxy::ExceededLocalFileSystemQuota::DelayedReply> reply)
1143 {
1144     WebFrameProxy* frame = process()->webFrame(frameID);
1145     MESSAGE_CHECK(frame);
1146
1147     // Since exceededLocalFileSystemQuota() can spin a nested run loop we need to turn off the responsiveness timer.
1148     process()->responsivenessTimer()->stop();
1149     m_exceededLocalFileSystemQuotaReply = reply;
1150 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1151     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(true);
1152 #endif
1153
1154     RefPtr<WebSecurityOrigin> origin = WebSecurityOrigin::createFromDatabaseIdentifier(originIdentifier);
1155
1156     if (!m_tizenClient.exceededLocalFileSystemQuota(this, origin.get(), currentUsage, frame))
1157         replyExceededLocalFileSystemQuota(false);
1158 }
1159
1160 void WebPageProxy::replyExceededLocalFileSystemQuota(bool allow)
1161 {
1162     if (!m_exceededLocalFileSystemQuotaReply)
1163         return;
1164
1165     m_exceededLocalFileSystemQuotaReply->send(allow);
1166     m_exceededLocalFileSystemQuotaReply = nullptr;
1167 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1168     process()->connection()->setForcelySetAllAsyncMessagesToDispatchEvenWhenWaitingForSyncReply(false);
1169 #endif
1170 }
1171 #endif
1172
1173 #endif // #if OS(TIZEN)
1174
1175 void WebPageProxy::handleInputMethodKeydown(bool& handled)
1176 {
1177 #if ENABLE(TIZEN_WEBKIT2_ROTATION_WHILE_JAVASCRIPT_POPUP)
1178     handled = m_keyEventQueue.first().forwardedEvent.isFiltered();
1179 #else
1180     handled = m_keyEventQueue.first().isFiltered();
1181 #endif
1182 }
1183
1184 void WebPageProxy::confirmComposition(const String& compositionString)
1185 {
1186     if (!isValid())
1187         return;
1188
1189 #if ENABLE(TIZEN_ISF_PORT)
1190     if (m_didCancelCompositionFromWebProcess)
1191         return;
1192 #endif
1193
1194     process()->send(Messages::WebPage::ConfirmComposition(compositionString), m_pageID, 0);
1195 }
1196
1197 void WebPageProxy::setComposition(const String& compositionString, Vector<WebCore::CompositionUnderline>& underlines, int cursorPosition)
1198 {
1199     if (!isValid())
1200         return;
1201
1202 #if ENABLE(TIZEN_REDUCE_KEY_LAGGING)
1203     // Suspend layout&paint at the key input, and resume layout&paint after 150 ms.
1204     suspendActiveDOMObjectsAndAnimations();
1205     if (m_pageContentResumeTimer)
1206         ecore_timer_del(m_pageContentResumeTimer);
1207     m_pageContentResumeTimer = ecore_timer_add(150.0/1000.0, pageContentResumeTimerFired, this);
1208 #endif
1209
1210     process()->send(Messages::WebPage::SetComposition(compositionString, underlines, cursorPosition), m_pageID, 0);
1211 }
1212
1213 void WebPageProxy::cancelComposition()
1214 {
1215     if (!isValid())
1216         return;
1217
1218     process()->send(Messages::WebPage::CancelComposition(), m_pageID, 0);
1219 }
1220
1221 #if ENABLE(TIZEN_USE_SETTINGS_FONT)
1222 void WebPageProxy::useSettingsFont()
1223 {
1224     process()->send(Messages::WebPage::UseSettingsFont(), m_pageID, 0);
1225 }
1226 #endif
1227
1228 #if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR)
1229 void WebPageProxy::setContentSuspendedByInspector(bool isSuspended)
1230 {
1231     m_contentSuspendedByInspector = isSuspended;
1232 }
1233 #endif
1234
1235 } // namespace WebKit