From: Taeyun An Date: Mon, 3 Jun 2013 10:20:13 +0000 (+0900) Subject: Set same page group as the caller page when creating window X-Git-Tag: submit/tizen_2.2/20130714.131554~179^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e48162b4da31d6717bc2de02bd3b1590a92f5029;p=framework%2Fweb%2Fwebkit-efl.git Set same page group as the caller page when creating window [Title] Set same page group as the caller page when creating window [Issue#] N_SE-37344 [Problem] A blank window is created when clicking the score link in livescore.com [Cause] WebCore cannot find out the "target" for the created window because the page group for the new window is not same as the previous window. [Solution] Set same page group as the caller page when creating window Change-Id: I5f48070b8f1cc24bf4890a3a1589a832a41432af --- diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 556cc65..71dc544 100755 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -648,6 +648,7 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/ #endif #define ENABLE_TIZEN_WEBKIT2_CONTEXT_MENU_TEXT_SELECTION_MODE 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs to add "Text selection mode" options to context menu */ #define ENABLE_TIZEN_WEBKIT2_CREATE_VIEW_WITH_CREATED_PAGE_GROUP_WITH_IDENTIFIER 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs to create view with created page group with identifier */ +#define ENABLE_TIZEN_WEBKIT2_SAME_PAGE_GROUP_FOR_CREATE_WINDOW_OPERATION 1 /* Jongseok Yang (js45.yang@samsung.com) : The page frome create window operation has same page group as the caller page */ #define ENABLE_TIZEN_WEBKIT2_SEPERATE_LOAD_PROGRESS 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Patchs to seperate load progress callback for supporting OSP requirement - "load,progress,started", "load,progress", "load,progress,finished" */ #define ENABLE_TIZEN_WEBKIT2_CONTEXT_MENU_ICON_TYPE_SUPPORT 1 /* Yuni Jeong(yhnet.jung@samsung.com) : Support icon type's option to context menu */ #define ENABLE_TIZEN_WEBKIT2_LOCAL_IMPLEMENTATION_FOR_ERROR 1 /* Jongseok Yang(js45.yang@samsung.com) : temporary pathes to maintain local implementation for error operation */ diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp index 2ef0edf..0b9d82e 100755 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp @@ -184,7 +184,7 @@ void WebChromeClient::focusedFrameChanged(Frame* frame) WebProcess::shared().connection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page->pageID()); } -Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction) +Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction) { uint32_t modifiers = static_cast(InjectedBundleNavigationAction::modifiersForNavigationAction(navigationAction)); int32_t mouseButton = static_cast(InjectedBundleNavigationAction::mouseButtonForNavigationAction(navigationAction)); @@ -198,6 +198,11 @@ Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest& request, con return 0; WebProcess::shared().createWebPage(newPageID, parameters); +#if ENABLE(TIZEN_WEBKIT2_SAME_PAGE_GROUP_FOR_CREATE_WINDOW_OPERATION) + WebCore::Page* page = WebProcess::shared().webPage(newPageID)->corePage(); + page->setGroupName(frame->page()->groupName()); + return page; +#endif return WebProcess::shared().webPage(newPageID)->corePage(); }