Tizen 2.4 SDK Rev6 Release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20160530.220731 submit/tizen_2.4/20160530.023347
authorJaekyu Park <jk7744.park@samsung.com>
Fri, 27 May 2016 08:06:01 +0000 (17:06 +0900)
committerJaekyu Park <jk7744.park@samsung.com>
Fri, 27 May 2016 08:06:01 +0000 (17:06 +0900)
packaging/wrt.spec
po/ko_KR.po
src/view/webkit/injected-bundle/injected_bundle_uri_handling.cpp
src/view/webkit/injected-bundle/wrt-injected-bundle.cpp
src/view/webkit/view_logic.cpp
src/wrt-client/wrt-client.cpp
src/wrt-launchpad-daemon/include/preload.h [changed mode: 0644->0755]
src/wrt-launchpad-daemon/include/sigchild.h
src/wrt-launchpad-daemon/src/launchpad.cpp
src/wrt-launchpad-daemon/src/launchpad_lite.cpp

index 5b2dcee..8e51f82 100755 (executable)
@@ -1,7 +1,7 @@
 #git:framework/web/wrt
 Name:       wrt
 Summary:    web runtime
-Version:    1.0.23
+Version:    1.0.30
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0 and Flora-1.1
index 2dcf84e..64878be 100755 (executable)
@@ -35,7 +35,7 @@ msgid "IDS_BR_BODY_PASSWORD"
 msgstr "비밀번호"
 
 msgid "IDS_BR_BODY_SECURITY_CERTIFICATE_PROBLEM_MSG"
-msgstr "URL을 검색하거나 입력하세요"
+msgstr "이 사이트의 보안 인증서에 문제가 있습니다."
 
 msgid "IDS_BR_HEADER_WEB_NOTIFICATION"
 msgstr "웹 알림"
index 561be0b..3a09d2b 100644 (file)
@@ -45,6 +45,7 @@ char const * const SCHEME_TYPE_FILE = "file";
 char const * const SCHEME_TYPE_WIDGET = "widget";
 char const * const SCHEME_TYPE_APP = "app";
 char const * const SCHEME_TYPE_HTTP = "http";
+char const * const SCHEME_TYPE_DATA = "data";
 char const * const PARAM_URL = "param:url";
 char const * const ACE_IGNORED_SCHEMA[] = {
     "file://",
@@ -117,15 +118,14 @@ bool checkWhitelist(const char *url)
     if (url == NULL) {
         return true;
     }
-
     std::unique_ptr<iri_t, decltype(&iri_destroy)> iri(iri_parse(url), iri_destroy);
     if (!iri->scheme || !iri->host || strlen(iri->host) == 0) {
         return true;
     }
     std::string scheme = iri->scheme;
-    std::string host = iri->host;
 
-    if (scheme.find(SCHEME_TYPE_HTTP) == std::string::npos) {
+    if (scheme.find(SCHEME_TYPE_HTTP) == std::string::npos &&
+        scheme.find(SCHEME_TYPE_DATA) == std::string::npos) {
         return true;
     }
 
index e3dd260..b236607 100755 (executable)
@@ -594,6 +594,11 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody)
                                               m_encodedBundle.c_str(),
                                               m_theme.c_str());
         }
+
+#ifdef USE_XWALK_LOADER
+        wrt::XWalkExtensionRendererController& controller = wrt::XWalkExtensionRendererController::GetInstance();
+        controller.SetBundle(m_encodedBundle);
+#endif
     } else if (WKStringIsEqualToUTF8CString(
                    messageName,
                    Message::ToInjectedBundle::DISPATCH_JS_EVENT))
index 98850f2..dbc34ba 100755 (executable)
@@ -453,13 +453,28 @@ void ViewLogic::resetWidgetCommon()
         bool isReset = true;
 
         std::string url = ViewModule::UriSupport::getUri(m_model, m_startUrl, &isSelfTarget, &isReset);
