resolve abnormal action on recieving appservice event
authorYunchan Cho <yunchan.cho@samsung.com>
Tue, 6 Nov 2012 06:48:13 +0000 (15:48 +0900)
committerYunchan Cho <yunchan.cho@samsung.com>
Fri, 16 Nov 2012 06:17:47 +0000 (15:17 +0900)
[Issue#] appservice didn't work in the wrt
[Problem] mime check function didn't compare NULL value
[Cause] N/A
[Solution] Comparing NULL value is added to code checking appservice

Change-Id: I8af9248fa6586a24aee3a0d6bca7d18eb0dced5a

src/view/common/view_logic_uri_support.cpp
src/view/webkit/view_logic.cpp

index 5085cb1..4d85df2 100644 (file)
@@ -76,6 +76,10 @@ bool compareServiceData(ServiceDataType type,
             return origin == other;
         }
     } else if (SERVICE_DATA_TYPE_MIME == type) {
+        if (other == "") {
+            return origin == other;
+        }
+
         std::list<std::string> vectorOrigin =
             parsingMimeData(origin, SERVICE_DATA_MIME_TOKEN);
         if (SIZE_OF_MIME_ELEMENT != vectorOrigin.size()) {
index 30fe6f8..2ea67ee 100644 (file)
@@ -288,35 +288,15 @@ void ViewLogic::resetWidget()
             return;
         }
         if (DPL::ToUTF8String(*servicedUri) == currentUri) {
-            // set only encoded bundle
-            double scale = elm_config_scale_get();
-            PluginModuleSupport::setCustomProperties(
-                m_ewkContext,
-                &scale,
-                ApplicationDataSingleton::Instance().getEncodedBundle());
-            // dispatch 'appservice' js event
-            PluginModuleSupport::dispatchJavaScriptEvent(
-                m_ewkContext,
-                WrtPlugins::W3C::ServiceCustomEvent,
-                NULL);
+            LogInfo("current page is reloaded");
             ewk_view_reload(m_currentEwkView);
         } else {
+            LogInfo("service page is loaded");
             m_currentUri = DPL::ToUTF8String(*servicedUri);
-            // inform wrt information for plugin loading to web process
-            PluginModuleSupport::start(
-                m_ewkContext,
-                m_model->Handle.Get(),
-                elm_config_scale_get(),
-                ApplicationDataSingleton::Instance().getEncodedBundle(),
-                m_theme.c_str(),
-                m_model->SettingList.Get().isEncrypted());
-            // load page
-            ewk_view_url_set(m_currentEwkView, m_currentUri.c_str());
+            ewk_view_uri_set(m_currentEwkView, m_currentUri.c_str());
         }
     }
 
-    resumeWebkit(m_currentEwkView);
-
     // call user callback
     if (!m_cbs->reset.empty()) {
         m_cbs->reset(true);