From: bunam.jeon Date: Thu, 30 May 2013 06:23:15 +0000 (+0900) Subject: Notify to UI process that the content has been suspended by inspector X-Git-Tag: submit/tizen_2.2/20130714.131554~187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1263169258a64b647018db9913d41550c883e3ca;p=framework%2Fweb%2Fwebkit-efl.git Notify to UI process that the content has been suspended by inspector [Title] Notify to UI process that the content has been suspended by inspector [Issue#] [Problem] UI process do not know that the content has been suspend. [Cause] Not Implement [Solution] Notice the suspend state WebPageProxy Change-Id: I7b09a1ddebd0ff0c1c0d32fbe814ae3081f3a431 --- diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 937134b..556cc65 100755 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -634,6 +634,7 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/ #define ENABLE_TIZEN_CACHE_MEMORY_OPTIMIZATION 1 /* Keunyong Lee(ky07.lee@samsung.com) : The Patches that can reduce memory usage */ #endif #define ENABLE_TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT 1 /* Seonae Kim(sunaeluv.kim@samsung.com) : add number types for switching WK number types */ +#define ENABLE_TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR 1 /* Bunam Jeon(bunam.jeon@samsung.com) : Notify to UI process that the content has been suspended by inspector */ #define ENABLE_TIZEN_WEBKIT2_VISITED_LINKS 1 /* Jaehun Lim(ljaehun.lim@samsung.com) : workaround patch for coloring visited links. * this patch should be removed after WK2 HistoryClient is implemented. */ diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 3d0ba78..c358d59 100755 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -2225,6 +2225,11 @@ void Document::suspendActiveDOMObjects(ActiveDOMObject::ReasonForSuspension why) controller->suspendEventsForAllListeners(domWindow()); #endif + +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + if (why == ActiveDOMObject::JavaScriptDebuggerPaused) + page()->chrome()->setContentSuspendedByInspector(true); +#endif } void Document::resumeActiveDOMObjects() @@ -2240,6 +2245,10 @@ void Document::resumeActiveDOMObjects() if (DeviceOrientationController* controller = DeviceOrientationController::from(page())) controller->resumeEventsForAllListeners(domWindow()); #endif + +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + page()->chrome()->setContentSuspendedByInspector(false); +#endif } RenderView* Document::renderView() const diff --git a/Source/WebCore/page/Chrome.cpp b/Source/WebCore/page/Chrome.cpp index 450d7b3..b18f505 100644 --- a/Source/WebCore/page/Chrome.cpp +++ b/Source/WebCore/page/Chrome.cpp @@ -505,6 +505,13 @@ void Chrome::setCursor(const Cursor& cursor) m_client->setCursor(cursor); } +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) +void Chrome::setContentSuspendedByInspector(bool b) const +{ + m_client->setContentSuspendedByInspector(b); +} +#endif + void Chrome::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves) { m_client->setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves); diff --git a/Source/WebCore/page/Chrome.h b/Source/WebCore/page/Chrome.h index 9adc59e..970191e 100644 --- a/Source/WebCore/page/Chrome.h +++ b/Source/WebCore/page/Chrome.h @@ -171,6 +171,10 @@ namespace WebCore { bool requiresFullscreenForVideoPlayback(); +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + void setContentSuspendedByInspector(bool) const; +#endif + #if PLATFORM(MAC) void focusNSView(NSView*); #endif diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h index b40de3f..9b01a21 100755 --- a/Source/WebCore/page/ChromeClient.h +++ b/Source/WebCore/page/ChromeClient.h @@ -410,6 +410,10 @@ namespace WebCore { virtual bool exceededLocalFileSystemQuota(Frame*, int64_t currentUsage) = 0; #endif +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + virtual void setContentSuspendedByInspector(bool) { } +#endif + protected: virtual ~ChromeClient() { } }; diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp index 2a78b55..0251600 100755 --- a/Source/WebKit2/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp @@ -253,6 +253,9 @@ WebPageProxy::WebPageProxy(PageClient* pageClient, PassRefPtr p #if ENABLE(TIZEN_ISF_PORT) , m_didCancelCompositionFromWebProcess(false) #endif +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + , m_contentSuspendedByInspector(false) +#endif { #ifndef NDEBUG webPageProxyCounter.increment(); diff --git a/Source/WebKit2/UIProcess/WebPageProxy.h b/Source/WebKit2/UIProcess/WebPageProxy.h index 1a85048..f27ad6d 100755 --- a/Source/WebKit2/UIProcess/WebPageProxy.h +++ b/Source/WebKit2/UIProcess/WebPageProxy.h @@ -312,6 +312,10 @@ public: WebBackForwardList* backForwardList() const { return m_backForwardList.get(); } +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + bool isContentSuspendedByInspector() { return m_contentSuspendedByInspector; } +#endif + #if ENABLE(INSPECTOR) WebInspectorProxy* inspector(); #endif @@ -1419,6 +1423,10 @@ private: void exceededLocalFileSystemQuota(uint64_t frameID, const String& originIdentifier, int64_t currentUsage, PassRefPtr reply); #endif +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + void setContentSuspendedByInspector(bool); +#endif + PageClient* m_pageClient; WebLoaderClient m_loaderClient; WebPolicyClient m_policyClient; @@ -1610,6 +1618,10 @@ private: WebCore::DragSession m_currentDragSession; #endif +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + bool m_contentSuspendedByInspector; +#endif + String m_pendingAPIRequestURL; bool m_mainFrameHasHorizontalScrollbar; diff --git a/Source/WebKit2/UIProcess/WebPageProxy.messages.in b/Source/WebKit2/UIProcess/WebPageProxy.messages.in index ab713ec..8a9066f 100755 --- a/Source/WebKit2/UIProcess/WebPageProxy.messages.in +++ b/Source/WebKit2/UIProcess/WebPageProxy.messages.in @@ -480,4 +480,8 @@ messages -> WebPageProxy { #if ENABLE(TIZEN_ISF_PORT) RemoveInputMethodContext(uintptr_t id) #endif + +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + setContentSuspendedByInspector(bool isSuspended) +#endif } diff --git a/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp b/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp index 306525d..abc0c31 100755 --- a/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp +++ b/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp @@ -1194,4 +1194,11 @@ void WebPageProxy::useSettingsFont() } #endif +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) +void WebPageProxy::setContentSuspendedByInspector(bool isSuspended) +{ + m_contentSuspendedByInspector = isSuspended; +} +#endif + } // namespace WebKit diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp index a0ee02f..2ef0edf 100755 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp @@ -1054,4 +1054,10 @@ bool WebChromeClient::exceededLocalFileSystemQuota(Frame* frame, int64_t current } #endif +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) +void WebChromeClient::setContentSuspendedByInspector(bool isSuspended) +{ + m_page->send(Messages::WebPageProxy::setContentSuspendedByInspector(isSuspended)); +} +#endif } // namespace WebKit diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h index 7a1b99f..01e2136 100755 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h @@ -272,6 +272,10 @@ private: virtual bool exceededLocalFileSystemQuota(Frame*, int64_t currentQuota) OVERRIDE; #endif +#if ENABLE(TIZEN_WEBKIT2_NOTIFY_SUSPEND_BY_REMOTE_WEB_INSPECTOR) + virtual void setContentSuspendedByInspector(bool) OVERRIDE; +#endif + String m_cachedToolTip; mutable RefPtr m_cachedFrameSetLargestFrame; mutable bool m_cachedMainFrameHasHorizontalScrollbar;