-        const char* curr_url = ewk_view_url_get(m_currentEwkView);
+        DPL::OptionalString localized_url = ViewModule::UriSupport::localizeURI(DPL::FromUTF8String(url), m_model);
+
+        std::string current_localized_url;
+        const char* current_url = ewk_view_url_get(m_currentEwkView);
+        if (current_url) {
+            current_localized_url = current_url;
+            size_t pos = current_localized_url.find_first_of("#?");
+            if (pos != std::string::npos) {
+                current_localized_url = current_localized_url.substr(0, pos);
+            }
+            current_localized_url = DPL::ToUTF8String(*ViewModule::UriSupport::localizeURI(DPL::FromUTF8String(current_localized_url), m_model));
+        }
+
+        WrtLogD("current: url(%s), localized(%s)", (current_url ? current_url : "NULL"), current_localized_url.c_str());
+        WrtLogD("reset: url(%s), localized(%s)", url.c_str(), DPL::ToUTF8String(*localized_url).c_str());
+        WrtLogD("self(%d), reset(%d)", isSelfTarget, isReset);
 
         if (isSelfTarget) {
             ViewLogicMessageSupport::setCustomProperties(m_ewkContext, NULL,
                 ApplicationDataSingleton::Instance().getEncodedBundle(DPL::ToUTF8String(m_model->TizenId)));
             DispatchEventSupport::dispatchAppControlEvent(m_currentEwkView);
-        } else if (!url.compare(curr_url) && !isReset) {
+        } else if (!!localized_url && !DPL::ToUTF8String(*localized_url).compare(current_localized_url) && !isReset) {
             WrtLogD("Do not reset! Resume the current page with custom event.");
             ViewLogicMessageSupport::setCustomProperties(m_ewkContext, NULL,
                 ApplicationDataSingleton::Instance().getEncodedBundle(DPL::ToUTF8String(m_model->TizenId)));
index 205b142..4284db5 100755 (executable)
@@ -89,6 +89,7 @@ const char* const HOME = "HOME";
 const char* const APP_HOME_PATH = "/opt/home/app";
 const char* const ROOT_HOME_PATH = "/opt/home/root";
 const char* const WRT_CONSOLE_LOG_ENABLE = "WRT_CONSOLE_LOG_ENABLE";
+const char* const FILE_SCHEME = "file://";
 
 WrtClient::WrtClient(int argc, char **argv) :
     Application(argc, argv, "wrt-client", false),
@@ -914,6 +915,16 @@ void WrtClient::keyCallback(Evas_Object* obj, void* eventInfo)
         } else if (keyType == EEXT_CALLBACK_MORE) {
             // UX isn't confirmed
         }
+    } else {
+        if (keyType == EEXT_CALLBACK_BACK) {
+            std::string url = ewk_view_url_get(obj);
+            std::string fileScheme = FILE_SCHEME;
+            if (url.length() > fileScheme.length() &&
+                !(std::equal(fileScheme.begin(), fileScheme.end(), url.begin()))) {
+                WrtLogW("Back to previous page");
+                m_widget->Backward();
+            }
+        }
     }
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 3ad134d..2908a8e
@@ -163,7 +163,7 @@ static inline void __preload_init_for_wrt()
     }
 
     while (fgets(soname, MAX_LOCAL_BUFSZ, preload_list) != NULL) {
-        strcpy(soname_untaint,soname);
+        snprintf(soname_untaint, MAX_LOCAL_BUFSZ, "%s", soname);
         memset(soname,'\0',MAX_LOCAL_BUFSZ);
         size_t len = strnlen(soname_untaint, MAX_LOCAL_BUFSZ);
         if (len > 0) {
index 5f62b5f..c0eeaaa 100644 (file)
@@ -92,7 +92,7 @@ static inline int __send_app_dead_signal(int dead_pid)
     return 0;
 }
 
-static inline int __send_app_launch_signal(int launch_pid)
+static inline int __send_app_launch_signal(int launch_pid, const char *app_id)
 {
     DBusMessage *message;
 
@@ -106,6 +106,7 @@ static inline int __send_app_launch_signal(int launch_pid)
 
     if (dbus_message_append_args(message,
                                  DBUS_TYPE_UINT32, &launch_pid,
+                                 DBUS_TYPE_STRING, &app_id,
                                  DBUS_TYPE_INVALID) == FALSE)
     {
         WrtLogE("Failed to load data error");
index f02f414..c6dec5f 100755 (executable)
@@ -548,7 +548,7 @@ end:
         if (is_real_launch) {
             /*TODO: retry*/
             __signal_block_sigchld();
-            __send_app_launch_signal(pid);
+            __send_app_launch_signal(pid, pkg_name);
 
 #if ENABLE(PRE_LAUNCH)
             if (is_pre_launching_appid(pkg_name)) {
index f2f7697..f23d276 100644 (file)
@@ -327,7 +327,7 @@ end:
         if (is_real_launch) {
             /*TODO: retry*/
             __signal_block_sigchld();
-            __send_app_launch_signal(pid);
+            __send_app_launch_signal(pid, pkg_name);
             __signal_unblock_sigchld();
         }
     }