#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
msgstr "비밀번호"
msgid "IDS_BR_BODY_SECURITY_CERTIFICATE_PROBLEM_MSG"
-msgstr "URL을 검색하거나 입력하세요"
+msgstr "이 사이트의 보안 인증서에 문제가 있습니다."
msgid "IDS_BR_HEADER_WEB_NOTIFICATION"
msgstr "웹 알림"
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://",
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;
}
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))
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)));
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),
} 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();
+ }
+ }
}
}
}
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) {
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;
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");
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)) {
if (is_real_launch) {
/*TODO: retry*/
__signal_block_sigchld();
- __send_app_launch_signal(pid);
+ __send_app_launch_signal(pid, pkg_name);
__signal_unblock_sigchld();
}
}