From: sung-su.kim Date: Mon, 15 Jul 2013 13:02:24 +0000 (+0900) Subject: [Release] wrt_0.8.240 X-Git-Tag: accepted/tizen/20131002.083908~17^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2fbe73e23330719fa30bb4275a339dd6a0452847;p=platform%2Fframework%2Fweb%2Fwrt.git [Release] wrt_0.8.240 Change-Id: I89b96673d21c4c95091af57fe02b097d07fd09f9 --- diff --git a/data/Daemon.edc b/data/Daemon.edc index 77467a0..6530335 100644 --- a/data/Daemon.edc +++ b/data/Daemon.edc @@ -171,137 +171,69 @@ collections { name: "popupWithCheck"; parts { part { - name: "pad_t"; + name: "bg"; + type: RECT; scale : 1; - mouse_events: 0; - repeat_events: 1; description { state: "default" 0.0; - align: 0.5 0.0; - min: 0 22; - fixed: 0 1; - rel1 { - relative: 1.0 0.0;to_x: "pad_l"; - } - rel2 { - relative: 0.0 0.0;to_x: "pad_r"; - } - } - } - part { - name: "pad_l"; - scale: 1; - description { - state: "default" 0.0; - min : 16 0; - fixed: 1 0; - rel1 { - relative: 0.0 0.0; - } - rel2 { - relative: 0.0 1.0; - } align: 0.0 0.0; - } - } - part { - name: "pad_r"; - scale: 1; - description { - state: "default" 0.0; - min : 16 0; - fixed: 1 0; + min: 0 230; + visible: 0; rel1 { - relative: 1.0 0.0; + relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; } - align: 1.0 0.0; } } - part { - name:"elm.swallow.content"; + part{ + name:"elm.swallow.label"; type: SWALLOW; scale : 1; description { state: "default" 0.0; - min: 380 0; - align: 0.5 0.5; - fixed: 1 0; - rel1 { - relative: 0.5 1.0; - to: "pad_t"; - } - rel2 { - relative: 0.5 0.0; - to: "pad_b"; - } - } - } - part { - name: "pad_b"; - scale : 1; - mouse_events: 0; - description { - state: "default" 0.0; - align: 0.5 1.0; - min: 0 66; - fixed: 0 1; - rel1 { - relative: 1.0 1.0;to_x: "pad_l"; - } - rel2 { - relative: 0.0 1.0;to_x: "pad_r"; - } + align: 0.0 0.5; + fixed: 1 1; + rel1 { relative: 0.1 0.35; to: "bg"; } + rel2 { relative: 0.9 0.35; to: "bg"; } } } - part { - name: "elm.swallow.end"; + part{ + name:"elm.swallow.checkbox"; type: SWALLOW; scale : 1; - mouse_events: 1; - repeat_events: 1; description { state: "default" 0.0; - align: 0.0 0.5; - rel1 { - relative: 0.18 0.0; - to: "pad_b"; - } - rel2 { - relative: 1.0 1.0; - to: "pad_b"; - } + visible: 1; + align: 0.0 0.0; + fixed: 1 1; + rel1 { relative: 0.1 0.7; to: "bg"; } + rel2 { relative: 0.1 0.7; to: "bg"; } } } - part { - name: "elm.text"; + part{ + name:"elm.text"; type: TEXT; scale : 1; description { state: "default" 0.0; + visible: 1; + color: 255 255 255 255; text { - font: "SLP:style=Medium"; - size: 24; - min: 0 0; - align: 0.5 0.5; - text_class: "slp"; + font: "Tizen:style=Medium"; + size: 35; + align: 0.0 0.5; } - color: 0 0 0 255; align: 0.0 0.5; - rel1 { - relative: 0.10 0.0; - to: "pad_b"; - } - rel2 { - relative: 1.0 1.0; - to: "pad_b"; - } + fixed: 1 1; + rel1 { relative: 1.0 0.0; to: "elm.swallow.checkbox"; } + rel2 { relative: 1.0 1.0; to_y: "elm.swallow.checkbox"; } } } - } - } + } //end of parts + } //end of group + group { name: "authChallengePopup"; parts { diff --git a/packaging/wrt.spec b/packaging/wrt.spec index 4f97293..a8c87a2 100644 --- a/packaging/wrt.spec +++ b/packaging/wrt.spec @@ -1,7 +1,7 @@ #git:framework/web/wrt Name: wrt Summary: web runtime -Version: 0.8.238 +Version: 0.8.240 Release: 1 Group: Development/Libraries License: Apache License, Version 2.0 diff --git a/src/view/common/view_logic_certificate_support.cpp b/src/view/common/view_logic_certificate_support.cpp index 059e633..4207629 100644 --- a/src/view/common/view_logic_certificate_support.cpp +++ b/src/view/common/view_logic_certificate_support.cpp @@ -115,8 +115,8 @@ Evas_Object* CertificateSupportUtil::createPopup( evas_object_show(check); elm_object_part_text_set(layout, "elm.text", checkText); - elm_object_part_content_set(layout, "elm.swallow.content", label); - elm_object_part_content_set(layout, "elm.swallow.end", check); + elm_object_part_content_set(layout, "elm.swallow.label", label); + elm_object_part_content_set(layout, "elm.swallow.checkbox", check); evas_object_show(layout); elm_object_content_set(popup, layout); diff --git a/src/view/common/view_logic_security_origin_support.cpp b/src/view/common/view_logic_security_origin_support.cpp index 6ef04de..ff82eb4 100644 --- a/src/view/common/view_logic_security_origin_support.cpp +++ b/src/view/common/view_logic_security_origin_support.cpp @@ -115,8 +115,8 @@ Evas_Object* SecurityOriginSupportUtil::createPopup( evas_object_show(check); elm_object_part_text_set(layout, "elm.text", checkText); - elm_object_part_content_set(layout, "elm.swallow.content", label); - elm_object_part_content_set(layout, "elm.swallow.end", check); + elm_object_part_content_set(layout, "elm.swallow.label", label); + elm_object_part_content_set(layout, "elm.swallow.checkbox", check); evas_object_show(layout); elm_object_content_set(popup, layout); diff --git a/src/view/webkit/CMakeLists.txt b/src/view/webkit/CMakeLists.txt index cbbbf3e..7a1a6be 100644 --- a/src/view/webkit/CMakeLists.txt +++ b/src/view/webkit/CMakeLists.txt @@ -16,7 +16,7 @@ # @file src/view/webkit/CMakeLists.txt # @author Pawel Sikorski (p.sikorski@samsung.com) -# webkit2 +ADD_DEFINITIONS("-DWRT_LOG") include(FindPkgConfig) diff --git a/src/view/webkit/injected-bundle/CMakeLists.txt b/src/view/webkit/injected-bundle/CMakeLists.txt index 45d1215..bf19c61 100644 --- a/src/view/webkit/injected-bundle/CMakeLists.txt +++ b/src/view/webkit/injected-bundle/CMakeLists.txt @@ -16,7 +16,7 @@ # @file src/view/webkit/injected-bundle/CMakeLists.txt # @author Lukasz Wrzosek (l.wrzosek@samsung.com) -# webkit2 +ADD_DEFINITIONS("-DWRT_BUNDLE_LOG") include(FindPkgConfig) diff --git a/src/view/webkit/injected-bundle/injected_bundle_uri_handling.cpp b/src/view/webkit/injected-bundle/injected_bundle_uri_handling.cpp index a2aaae9..b2ea952 100644 --- a/src/view/webkit/injected-bundle/injected_bundle_uri_handling.cpp +++ b/src/view/webkit/injected-bundle/injected_bundle_uri_handling.cpp @@ -119,7 +119,7 @@ bool checkWARP(const char *url, const DPL::String& tizenId) bool checkWhitelist(const char *url) { - LogInfo("Check WhiteList for uri: " << url); + LogInfo("Check WhiteList"); if (url == NULL) { return true; } @@ -348,20 +348,11 @@ bool processMainResource(const DPL::String& inputURI, return true; } -bool processURIForPlugin(const char* url, const DPL::String &tizenId) +bool processURIForPlugin(const char* url) { if (!checkWhitelist(url)) { return false; } - DPL::OptionalString found = - W3CFileLocalization::getFilePathInWidgetPackageFromUrl( - tizenId, - DPL::FromUTF8String(std::string(url))); - if (found.IsNull()) { - LogDebug("Path not found within current locale in current widget"); - return false; - } - return true; } diff --git a/src/view/webkit/injected-bundle/injected_bundle_uri_handling.h b/src/view/webkit/injected-bundle/injected_bundle_uri_handling.h index 73bc23a..f7705b9 100644 --- a/src/view/webkit/injected-bundle/injected_bundle_uri_handling.h +++ b/src/view/webkit/injected-bundle/injected_bundle_uri_handling.h @@ -37,7 +37,7 @@ bool processURI(const std::string& inputURI, bool processMainResource(const DPL::String& inputURI, const DPL::String& tizenId, WrtDB::WidgetSecurityModelVersion m_securityModelVersion); -bool processURIForPlugin(const char* url, const DPL::String &tizenId); +bool processURIForPlugin(const char* url); DPL::OptionalString localizeURI(const DPL::String& inputURI, const DPL::String& tizenId); std::string localizeURI(const std::string& inputURI, const std::string& tizenId); diff --git a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp index bd13d0b..b0252f4 100644 --- a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp +++ b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include #include @@ -51,6 +50,7 @@ #include #include +#include #include #include @@ -111,7 +111,7 @@ Bundle::Bundle(WKBundleRef bundle) : WrtDB::WrtDatabase::attachToThreadRO(); LOG_PROFILE_STOP("Bundle attachToThread"); } Catch (DPL::DB::SqlConnection::Exception::Base) { - LogError("## Db attach was failed! Terminate WebProcess by force. ##"); + _E("## Db attach was failed! Terminate WebProcess by force. ##"); exit(-1); } @@ -125,7 +125,7 @@ Bundle::~Bundle() WrtDB::WrtDatabase::detachFromThread(); if (!m_pagesList.empty()) { - LogError("There are not closed pages!"); + _E("There are not closed pages!"); } WKRelease(m_bundle); } @@ -136,7 +136,6 @@ void Bundle::didCreatePageCallback( const void* clientInfo) { LOG_PROFILE_START("didCreatePageCallback"); - LogDebug("didCreatePageCallback called"); Bundle* This = static_cast(const_cast(clientInfo)); This->didCreatePage(page); LOG_PROFILE_STOP("didCreatePageCallback"); @@ -148,7 +147,6 @@ void Bundle::didReceiveMessageCallback( WKTypeRef messageBody, const void *clientInfo) { - LogDebug("didReceiveMessageCallback called"); Bundle* bundle = static_cast(const_cast(clientInfo)); bundle->didReceiveMessage(messageName, messageBody); } @@ -158,8 +156,7 @@ void Bundle::willDestroyPageCallback( WKBundlePageRef page, const void* clientInfo) { - LogDebug("willDestroyPageCallback called"); - Bundle* This = static_cast(const_cast(clientInfo)); + Bundle* This = static_cast(const_cast(clientInfo)); This->willDestroyPage(page); } @@ -167,7 +164,7 @@ void Bundle::didCreatePage(WKBundlePageRef page) { if (!m_initialized) { - LogError("## Injected-bundle was not initialized! Terminate WebProcess by force. ##"); + _E("## Injected-bundle was not initialized! Terminate WebProcess by force. ##"); exit(-1); } @@ -175,7 +172,7 @@ void Bundle::didCreatePage(WKBundlePageRef page) auto context = WKBundleFrameGetJavaScriptContext(mainFrame); m_pagesList.push_back(page); m_pageGlobalContext.insertContextForPage(page, context); - LogDebug("created Page : " << page << " created JSContext : " << context); + _D("created Page : %p created JSContext : %p", page, context); m_viewmodesSupport->initialize(page); WKBundlePageResourceLoadClient resourceLoadClient = { @@ -242,7 +239,7 @@ void Bundle::didCreatePage(WKBundlePageRef page) void Bundle::willDestroyPage(WKBundlePageRef page) { - LogDebug("Destroyed page : " << page); + _D("Destroyed page : %p", page); auto context = m_pageGlobalContext.getContextForPage(page); m_pagesList.remove(page); @@ -295,8 +292,10 @@ void Bundle::bypassCORSforWARPAccessList(WrtDB::WidgetDAOReadOnly & dao) std::string source = DPL::ToUTF8String(dao.getFullPath()); #endif - LogDebug("WARP to WK whitelist position: " << source << " for " - << access.strIRI << " subDomains: " << access.bSubDomains); + _D("WARP to WK whitelist position: %s for %s subDomains: %d", + source.c_str(), + DPL::ToUTF8String(access.strIRI).c_str(), + access.bSubDomains); WKStringRef wkSource = WKStringCreateWithUTF8CString(source.c_str()); WKStringRef wkHost; @@ -330,21 +329,18 @@ void Bundle::bypassCORSforWARPAccessList(WrtDB::WidgetDAOReadOnly & dao) void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) { - LogDebug("got message type: " << toString(messageName).c_str()); + _D("message name: %s", toString(messageName).c_str()); if (WKStringIsEqualToUTF8CString(messageName, Message::ToInjectedBundle::START)) { if (!messageBody || WKStringGetTypeID() != WKGetTypeID(messageBody)) { - LogError("Wrong message format received, ignoring"); + _E("Wrong message format received, ignoring"); return; } std::string msgString = toString(static_cast(messageBody)); - LogDebug("Got message text: " << msgString); - LogDebug("loading Page : " << m_pagesList.back() << - " loading JSContext : " << - m_pageGlobalContext.getContextForPage(m_pagesList.back())); + _D("message body: %s", msgString.c_str()); // set information from ui process std::stringstream ssMsg(msgString); std::string argScale; @@ -364,23 +360,20 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) } else if (WKStringIsEqualToUTF8CString(messageName, Message::ToInjectedBundle::SHUTDOWN)) { - LogDebug("shutdown plugins"); - if (m_pagesList.empty()) { + _D("shutdown plugins"); PluginModule::shutdown(); } else { - LogInfo( - "PluginModule shutdown ignored, there are still alive pages!"); + _D("PluginModule shutdown ignored, there are still alive pages!"); } } else if (WKStringIsEqualToUTF8CString(messageName, Message::ToInjectedBundle::SET_CUSTOM_PROPERTIES)) { - LogDebug("reset custom properties of window objects"); // set information from ui process std::string msgString = toString(static_cast(messageBody)); - + _D("message body: %s", msgString.c_str()); std::string argScale; std::string argEncodedBundle; std::string argTheme; @@ -404,7 +397,7 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) messageName, Message::ToInjectedBundle::DISPATCH_JS_EVENT)) { - LogDebug("dispatch javascript event to created frames"); + _D("dispatch javascript event to created frames"); using namespace WrtPlugins::W3C; // set information from ui process @@ -439,9 +432,8 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) messageName, Message::ToInjectedBundle::INIT)) { - LogDebug("initialize"); - if (!m_initialized) { + _D("initialize"); std::string msgString = toString(static_cast(messageBody)); m_widgetTizenId = DPL::FromASCIIString(msgString); WrtDB::WidgetDAOReadOnly dao(m_widgetTizenId); @@ -462,13 +454,12 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) GetUserWidgetExecPath() + "/" + tzAppId; } - LogDebug("set_app_smack_label(" << appPath << ")"); - if (set_app_smack_label(appPath.c_str()) != 0) - { - LogError("set_app_smack_label() failed"); + _D("set_app_smack_label(%s)", appPath.c_str()); + if (set_app_smack_label(appPath.c_str()) != 0) { + _E("set_app_smack_label() failed"); } - LogDebug("set_app_privilege(" << appPath << ")"); + _D("set_app_privilege(%s)", appPath.c_str()); set_app_privilege(tzPkgId.c_str(), PRIVILEGE_APP_TYPE, appPath.c_str()); } @@ -487,18 +478,16 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) } LanguageTags tags = LanguageTagsProviderSingleton::Instance().getLanguageTags(); - LogDebug("Current widget locales (language tags):"); + _D("Current widget locales (language tags):"); FOREACH(it, tags) { - LogDebug("Locale: " << *it); + _D("Locale: %s", DPL::ToUTF8String(*it).c_str()); } m_widgetType = dao.getWidgetType(); - LogDebug("m_widgetType : " << m_widgetType.getApptypeToString() << - "(m_widgetTizenId:" << m_widgetTizenId << ")"); - LogDebug("Preload PluginLogicSingleton"); + _D("Preload PluginLogicSingleton"); PluginModule::init(WrtDB::WidgetDAOReadOnly::getHandle(m_widgetTizenId)); - LogDebug("Preload PluginLogicSingleton_end"); + _D("Preload PluginLogicSingleton_end"); m_securityModelVersion = dao.getSecurityModelVersion(); #ifdef CORS_WHITELISTING_ENABLED @@ -509,7 +498,7 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) new InjectedBundle::ViewmodesSupport(m_widgetTizenId)); m_initialized = true; } else { - LogDebug("already initalized"); + _D("already initalized"); } } else if (WKStringIsEqualToUTF8CString( messageName, @@ -517,7 +506,7 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) { std::string msgString = toString(static_cast(messageBody)); - LogDebug("set x window handle [" << msgString << "]"); + _D("set x window handle [%s]", msgString.c_str()); IPCMessageSupport::setXwindowHandle(atoi(msgString.c_str())); } else if (WKStringIsEqualToUTF8CString( messageName, @@ -525,7 +514,7 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) { std::string msgBody = toString(static_cast(messageBody)); - LogDebug("set viewmode to [" << msgBody << "]"); + _D("set viewmode to [%s]", msgBody.c_str()); if (msgBody == Message::ToInjectedBundle::SET_VIEWMODES_MSGBODY_EXIT) { m_viewmodesSupport->exitViewmodesAllPages(); } else { @@ -538,30 +527,25 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) std::string msgBody = toString(static_cast(messageBody)); - if (msgBody.find_first_of('_') != std::string::npos) - { + if (msgBody.find_first_of('_') != std::string::npos) { std::string strHandle = msgBody.substr(0, msgBody.find_first_of('_')); std::string strBody = msgBody.substr(msgBody.find_first_of('_')+1); - LogDebug("handle: " << strHandle << ", Body:" << strBody); + _D("handle: %s, , Body: %s", strHandle.c_str(), strBody.c_str()); int handle = atoi(strHandle.c_str()); AsyncConnectionPtr connection = AsyncConnectionManager::instance().getConnection(handle); - if (connection) - { - if (connection->replyCallback) - { - LogDebug("connection->replyCallback()"); + if (connection) { + if (connection->replyCallback) { + _D("connection->replyCallback()"); (connection->replyCallback)(handle, connection->data, strBody.c_str()); } AsyncConnectionManager::instance().removeConnection(handle); - } - else - { - LogDebug("Connection is not available. Ignored."); + } else { + _D("Connection is not available. Ignored."); } } } @@ -587,7 +571,7 @@ void Bundle::didStartProvisionalLoadForFrameCallback( WKTypeRef* /*userData*/, const void *clientInfo) { - LogDebug("didStartProvisionalLoadForFrameCallback called"); + _D("called"); Bundle* This = static_cast(const_cast(clientInfo)); if (This->m_pageGlobalContext.find(page) == This->m_pageGlobalContext.end()) { @@ -602,7 +586,7 @@ void Bundle::didStartProvisionalLoadForFrameCallback( ContextSet::iterator i = This->m_pageContext[page].find(context); if (i == This->m_pageContext[page].end()) { - LogDebug("Initially attached frame"); + _D("Initially attached frame"); return; } @@ -616,11 +600,11 @@ void Bundle::didRemoveFrameFromHierarchyCallback( WKTypeRef* /*userData*/, const void *clientInfo) { - LogDebug("didRemoveFrameFromHierarchyCallback called"); + _D("called"); Bundle* This = static_cast(const_cast(clientInfo)); if (This->m_pageContext.count(page) == 0) { - LogDebug("his->m_pageContext.count(page) == 0"); + _D("his->m_pageContext.count(page) == 0"); return; } @@ -629,7 +613,7 @@ void Bundle::didRemoveFrameFromHierarchyCallback( ContextSet::iterator i = This->m_pageContext[page].find(context); if (i == This->m_pageContext[page].end()) { - LogWarning("Tried to unload frame which has never been loaded"); + _W("Tried to unload frame which has never been loaded"); return; } @@ -644,7 +628,7 @@ void Bundle::didFinishLoadForResourceCallback( uint64_t /*resourceIdentifier*/, const void* /*clientInfo*/) { - LogDebug("didFinishLoadForResourceCallback called"); + _D("called"); } void Bundle::didCommitLoadForFrameCallback( @@ -653,14 +637,14 @@ void Bundle::didCommitLoadForFrameCallback( WKTypeRef* /*userData*/, const void *clientInfo) { - LogInfo("didCommitLoadForFrameCallback called"); + _D("called"); LOG_PROFILE_START("didCommitLoadForFrameCallback"); Bundle* This = static_cast(const_cast(clientInfo)); WKURLRef url = WKBundleFrameCopyURL(frame); if (url == NULL) { - LogInfo("url is NULL"); + _W("url is NULL"); return; } @@ -674,7 +658,7 @@ void Bundle::didCommitLoadForFrameCallback( This->m_pageContext[page].insert(context); if (!WKBundleFrameIsMainFrame(frame)) { - LogInfo("frame isn't main frame"); + _D("frame isn't main frame"); PluginModule::start( WrtDB::WidgetDAOReadOnly::getHandle(This->m_widgetTizenId), context, @@ -686,13 +670,12 @@ void Bundle::didCommitLoadForFrameCallback( } std::string urlStr = toString(url); - if (InjectedBundleURIHandling::processURIForPlugin(urlStr.c_str(), - This->m_widgetTizenId)) - { - LogDebug("start plugin"); + + if (InjectedBundleURIHandling::processURIForPlugin(urlStr.c_str())) { + _D("start plugin"); if(This->m_pageGlobalContext.find(page) != This->m_pageGlobalContext.end()) { - LogDebug("Previous context: " << This->m_pageGlobalContext.getContextForPage(page)); + _D("Previous context: %p", This->m_pageGlobalContext.getContextForPage(page)); PluginModule::stop(This->m_pageGlobalContext.getContextForPage(page)); } LogDebug("New context: " << context); @@ -710,13 +693,13 @@ void Bundle::didCommitLoadForFrameCallback( PluginModule::loadFrame(context); } else { - LogDebug("stop plugin"); + _D("stop plugin"); if(This->m_pageGlobalContext.find(page) != This->m_pageGlobalContext.end()) { - LogDebug("Previous context: " << This->m_pageGlobalContext.getContextForPage(page)); + _D("Previous context: %p", This->m_pageGlobalContext.getContextForPage(page)); PluginModule::stop(This->m_pageGlobalContext.getContextForPage(page)); } - LogDebug("New context: " << context); + _D("New context: %p", context); This->m_pageGlobalContext.insertContextForPage(page, context); } LOG_PROFILE_STOP("didCommitLoadForFrameCallback"); @@ -730,8 +713,7 @@ WKBundlePagePolicyAction Bundle::decidePolicyForNavigationActionCallback( WKTypeRef* userData, const void* clientInfo) { - LogDebug("decidePolicyForNavigationActionCallback called"); - + _D("called"); Bundle* This = static_cast(const_cast(clientInfo)); return This->decidePolicyForAction(false, page, @@ -750,8 +732,7 @@ WKBundlePagePolicyAction Bundle::decidePolicyForNewWindowActionCallback( WKTypeRef* userData, const void* clientInfo) { - LogDebug("decidePolicyForNewWindowActionCallback called"); - + _D("called"); Bundle* This = static_cast(const_cast(clientInfo)); return This->decidePolicyForAction(true, page, @@ -769,21 +750,20 @@ WKBundlePagePolicyAction Bundle::decidePolicyForResponseCallback( WKTypeRef* /* userData */, const void* /* clientInfo */) { - LogDebug("decidePolicyForResponseCallback called"); - + _D("called"); Assert(response); WKStringRef contentTypeRef = WKURLResponseEflCopyContentType(response); std::string contentType = toString(contentTypeRef); - LogDebug("contentTypeRef : " << contentType); + _D("contentTypeRef : %s", contentType.c_str()); WKRelease(contentTypeRef); if (contentType == HTML_MIME) { - LogDebug("Accepting HTML_MIME type"); + _D("Accepting HTML_MIME type"); return WKBundlePagePolicyActionUse; } if (contentType == PHP_MIME) { - LogDebug("Accepting php type"); + _D("Accepting php type"); return WKBundlePagePolicyActionUse; } @@ -803,14 +783,13 @@ WKURLRequestRef Bundle::willSendRequestForFrame(WKURLRequestRef request) WKRelease(wkStr); WKRelease(wkUrl); - if (logEnable){ LogDebug("willSendRequestForFrame : " << stdUrl); } + if (logEnable){ _D("willSendRequestForFrame : %s", stdUrl.c_str()); } localizedUrl = InjectedBundleURIHandling::localizeURI(stdUrl, DPL::ToUTF8String(m_widgetTizenId)); bool ret = InjectedBundleURIHandling::processURI(localizedUrl, m_widgetTizenId, m_securityModelVersion); - if (!ret) - { - LogDebug("Not permitted resource: " << localizedUrl); + if (!ret) { + _D("Not permitted resource: %s", localizedUrl.c_str()); return NULL; } @@ -819,9 +798,8 @@ WKURLRequestRef Bundle::willSendRequestForFrame(WKURLRequestRef request) std::string scheme = localizedUrl.substr(0, localizedUrl.find_first_of(':')); #ifdef APP_SCHEME_ENABLED - if (scheme == SCHEME_FILE) - { - LogError("File schema blocked for: " << stdUrl); + if (scheme == SCHEME_FILE) { + _D("File schema blocked for: %s", stdUrl.c_str()); return NULL; } #endif @@ -835,23 +813,19 @@ WKURLRequestRef Bundle::willSendRequestForFrame(WKURLRequestRef request) // external scheme also need to send message to UI process for // checking roaming and security - if (scheme == SCHEME_HTTP || scheme == SCHEME_HTTPS) - { - if (logEnable){ LogDebug("external scheme return original WKURLRequestRef"); } + if (scheme == SCHEME_HTTP || scheme == SCHEME_HTTPS) { + if (logEnable){ _D("external scheme return original WKURLRequestRef"); } WKRetain(request); return request; - } - else - { + } else { std::string checkUrl = localizedUrl; - if (m_decryptionSupport->isNeedDecryption(checkUrl)) - { + if (m_decryptionSupport->isNeedDecryption(checkUrl)) { std::string decryptString = m_decryptionSupport->decryptResource(checkUrl); - if (logEnable){ LogDebug("return value : " << decryptString ); } + if (logEnable){ _D("return value : %s", decryptString.c_str()); } WKURLRef destUrl = WKURLCreateWithUTF8CString(decryptString.c_str()); @@ -866,7 +840,7 @@ WKURLRequestRef Bundle::willSendRequestForFrame(WKURLRequestRef request) WKURLRequestRef req = WKURLRequestCreateWithWKURL(newUrl); WKRelease(newUrl); - if (logEnable){ LogDebug("return value : " << localizedUrl); } + if (logEnable){ _D("return value : %s", localizedUrl.c_str()); } return req; } @@ -886,7 +860,7 @@ WKBundlePagePolicyAction Bundle::decidePolicyForAction( std::string request_uri = toString(request); - LogInfo("Uri being checked: " << request_uri); + _D("request uri : %s", request_uri.c_str()); // exception uri if (request_uri == BLANK_PAGE_URL) { @@ -905,7 +879,7 @@ WKBundlePagePolicyAction Bundle::decidePolicyForAction( m_securityModelVersion); if (!ret) { std::string blockedUrl = DPL::ToUTF8String(dplUrl); - LogDebug("URI is blocked: " << blockedUrl); + _D("URI is blocked: %s", blockedUrl.c_str()); // Send information about blocked URI to UIProcess WKStringRef urlStr = WKStringCreateWithUTF8CString(blockedUrl.c_str()); @@ -927,11 +901,9 @@ WKBundlePagePolicyAction Bundle::decidePolicyForAction( // scheme action Scheme scheme(request_scheme); - LogDebug("Scheme: " << request_scheme); - Scheme::Type type = scheme.GetType(); if (type < Scheme::FILE || type >= Scheme::COUNT) { - LogError("Invalid scheme: " << request_scheme); + _D("Unknown scheme : %s", request_scheme.c_str()); return WKBundlePagePolicyActionPassThrough; } @@ -941,20 +913,18 @@ WKBundlePagePolicyAction Bundle::decidePolicyForAction( ctx = NEW_WINDOW; } - LogDebug("Scheme type: " << type); - LogDebug("Navigation context: " << ctx); - LogDebug("Application type: " << m_widgetType.getApptypeToString()); - UriAction action; - if (m_widgetType == WrtDB::APP_TYPE_TIZENWEBAPP) { action = g_tizenActionMap[type][ctx]; } else { - LogError("Unsupported application type: " << type); + _D("Unsupported application type: %d", type); return WKBundlePagePolicyActionPassThrough; } - LogDebug("Uri action: " << action); + _D("Scheme type: %d, Navigation context: %d, Action: %d", + type, + ctx, + action); if (action != URI_ACTION_WRT) { return WKBundlePagePolicyActionPassThrough; @@ -965,12 +935,9 @@ WKBundlePagePolicyAction Bundle::decidePolicyForAction( std::string Bundle::toString(WKStringRef str) { - if (WKStringIsEmpty(str)) - { + if (WKStringIsEmpty(str)) { return ""; - } - else - { + } else { size_t size = WKStringGetMaximumUTF8CStringSize(str); char buffer[size + 1]; @@ -1039,11 +1006,10 @@ WK_EXPORT void WKBundleInitialize(WKBundleRef bundle, WKTypeRef) { - DPL::Log::LogSystemSingleton::Instance().SetTag("WRT-BUNDLE"); - LogDebug("Bundle initialized"); + _D("Bundle initialized"); DPL::Event::GetMainEventDispatcherInstance().ResetCrossEventCallHandler(); - LogDebug("ResetCrossEventCallHandler()"); + _D("ResetCrossEventCallHandler()"); static Bundle s_bundle(bundle); @@ -1058,8 +1024,7 @@ void WKBundleInitialize(WKBundleRef bundle, WKBundleSetClient(bundle, &client); // process pool - restore process priority - if (UID_ROOT == getuid()) - { + if (UID_ROOT == getuid()) { setpriority(PRIO_PROCESS, 0, DEFAULT_PRIORITY); } IPCMessageSupport::setWKBundleRef(bundle); diff --git a/src/view/webkit/view_logic.cpp b/src/view/webkit/view_logic.cpp index a87aa49..4a36af3 100644 --- a/src/view/webkit/view_logic.cpp +++ b/src/view/webkit/view_logic.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -1037,7 +1038,7 @@ void ViewLogic::loadProgressStartedCallback( Evas_Object* /*obj*/, void* /*eventInfo*/) { - LogDebug("loadProgressStartedCallback called"); + _D("loadProgressStartedCallback called"); Assert(data); ViewLogic* This = static_cast(data); if (!This->m_cbs->progressStarted.empty()) { @@ -1051,7 +1052,7 @@ void ViewLogic::loadProgressCallback( Evas_Object* obj, void* eventInfo) { - LogDebug("loadProgressCallback called"); + _D("loadProgressCallback called"); Assert(data); Assert(eventInfo); ViewLogic const * const view = static_cast(data); diff --git a/src/view/webkit/view_logic_authentication_challenge_support.cpp b/src/view/webkit/view_logic_authentication_challenge_support.cpp index 85ce0d5..9b71208 100644 --- a/src/view/webkit/view_logic_authentication_challenge_support.cpp +++ b/src/view/webkit/view_logic_authentication_challenge_support.cpp @@ -211,7 +211,7 @@ Evas_Object* createEditLayout(Evas_Object* parent, bool isPasswordEdit) elm_object_signal_emit(layout, ELM_SIGNAL_STATE_ERASER_SHOW, ELM); } elm_entry_text_style_user_push( - layout, + entry, STYLE_DEFAULT_EDITFIELD); return layout; } diff --git a/src/wrt-client/wrt-client.cpp b/src/wrt-client/wrt-client.cpp index e58677e..7acf266 100644 --- a/src/wrt-client/wrt-client.cpp +++ b/src/wrt-client/wrt-client.cpp @@ -83,7 +83,8 @@ WrtClient::WrtClient(int argc, char **argv) : m_returnStatus(ReturnStatus::Succeeded), m_widgetState(WidgetState::WidgetState_Stopped), m_initialViewMode(VIEWMODE_TYPE_MAXIMIZED), - m_currentViewMode(VIEWMODE_TYPE_MAXIMIZED) + m_currentViewMode(VIEWMODE_TYPE_MAXIMIZED), + m_isWebkitFullscreen(false) { Touch(); LogDebug("App Created"); @@ -470,10 +471,12 @@ void WrtClient::toggleFullscreenCallback(bool fullscreen) // enter fullscreen m_windowData->toggleFullscreen(true); m_currentViewMode = VIEWMODE_TYPE_FULLSCREEN; + m_isWebkitFullscreen = true; } else { // exit fullscreen m_windowData->toggleFullscreen(false); m_currentViewMode = m_initialViewMode; + m_isWebkitFullscreen = false; } } @@ -841,7 +844,11 @@ void WrtClient::hwkeyCallback(const std::string& key) || m_currentViewMode == VIEWMODE_TYPE_WINDOWED) { if (key == KeyName::BACK) { - m_widget->Backward(); + if (m_isWebkitFullscreen) { + ewk_view_fullscreen_exit(m_widget->GetCurrentWebview()); + } else { + m_widget->Backward(); + } } else if (key == KeyName::MENU) { // UX isn't confirmed // m_windowData->showCtxpopup(); diff --git a/src/wrt-client/wrt-client.h b/src/wrt-client/wrt-client.h index 6f5c238..090b202 100644 --- a/src/wrt-client/wrt-client.h +++ b/src/wrt-client/wrt-client.h @@ -146,6 +146,7 @@ class WrtClient : std::unique_ptr m_splashScreen; std::string m_initialViewMode; std::string m_currentViewMode; + bool m_isWebkitFullscreen; }; #endif // WRT_CLIENT_H