From 25fc2772429e83fdd5e22f2c4c87e7851839ce3c Mon Sep 17 00:00:00 2001 From: "sungwon2.han" Date: Thu, 7 May 2015 17:52:14 +0900 Subject: [PATCH 01/16] Support Wayland Change-Id: If63000c1599e5ee1f8627ac2ffb418e564e1e238 Signed-off-by: sungwon2.han --- cmake/EFLHelpers.cmake | 8 ++++- core/BasicUI/MenuButton.h | 1 - core/main.cpp | 1 - packaging/org.tizen.browser.spec | 20 ++++++++---- services/CMakeLists.txt | 2 +- services/SimpleUI/CMakeLists.txt | 6 ++-- services/SimpleUI/SimpleUI.cpp | 66 +++++++++++++++++++++------------------- services/SimpleUI/SimpleUI.h | 4 +-- 8 files changed, 61 insertions(+), 47 deletions(-) diff --git a/cmake/EFLHelpers.cmake b/cmake/EFLHelpers.cmake index 1424608..114408a 100644 --- a/cmake/EFLHelpers.cmake +++ b/cmake/EFLHelpers.cmake @@ -1,5 +1,11 @@ #FIXME: Do not use CMAKE_CXX_FLAGS +IF(WAYLAND_SUPPORT) + SET(WIN_PKG "ecore-wayland") +ELSE(WAYLAND_SUPPORT) + SET(WIN_PKG "ecore-x") +ENDIF(WAYLAND_SUPPORT) + include(FindPkgConfig) SET(_efl_pkgs_list @@ -12,7 +18,7 @@ SET(_efl_pkgs_list ecore-input ecore-imf edje - ecore-x + ${WIN_PKG} ) pkg_check_modules(_efl_pkgs REQUIRED "${_efl_pkgs_list}") diff --git a/core/BasicUI/MenuButton.h b/core/BasicUI/MenuButton.h index fa3c1cc..1d9d977 100644 --- a/core/BasicUI/MenuButton.h +++ b/core/BasicUI/MenuButton.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/core/main.cpp b/core/main.cpp index 18f1e11..03edda8 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -17,7 +17,6 @@ #include "BrowserLogger.h" #include -#include #include #include #include diff --git a/packaging/org.tizen.browser.spec b/packaging/org.tizen.browser.spec index 0e1111a..ffbba3b 100644 --- a/packaging/org.tizen.browser.spec +++ b/packaging/org.tizen.browser.spec @@ -8,29 +8,33 @@ Source0: %{name}-%{version}.tar.gz # Excluded tizen v3.0 wayland on tv profile build # TODO: Please remove following code block once wayland build is supported. +#%if "%{?_with_wayland}" == "1" +#ExcludeArch: armv7l i586 i686 x86_64 aarch64 +#%endif + %if "%{?_with_wayland}" == "1" -ExcludeArch: armv7l i586 i686 x86_64 aarch64 +BuildRequires: pkgconfig(ecore-wayland) +%else +BuildRequires: pkgconfig(ecore-x) +BuildRequires: pkgconfig(utilX) %endif BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(ecore-evas) BuildRequires: pkgconfig(ecore-imf) BuildRequires: pkgconfig(ecore-input) -BuildRequires: pkgconfig(ecore-x) BuildRequires: pkgconfig(edje) BuildRequires: pkgconfig(eeze) BuildRequires: pkgconfig(eina) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(embryo) BuildRequires: pkgconfig(evas) -#BuildRequires: pkgconfig(ewebkit2) BuildRequires: pkgconfig(chromium-efl) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(capi-network-connection) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libcurl) -BuildRequires: pkgconfig(utilX) BuildRequires: browser-provider-devel BuildRequires: cmake @@ -46,7 +50,6 @@ BuildRequires: boost-system BuildRequires: boost-test %endif %ifarch armv7l -#BuildRequires: pkgconfig(ewebkit2) BuildRequires: pkgconfig(chromium-efl) BuildRequires: pkgconfig(dlog) %endif @@ -80,7 +83,12 @@ cmake .. \ -DMANIFESTDIR=%{_manifestdir} \ -DICONDIR=%{_icondir} \ -DBUILD_UT=%{BUILD_UT} \ - -DCOVERAGE_STATS=%{COVERAGE_STATS} + -DCOVERAGE_STATS=%{COVERAGE_STATS} \ +%if "%{?_with_wayland}" == "1" + -DWAYLAND_SUPPORT=On +%else + -DWAYLAND_SUPPORT=Off +%endif make %{!?verbose_make}%{?verbose_make:VERBOSE=1} -j%{?jobs}%{!?jobs:1} diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt index 8952538..d4b8ddc 100644 --- a/services/CMakeLists.txt +++ b/services/CMakeLists.txt @@ -6,6 +6,6 @@ add_subdirectory(SimpleUI) add_subdirectory(SimpleURI) add_subdirectory(StorageService) add_subdirectory(HistoryService) -add_subdirectory(PlatformInputManager) +#add_subdirectory(PlatformInputManager) add_subdirectory(SessionStorage) add_subdirectory(BookmarkService) diff --git a/services/SimpleUI/CMakeLists.txt b/services/SimpleUI/CMakeLists.txt index 6539054..96fe02c 100644 --- a/services/SimpleUI/CMakeLists.txt +++ b/services/SimpleUI/CMakeLists.txt @@ -46,7 +46,7 @@ include_directories(${CMAKE_SOURCE_DIR}/services/StorageService/Storage/include) include_directories(${CMAKE_SOURCE_DIR}/services/FavoriteService) include_directories(${CMAKE_SOURCE_DIR}/services/HistoryService) include_directories(${CMAKE_SOURCE_DIR}/services/BookmarksUI) -include_directories(${CMAKE_SOURCE_DIR}/services/PlatformInputManager) +#include_directories(${CMAKE_SOURCE_DIR}/services/PlatformInputManager) include_directories(${CMAKE_SOURCE_DIR}/services/SessionStorage) include(FindPkgConfig) @@ -59,13 +59,13 @@ add_dependencies(${PROJECT_NAME} SimpleURI) add_dependencies(${PROJECT_NAME} StorageService) add_dependencies(${PROJECT_NAME} HistoryService) add_dependencies(${PROJECT_NAME} BookmarksUI) -add_dependencies(${PROJECT_NAME} PlatformInputManager) +#add_dependencies(${PROJECT_NAME} PlatformInputManager) add_dependencies(${PROJECT_NAME} SessionStorage) target_link_libraries(${PROJECT_NAME} SimpleURI) target_link_libraries(${PROJECT_NAME} StorageService) target_link_libraries(${PROJECT_NAME} HistoryService) target_link_libraries(${PROJECT_NAME} BookmarksUI) -target_link_libraries(${PROJECT_NAME} PlatformInputManager) +#target_link_libraries(${PROJECT_NAME} PlatformInputManager) target_link_libraries(${PROJECT_NAME} SessionStorage) target_link_libraries(${PROJECT_NAME} ${EFL_LDFLAGS}) diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 08fc80e..60c807a 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include "Config.h" @@ -71,6 +70,8 @@ SimpleUI::SimpleUI(/*Evas_Object *window*/) { elm_init(static_cast(NULL), static_cast(NULL)); Evas_Object *main_window = elm_win_util_standard_add("browserApp", "browserApp"); + if (main_window == NULL) + BROWSER_LOGE("Failed to create main window"); // m_zoomList = NULL; setMainWindow(main_window); } @@ -110,11 +111,11 @@ int SimpleUI::exec(const std::string& _url) elm_win_alpha_set(m_window.get(), EINA_FALSE); // creatin main window - int width = 0; - int height = 0; - ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height); - evas_object_move(m_window.get(), 0, 0); - evas_object_resize(m_window.get(), width, height); + //int width = 1920; + //int height = 1080; + //ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height); + //evas_object_move(m_window.get(), 0, 0); + //evas_object_resize(m_window.get(), width, height); // create main layout m_mainLayout = elm_layout_add(m_window.get()); @@ -191,7 +192,7 @@ int SimpleUI::exec(const std::string& _url) (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.historyservice")); M_ASSERT(m_historyService); - +/* // Platforminputmanager BROWSER_LOGD("[%s:%d] service: platforminputmanager ", __PRETTY_FUNCTION__, __LINE__); m_platformInputManager = @@ -201,7 +202,7 @@ int SimpleUI::exec(const std::string& _url) M_ASSERT(m_platformInputManager); m_platformInputManager->init(m_window.get()); m_platformInputManager->returnPressed.connect(boost::bind(&elm_exit)); - +*/ createActions(); // left buttons leftButtonBar = std::make_shared(m_mainLayout, "SimpleUI/LeftButtonBar.edj", "left_button_bar"); @@ -378,13 +379,13 @@ void SimpleUI::createActions() m_showSettingsPopup = sharedAction(new Action("Settings")); m_showSettingsPopup->setToolTip("Settings"); m_showSettingsPopup->setIcon("browser/toolbar_setting"); - +/* m_settingPointerMode = sharedAction(new Action("Pointer mode")); m_settingPointerMode->setToolTip("Switch to Pointer Mode"); m_settingPointerMode->setCheckable(true); m_settingPointerMode->setChecked(m_platformInputManager->getPointerModeEnabled()); m_settingPointerMode->setEnabled(true); - +*/ m_settingPrivateBrowsing = sharedAction(new Action("Private browsing")); m_settingPrivateBrowsing->setToolTip("On exit from private mode all cookies, history, and stored data will be deleted"); m_settingPrivateBrowsing->setCheckable(true); @@ -420,7 +421,7 @@ void SimpleUI::connectActions() m_history->triggered.connect(boost::bind(&SimpleUI::showHistory, this)); m_showSettingsPopup->triggered.connect(boost::bind(&SimpleUI::showSettingsMenu, this)); - m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::services::PlatformInputManager::setPointerModeEnabled, m_platformInputManager.get(), _1)); +// m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::services::PlatformInputManager::setPointerModeEnabled, m_platformInputManager.get(), _1)); m_settingPrivateBrowsing->toggled.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, _1)); m_settingDeleteHistory->triggered.connect(boost::bind(&SimpleUI::settingsDeleteHistory, this)); m_settingDeleteData->triggered.connect(boost::bind(&SimpleUI::settingsDeleteData, this));; @@ -598,7 +599,7 @@ void SimpleUI::onBookmarkRemoved(const std::string& uri) webTitleBar->removeFavIcon(); webTitleBar->show("Removed from favorites"); } - +/* void SimpleUI::onReturnPressed(MenuButton *m) { BROWSER_LOGD("[%s]", __func__); @@ -607,7 +608,7 @@ void SimpleUI::onReturnPressed(MenuButton *m) hidePopup.disconnect_all_slots(); m->hidePopup(); } - +*/ void SimpleUI::backEnable(bool enable) { m_back->setEnabled(enable); @@ -698,9 +699,10 @@ void SimpleUI::loadFinished() m_webEngine->getFavicon())); m_history->setEnabled(true); } - +/* if(!m_platformInputManager->getPointerModeEnabled()) elm_object_focus_set(leftButtonBar->getButton("refresh_stop_button"), EINA_TRUE); +*/ } void SimpleUI::loadError() @@ -813,9 +815,9 @@ void SimpleUI::showZoomMenu() m_zoomList->setZoom(currentZoomType); BROWSER_LOGD("Current zoom factor from webkit %d%%", m_webEngine->getZoomFactor()); - m_platformInputManager->returnPressed.disconnect_all_slots(); - m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); - hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); +// m_platformInputManager->returnPressed.disconnect_all_slots(); +// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); +// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); m_zoomList->showPopup(); } @@ -834,13 +836,13 @@ void SimpleUI::showTabMenu() m_tabList->tabClicked.connect(boost::bind(&SimpleUI::tabClicked, this, _1)); m_tabList->tabDelete.connect(boost::bind(&SimpleUI::closeTab, this, _1)); - m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get())); - m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get())); - m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get())); +// m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get())); +// m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get())); +// m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get())); } - m_platformInputManager->returnPressed.disconnect_all_slots(); - m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); - hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); +// m_platformInputManager->returnPressed.disconnect_all_slots(); +// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); +// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); m_tabList->addItems(m_webEngine->getTabContents()); m_tabList->setCurrentTabId(m_webEngine->currentTabId()); m_tabList->disableNewTabBtn(m_tabList->getItemcCount() >= m_tabLimit); @@ -948,9 +950,9 @@ void SimpleUI::showSettingsMenu() m_settings->addAction( m_settingDeleteFavorite); m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::base_ui::Settings::setPointerModeEnabled, m_settings.get(), _1)); } - m_platformInputManager->returnPressed.disconnect_all_slots(); - m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); - hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); +// m_platformInputManager->returnPressed.disconnect_all_slots(); +// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); +// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); m_settingDeleteHistory->setEnabled(m_historyService->getHistoryItemsCount()); m_settingDeleteFavorite->setEnabled(m_favoriteService->countBookmarksAndSubFolders()); m_settings->showPopup(); @@ -965,13 +967,13 @@ void SimpleUI::showHistory() m_historyList->deleteHistoryItem.connect(boost::bind(&tizen_browser::services::HistoryService::clearURLHistory, m_historyService.get(),_1)); m_historyList->deleteHistoryItem.connect(boost::bind(&SimpleUI::hideHistory, this)); - m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get())); - m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get())); - m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get())); +// m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get())); +// m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get())); +// m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get())); } - m_platformInputManager->returnPressed.disconnect_all_slots(); - m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); - hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); +// m_platformInputManager->returnPressed.disconnect_all_slots(); +// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); +// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); m_historyList->addItems(m_historyService->getHistoryItems()); m_historyList->showPopup(); } diff --git a/services/SimpleUI/SimpleUI.h b/services/SimpleUI/SimpleUI.h index 8be19b7..296730a 100644 --- a/services/SimpleUI/SimpleUI.h +++ b/services/SimpleUI/SimpleUI.h @@ -43,7 +43,7 @@ #include "SimpleURI.h" #include "SimpleScroller.h" #include "WebTitleBar.h" -#include "PlatformInputManager.h" +//#include "PlatformInputManager.h" #include "SessionStorage.h" #include "SqlStorage.h" @@ -257,7 +257,7 @@ private: std::shared_ptr m_zoomList; std::shared_ptr m_tabList; std::shared_ptr m_searchBox; - std::shared_ptr m_platformInputManager; + //std::shared_ptr m_platformInputManager; std::shared_ptr m_sessionService; tizen_browser::Session::Session m_currentSession; std::shared_ptr m_settings; -- 2.7.4 From d633bf105b0b38fd58cede1dd5adc50bba3d44e4 Mon Sep 17 00:00:00 2001 From: Priyesh Lakar Date: Tue, 2 Jun 2015 12:07:56 +0530 Subject: [PATCH 02/16] History Implementation using Browser Provider. Change-Id: Id6588ef903ae08804233e5de0e71092886f1313f --- services/BookmarkService/CMakeLists.txt | 9 +- services/HistoryService/HistoryService.h | 4 +- services/HistoryService/src/HistoryService.cpp | 140 +++++++++++++++++++------ 3 files changed, 118 insertions(+), 35 deletions(-) diff --git a/services/BookmarkService/CMakeLists.txt b/services/BookmarkService/CMakeLists.txt index cf84d3e..e659588 100644 --- a/services/BookmarkService/CMakeLists.txt +++ b/services/BookmarkService/CMakeLists.txt @@ -24,7 +24,14 @@ if(TIZEN_BUILD) target_link_libraries(${PROJECT_NAME} ${pkgs_LDFLAGS}) endif(TIZEN_BUILD) -pkg_check_modules(browser-provider REQUIRED "capi-web-bookmark") +SET(bp_pkgs_list + capi-web-bookmark + capi-web-history + ) + +pkg_check_modules(browser-provider REQUIRED "${bp_pkgs_list}") + +#pkg_check_modules(browser-provider REQUIRED "capi-web-bookmark") include_directories(${browser-provider_INCLUDE_DIRS}) add_dependencies(${PROJECT_NAME} StorageService) diff --git a/services/HistoryService/HistoryService.h b/services/HistoryService/HistoryService.h index 60be194..e92cf5d 100644 --- a/services/HistoryService/HistoryService.h +++ b/services/HistoryService/HistoryService.h @@ -28,7 +28,7 @@ #include "HistoryItem.h" #include "HistoryStorage.h" #include "StorageService.h" - +#include #define DOMAIN_HISTORY_SERVICE "org.tizen.browser.historyservice" namespace tizen_browser @@ -90,7 +90,7 @@ public: boost::signals2::signalhistoryEmpty; private: bool m_testDbMod;; - + std::vector> history_list; std::shared_ptr m_storageManager; /** diff --git a/services/HistoryService/src/HistoryService.cpp b/services/HistoryService/src/HistoryService.cpp index 95ee009..a377bf1 100644 --- a/services/HistoryService/src/HistoryService.cpp +++ b/services/HistoryService/src/HistoryService.cpp @@ -20,8 +20,9 @@ #include "ServiceManager.h" #include "HistoryService.h" +#include "HistoryItem.h" #include "AbstractWebEngine.h" - +#include "EflTools.h" namespace tizen_browser { namespace services @@ -58,19 +59,79 @@ void HistoryService::setStorageServiceTestMode(bool testmode) { m_testDbMod = testmode; } -/** - * @throws HistoryException on error - */ -void HistoryService::addHistoryItem(std::shared_ptr hi) +int HistoryService::getHistoryItemsCount(){ + return 1; + //return getStorageManager()->getHistoryItemsCount(); +} + +static int __get_duplicated_ids_p(int **ids, int *count, const int limit, const int offset, + const bp_history_offset order_column_offset, const int ordering, + const bp_history_offset check_column_offset, + const char *keyword, const int is_like) { - getStorageManager()->addHistoryItem(hi); + bp_history_rows_cond_fmt conds; + memset(&conds, 0x00, sizeof(bp_history_rows_cond_fmt)); + + conds.limit = limit; + conds.offset = offset; + conds.ordering = ordering; + conds.order_offset = order_column_offset; + conds.period_offset = BP_HISTORY_O_DATE_CREATED; + conds.period_type = BP_HISTORY_DATE_ALL; + + return bp_history_adaptor_get_cond_ids_p + (ids, count, + &conds, + check_column_offset, + keyword, + is_like); } -/** - * If hi->getUrl() exists on a table HISTORY update visit_counter and visit_date, unless insert hi to database. - * - * @throws HistoryException on error - */ +void HistoryService::addHistoryItem(std::shared_ptr his){ + + BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + his->setFavIcon(his->getFavIcon()); + std::shared_ptr favicon = his->getFavIcon(); + + int id = -1; + int ret = bp_history_adaptor_create(&id); + if (ret<0){ + BROWSER_LOGE("Error! Could not create new bookmark!"); + } + + int *ids=NULL; + int count=-1; + int **id1=&ids; + int *count1=&count; + + bp_history_rows_cond_fmt conds; + conds.limit = 20; //no of rows to get negative means no limitation + + conds.offset = -1; //the first row's index + conds.order_offset =BP_HISTORY_O_DATE_CREATED; // property to sort + + conds.ordering = 1; //way of ordering 0 asc 1 desc + + conds.period_offset = BP_HISTORY_O_DATE_CREATED; + conds.period_type = BP_HISTORY_DATE_TODAY; + + ret = bp_history_adaptor_get_cond_ids_p(id1 ,count1, &conds, 0, NULL, 0); + if (ret<0){ + BROWSER_LOGE("Error! Could not get ids!"); + } + + bp_history_adaptor_set_url(id, (his->getUrl()).c_str()); + bp_history_adaptor_set_title(id, (his->getTitle()).c_str()); + + + std::unique_ptr favicon_blob = tizen_browser::tools::EflTools::getBlobPNG(favicon); + unsigned char * fav = std::move((unsigned char*)favicon_blob->getData()); + bp_history_adaptor_set_icon(id, favicon->width, favicon->height, fav, favicon_blob->getLength()); + + BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); +} + + void HistoryService::insertOrRefresh(std::shared_ptr hi) { getStorageManager()->insertOrRefresh(hi); } @@ -94,33 +155,48 @@ void HistoryService::clearURLHistory(const std::string & url) } } -/** - * @throws HistoryException on error - */ -std::shared_ptr HistoryService::getHistoryItem(const std::string & url) -{ - return getStorageManager()->getHistoryItem(url); -} -/** - * @throws HistoryException on error - */ HistoryItemVector& HistoryService::getHistoryItems(int historyDepthInDays, int maxItems) { - return getStorageManager()->getHistoryItems(historyDepthInDays, maxItems); -} + history_list.clear(); -/** - * @throws HistoryException on error - */ -int HistoryService::getHistoryItemsCount() -{ - return getStorageManager()->getHistoryItemsCount(); + int *ids=NULL; + int count=-1; + int **id1=&ids; + int *count1=&count; + + bp_history_rows_cond_fmt conds; + conds.limit = 20; //no of rows to get negative means no limitation + + conds.offset = -1; //the first row's index + conds.order_offset =BP_HISTORY_O_DATE_CREATED; // property to sort + + conds.ordering = 1; //way of ordering 0 asc 1 desc + + conds.period_offset = BP_HISTORY_O_DATE_CREATED; + + conds.period_type = BP_HISTORY_DATE_TODAY; + + int ret = bp_history_adaptor_get_cond_ids_p(id1 ,count1, &conds, 0, NULL, 0); + if (ret<0){ + BROWSER_LOGD("Error! Could not get ids!"); + } + + bp_history_offset offset = (BP_HISTORY_O_URL | BP_HISTORY_O_TITLE | BP_HISTORY_O_FAVICON); + + for(int i = 0; i< (*count1); i++){ + bp_history_info_fmt history_info; + bp_history_adaptor_get_info(ids[i],offset,&history_info); + + std::shared_ptr history = std::make_shared(std::string(history_info.url)); + history_list.push_back(history); + } + ids = NULL; + free(ids); + + return history_list; } -/** - * @throws HistoryException on error - */ int HistoryService::getHistoryVisitCounter(const std::string & url) { return getStorageManager()->getHistoryVisitCounter(url); -- 2.7.4 From 59a0d8be505c43f80b1db20e05c3432b64e416a0 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Thu, 4 Jun 2015 20:17:24 +0530 Subject: [PATCH 03/16] Fix for evasgl issue/crash in reference browser on XU3. Change-Id: I66cb199d4f7b694771c2acd0feef035bed7d0b8a Signed-off-by: Chandan Padhi --- services/SimpleUI/CMakeLists.txt | 1 + services/SimpleUI/SimpleUI.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/services/SimpleUI/CMakeLists.txt b/services/SimpleUI/CMakeLists.txt index 96fe02c..a180519 100644 --- a/services/SimpleUI/CMakeLists.txt +++ b/services/SimpleUI/CMakeLists.txt @@ -34,6 +34,7 @@ set(SimpleUI_HEADERS include(Coreheaders) include(EFLHelpers) +include(EWebKitHelpers) include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_SOURCE_DIR}) diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 60c807a..29d7d7a 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -18,7 +18,7 @@ #if defined(USE_EWEBKIT) //#include -//#include +#include #endif #include @@ -69,6 +69,7 @@ SimpleUI::SimpleUI(/*Evas_Object *window*/) , m_networkErrorPopup(0) { elm_init(static_cast(NULL), static_cast(NULL)); + ewk_context_default_get(); Evas_Object *main_window = elm_win_util_standard_add("browserApp", "browserApp"); if (main_window == NULL) BROWSER_LOGE("Failed to create main window"); -- 2.7.4 From 9adab0acc78f2317620280282027e297ecf57c71 Mon Sep 17 00:00:00 2001 From: "sungwon2.han" Date: Mon, 8 Jun 2015 11:28:35 +0900 Subject: [PATCH 04/16] Change DEFAULT_URI to BLANK Change-Id: Idb899162f9f726519bea630a4f90a60a3acf989a Signed-off-by: sungwon2.han --- core/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/main.cpp b/core/main.cpp index 03edda8..009d812 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -34,7 +34,7 @@ ///\note Odroid platform modification #if PLATFORM(TIZEN) -const std::string DEFAULT_URL = "file:///usr/apps/org.tizen.browser/res/demo/b.htm"; +const std::string DEFAULT_URL = ""; static bool app_create(void * /*app_data*/) { -- 2.7.4 From 0576afd13c7b6f931c0800596dc6a99116a4e606 Mon Sep 17 00:00:00 2001 From: "sungwon2.han" Date: Mon, 8 Jun 2015 13:46:06 +0900 Subject: [PATCH 05/16] Disable PointerMode in Settings Menu PlatformInputManager is not working on Wayland binary. Change-Id: Icd8bdcac1c1de9d10068823b5ae29d029628d18c Signed-off-by: sungwon2.han --- services/SimpleUI/SimpleUI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 60c807a..4099f52 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -943,12 +943,12 @@ void SimpleUI::showSettingsMenu() if(!m_settings){ m_settings = std::make_shared(m_window, rightButtonBar->getButton("setting_button")); - m_settings->addAction( m_settingPointerMode); + //m_settings->addAction( m_settingPointerMode); m_settings->addAction( m_settingPrivateBrowsing); m_settings->addAction( m_settingDeleteHistory); m_settings->addAction( m_settingDeleteData); m_settings->addAction( m_settingDeleteFavorite); - m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::base_ui::Settings::setPointerModeEnabled, m_settings.get(), _1)); + //m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::base_ui::Settings::setPointerModeEnabled, m_settings.get(), _1)); } // m_platformInputManager->returnPressed.disconnect_all_slots(); // m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); -- 2.7.4 From 5c0f9c81ffaf363447e9620d06aeea5a6789374e Mon Sep 17 00:00:00 2001 From: "sungwon2.han" Date: Tue, 9 Jun 2015 13:18:35 +0900 Subject: [PATCH 06/16] Implement a routine to go back to previous page or quit Browser when BackSpace Key is pressed 1. Go back to previous page when "Back" is enabled. 2. Quit Browser when "Back" is not enabled. editorclient,ime,opened, editorclient,ime,closed events should be handled not to process BackSpace Key when focus is on Editor. Change-Id: I8ee7ab24364aef0662fa4577a5f55497a0836fce Signed-off-by: sungwon2.han --- core/AbstractWebEngine/AbstractWebEngine.h | 5 ++ core/main.cpp | 1 + services/CMakeLists.txt | 2 +- .../PlatformInputManager/PlatformInputManager.cpp | 89 ++++++++++++---------- .../PlatformInputManager/PlatformInputManager.h | 3 +- services/SimpleUI/CMakeLists.txt | 6 +- services/SimpleUI/SimpleUI.cpp | 53 +++++++------ services/SimpleUI/SimpleUI.h | 5 +- .../WebKitEngineService/WebKitEngineService.cpp | 11 +++ services/WebKitEngineService/WebKitEngineService.h | 5 ++ services/WebKitEngineService/WebView.cpp | 16 ++++ services/WebKitEngineService/WebView.h | 3 + 12 files changed, 128 insertions(+), 71 deletions(-) diff --git a/core/AbstractWebEngine/AbstractWebEngine.h b/core/AbstractWebEngine/AbstractWebEngine.h index 4d7ad22..dce8e93 100644 --- a/core/AbstractWebEngine/AbstractWebEngine.h +++ b/core/AbstractWebEngine/AbstractWebEngine.h @@ -252,6 +252,11 @@ public: virtual std::shared_ptr getFavicon() = 0; /** + * @brief back or exit when back key is pressed + */ + virtual void backButtonClicked() const = 0; + + /** * FavIcon of current page changed */ boost::signals2::signal)> favIconChanged; diff --git a/core/main.cpp b/core/main.cpp index 009d812..f435d7e 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -59,6 +59,7 @@ static bool app_create(void * /*app_data*/) static void app_terminate(void */*app_data*/) { + BROWSER_LOGD("%s\n", __func__); std::shared_ptr> mainUi = std::dynamic_pointer_cast < diff --git a/services/CMakeLists.txt b/services/CMakeLists.txt index d4b8ddc..8952538 100644 --- a/services/CMakeLists.txt +++ b/services/CMakeLists.txt @@ -6,6 +6,6 @@ add_subdirectory(SimpleUI) add_subdirectory(SimpleURI) add_subdirectory(StorageService) add_subdirectory(HistoryService) -#add_subdirectory(PlatformInputManager) +add_subdirectory(PlatformInputManager) add_subdirectory(SessionStorage) add_subdirectory(BookmarkService) diff --git a/services/PlatformInputManager/PlatformInputManager.cpp b/services/PlatformInputManager/PlatformInputManager.cpp index 417488b..b4c6925 100644 --- a/services/PlatformInputManager/PlatformInputManager.cpp +++ b/services/PlatformInputManager/PlatformInputManager.cpp @@ -17,8 +17,8 @@ #include "PlatformInputManager.h" -#include -#include +//#include +//#include #include #include #include @@ -56,11 +56,11 @@ void PlatformInputManager::init(Evas_Object* mainWindow) m_xWindow = elm_win_xwindow_get(mainWindow); // This snippet is needed to show mouse pointer all the time, because by default it is hidden after few seconds - m_atomDevicemgrInputWindow = ecore_x_atom_get(E_PROP_DEVICEMGR_INPUTWIN); - m_atomAlwaysCursorOn = ecore_x_atom_get(E_PROP_NOT_CURSOR_HIDE); - if(!ecore_x_window_prop_window_get(ecore_x_window_root_first_get(), m_atomDevicemgrInputWindow, &m_devicemgr_win, 1)) - BROWSER_LOGD("Failed to get device manager input window!"); - ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, __handler_FOCUS_IN, this); + //m_atomDevicemgrInputWindow = ecore_x_atom_get(E_PROP_DEVICEMGR_INPUTWIN); + //m_atomAlwaysCursorOn = ecore_x_atom_get(E_PROP_NOT_CURSOR_HIDE); + //if(!ecore_x_window_prop_window_get(ecore_x_window_root_first_get(), m_atomDevicemgrInputWindow, &m_devicemgr_win, 1)) + // BROWSER_LOGD("Failed to get device manager input window!"); + //ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, __handler_FOCUS_IN, this); } Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int type, void *event) @@ -83,6 +83,7 @@ Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int ty * For that each arrow key is handled by us. * Pointer movement is realized in timer to achieve smooth animation of pointer's move. */ +/* if(self->m_pointerModeEnabled) { wasArrow = true; if (!keyName.compare("KEY_LEFT")) { @@ -103,12 +104,13 @@ Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int ty } else wasArrow = false; - +*/ /** * If last pressed key was arrow we would like to convert Return key to mouse click * assuming that user was moving cursor and now want to "click" chosen element. * In other cases Return key is handled normally allowing for example to accecpt typed url. */ +/* if(!keyName.compare("KEY_ENTER")) { if(self->m_lastPressedKey == ARROW) { self->m_lastPressedKey = RETURN; @@ -128,6 +130,7 @@ Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int ty return EINA_FALSE; } } +*/ self->m_lastPressedKey= OTHER_KEY; @@ -140,24 +143,24 @@ Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int ty return EINA_FALSE; } - if(!keyName.compare("KEY_CHANNELUP")){ +// if(!keyName.compare("KEY_CHANNELUP")){ /** * Converting ChannelUp Button on remote control and Page Up key on keyboard to mouse's wheel up move. * This is used to achieve same effect of scrolling web page using mouse, remote control and keyboard. */ - self->mouseButtonManipulate(Button4, ButtonPress); // Simulate mouse wheel up movement - self->mouseButtonManipulate(Button4, ButtonRelease); - return EINA_FALSE; - } +// self->mouseButtonManipulate(Button4, ButtonPress); // Simulate mouse wheel up movement +// self->mouseButtonManipulate(Button4, ButtonRelease); +// return EINA_FALSE; +// } - if(!keyName.compare("KEY_CHANNELDOWN")){ +// if(!keyName.compare("KEY_CHANNELDOWN")){ /** * Same as above ChannelDown and Page Down are replaced by mouse's wheel down movement. */ - self->mouseButtonManipulate(Button5, ButtonPress); // Simulate mouse wheel down movement - self->mouseButtonManipulate(Button5, ButtonRelease); - return EINA_FALSE; - } +// self->mouseButtonManipulate(Button5, ButtonPress); // Simulate mouse wheel down movement +// self->mouseButtonManipulate(Button5, ButtonRelease); +// return EINA_FALSE; +// } if(!keyName.compare("KEY_RETURN")) self->returnPressed(); @@ -167,6 +170,8 @@ Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int ty self->rightPressed(); else if(!keyName.compare("KEY_ENTER")) self->enterPressed(); + else if(!keyName.compare("BackSpace")) + self->backPressed(); } else if(type == ECORE_EVENT_KEY_UP) { M_ASSERT(event); Ecore_Event_Key *ev = static_cast(event); @@ -180,27 +185,27 @@ Eina_Bool PlatformInputManager::__filter(void *data, void */*loop_data*/, int ty /** * When arrow key is released thread realizing pointer movement is stopped. */ - if(self->m_pointerModeEnabled && (!keyName.compare("KEY_LEFT")||!keyName.compare("KEY_UP") - || !keyName.compare("KEY_RIGHT")||!keyName.compare("KEY_DOWN"))) { - if(self->m_mouseMoveTimer) { - self->m_currentMouseMovementParams.moveMousePointer = false; - ecore_timer_del(self->m_mouseMoveTimer); - self->m_mouseMoveTimer = NULL; - } - return EINA_FALSE; - } +// if(self->m_pointerModeEnabled && (!keyName.compare("KEY_LEFT")||!keyName.compare("KEY_UP") +// || !keyName.compare("KEY_RIGHT")||!keyName.compare("KEY_DOWN"))) { +// if(self->m_mouseMoveTimer) { +// self->m_currentMouseMovementParams.moveMousePointer = false; +// ecore_timer_del(self->m_mouseMoveTimer); +// self->m_mouseMoveTimer = NULL; +// } +// return EINA_FALSE; +// } /** * If Return key is being released we send event that mouse button was released (in pointer mode). */ - if(self->m_lastPressedKey == RETURN && self->m_pointerModeEnabled && !keyName.compare("KEY_ENTER")) { - self->m_lastPressedKey = OTHER_KEY; - self->mouseButtonManipulate(Button1, ButtonRelease); - return EINA_FALSE; - } +// if(self->m_lastPressedKey == RETURN && self->m_pointerModeEnabled && !keyName.compare("KEY_ENTER")) { +// self->m_lastPressedKey = OTHER_KEY; +// self->mouseButtonManipulate(Button1, ButtonRelease); +// return EINA_FALSE; +// } } return EINA_TRUE; } - +/* Eina_Bool PlatformInputManager::mouseMove(void *data) { int x, y; @@ -222,14 +227,14 @@ Eina_Bool PlatformInputManager::mouseMove(void *data) } return EINA_FALSE; } - -Eina_Bool PlatformInputManager::__handler_FOCUS_IN(void *data, int /*type*/, void */*event*/) -{ - PlatformInputManager * self = reinterpret_cast(data); - ecore_x_window_prop_window_set(self->m_devicemgr_win, self->m_atomAlwaysCursorOn, &(self->m_xWindow), 1); - return EINA_TRUE; -} - +*/ +//Eina_Bool PlatformInputManager::__handler_FOCUS_IN(void *data, int /*type*/, void */*event*/) +//{ +// PlatformInputManager * self = reinterpret_cast(data); +// ecore_x_window_prop_window_set(self->m_devicemgr_win, self->m_atomAlwaysCursorOn, &(self->m_xWindow), 1); +// return EINA_TRUE; +//} +/* void PlatformInputManager::mouseButtonManipulate(int button, int event_type) { XEvent event; @@ -260,7 +265,7 @@ void PlatformInputManager::mouseButtonManipulate(int button, int event_type) XFlush(display); } - +*/ void PlatformInputManager::setPointerModeEnabled(bool enabled) { m_pointerModeEnabled = enabled; diff --git a/services/PlatformInputManager/PlatformInputManager.h b/services/PlatformInputManager/PlatformInputManager.h index f35fcd2..63bbec2 100644 --- a/services/PlatformInputManager/PlatformInputManager.h +++ b/services/PlatformInputManager/PlatformInputManager.h @@ -20,7 +20,7 @@ #include #include #include -#include +//#include #include #include @@ -54,6 +54,7 @@ public: boost::signals2::signal enterPressed; boost::signals2::signal leftPressed; boost::signals2::signal rightPressed; + boost::signals2::signal backPressed; /** * @brief Returns current service's name. diff --git a/services/SimpleUI/CMakeLists.txt b/services/SimpleUI/CMakeLists.txt index 96fe02c..6539054 100644 --- a/services/SimpleUI/CMakeLists.txt +++ b/services/SimpleUI/CMakeLists.txt @@ -46,7 +46,7 @@ include_directories(${CMAKE_SOURCE_DIR}/services/StorageService/Storage/include) include_directories(${CMAKE_SOURCE_DIR}/services/FavoriteService) include_directories(${CMAKE_SOURCE_DIR}/services/HistoryService) include_directories(${CMAKE_SOURCE_DIR}/services/BookmarksUI) -#include_directories(${CMAKE_SOURCE_DIR}/services/PlatformInputManager) +include_directories(${CMAKE_SOURCE_DIR}/services/PlatformInputManager) include_directories(${CMAKE_SOURCE_DIR}/services/SessionStorage) include(FindPkgConfig) @@ -59,13 +59,13 @@ add_dependencies(${PROJECT_NAME} SimpleURI) add_dependencies(${PROJECT_NAME} StorageService) add_dependencies(${PROJECT_NAME} HistoryService) add_dependencies(${PROJECT_NAME} BookmarksUI) -#add_dependencies(${PROJECT_NAME} PlatformInputManager) +add_dependencies(${PROJECT_NAME} PlatformInputManager) add_dependencies(${PROJECT_NAME} SessionStorage) target_link_libraries(${PROJECT_NAME} SimpleURI) target_link_libraries(${PROJECT_NAME} StorageService) target_link_libraries(${PROJECT_NAME} HistoryService) target_link_libraries(${PROJECT_NAME} BookmarksUI) -#target_link_libraries(${PROJECT_NAME} PlatformInputManager) +target_link_libraries(${PROJECT_NAME} PlatformInputManager) target_link_libraries(${PROJECT_NAME} SessionStorage) target_link_libraries(${PROJECT_NAME} ${EFL_LDFLAGS}) diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 4099f52..042a297 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -77,6 +77,7 @@ SimpleUI::SimpleUI(/*Evas_Object *window*/) } SimpleUI::~SimpleUI() { + BROWSER_LOGD("%s", __func__); m_sessionService->getStorage()->deleteSession(m_currentSession); /// \todo Auto-generated destructor stub evas_object_del(m_window.get()); @@ -84,6 +85,7 @@ SimpleUI::~SimpleUI() { void SimpleUI::destroyUI() { + BROWSER_LOGD("%s", __func__); evas_object_del(m_window.get()); } @@ -192,7 +194,7 @@ int SimpleUI::exec(const std::string& _url) (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.historyservice")); M_ASSERT(m_historyService); -/* + // Platforminputmanager BROWSER_LOGD("[%s:%d] service: platforminputmanager ", __PRETTY_FUNCTION__, __LINE__); m_platformInputManager = @@ -202,7 +204,8 @@ int SimpleUI::exec(const std::string& _url) M_ASSERT(m_platformInputManager); m_platformInputManager->init(m_window.get()); m_platformInputManager->returnPressed.connect(boost::bind(&elm_exit)); -*/ + m_platformInputManager->backPressed.connect(boost::bind(&SimpleUI::onBackPressed, this)); + createActions(); // left buttons leftButtonBar = std::make_shared(m_mainLayout, "SimpleUI/LeftButtonBar.edj", "left_button_bar"); @@ -599,7 +602,7 @@ void SimpleUI::onBookmarkRemoved(const std::string& uri) webTitleBar->removeFavIcon(); webTitleBar->show("Removed from favorites"); } -/* + void SimpleUI::onReturnPressed(MenuButton *m) { BROWSER_LOGD("[%s]", __func__); @@ -608,7 +611,13 @@ void SimpleUI::onReturnPressed(MenuButton *m) hidePopup.disconnect_all_slots(); m->hidePopup(); } -*/ + +void SimpleUI::onBackPressed() +{ + BROWSER_LOGD("[%s]", __func__); + m_webEngine->backButtonClicked(); +} + void SimpleUI::backEnable(bool enable) { m_back->setEnabled(enable); @@ -815,9 +824,9 @@ void SimpleUI::showZoomMenu() m_zoomList->setZoom(currentZoomType); BROWSER_LOGD("Current zoom factor from webkit %d%%", m_webEngine->getZoomFactor()); -// m_platformInputManager->returnPressed.disconnect_all_slots(); -// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); -// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); + m_platformInputManager->returnPressed.disconnect_all_slots(); + m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); + hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get())); m_zoomList->showPopup(); } @@ -836,13 +845,13 @@ void SimpleUI::showTabMenu() m_tabList->tabClicked.connect(boost::bind(&SimpleUI::tabClicked, this, _1)); m_tabList->tabDelete.connect(boost::bind(&SimpleUI::closeTab, this, _1)); -// m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get())); -// m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get())); -// m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get())); + m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get())); + m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get())); + m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get())); } -// m_platformInputManager->returnPressed.disconnect_all_slots(); -// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); -// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); + m_platformInputManager->returnPressed.disconnect_all_slots(); + m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); + hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get())); m_tabList->addItems(m_webEngine->getTabContents()); m_tabList->setCurrentTabId(m_webEngine->currentTabId()); m_tabList->disableNewTabBtn(m_tabList->getItemcCount() >= m_tabLimit); @@ -950,9 +959,9 @@ void SimpleUI::showSettingsMenu() m_settings->addAction( m_settingDeleteFavorite); //m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::base_ui::Settings::setPointerModeEnabled, m_settings.get(), _1)); } -// m_platformInputManager->returnPressed.disconnect_all_slots(); -// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); -// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); + m_platformInputManager->returnPressed.disconnect_all_slots(); + m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); + hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get())); m_settingDeleteHistory->setEnabled(m_historyService->getHistoryItemsCount()); m_settingDeleteFavorite->setEnabled(m_favoriteService->countBookmarksAndSubFolders()); m_settings->showPopup(); @@ -967,13 +976,13 @@ void SimpleUI::showHistory() m_historyList->deleteHistoryItem.connect(boost::bind(&tizen_browser::services::HistoryService::clearURLHistory, m_historyService.get(),_1)); m_historyList->deleteHistoryItem.connect(boost::bind(&SimpleUI::hideHistory, this)); -// m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get())); -// m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get())); -// m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get())); + m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get())); + m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get())); + m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get())); } -// m_platformInputManager->returnPressed.disconnect_all_slots(); -// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); -// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); + m_platformInputManager->returnPressed.disconnect_all_slots(); + m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); + hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get())); m_historyList->addItems(m_historyService->getHistoryItems()); m_historyList->showPopup(); } diff --git a/services/SimpleUI/SimpleUI.h b/services/SimpleUI/SimpleUI.h index 296730a..c33c4ee 100644 --- a/services/SimpleUI/SimpleUI.h +++ b/services/SimpleUI/SimpleUI.h @@ -43,7 +43,7 @@ #include "SimpleURI.h" #include "SimpleScroller.h" #include "WebTitleBar.h" -//#include "PlatformInputManager.h" +#include "PlatformInputManager.h" #include "SessionStorage.h" #include "SqlStorage.h" @@ -235,6 +235,7 @@ private: void onNetErrorButtonPressed(PopupButtons, std::shared_ptr); void onReturnPressed(MenuButton *m); + void onBackPressed(); boost::signals2::signal hidePopup; @@ -257,7 +258,7 @@ private: std::shared_ptr m_zoomList; std::shared_ptr m_tabList; std::shared_ptr m_searchBox; - //std::shared_ptr m_platformInputManager; + std::shared_ptr m_platformInputManager; std::shared_ptr m_sessionService; tizen_browser::Session::Session m_currentSession; std::shared_ptr m_settings; diff --git a/services/WebKitEngineService/WebKitEngineService.cpp b/services/WebKitEngineService/WebKitEngineService.cpp index f07a1ea..5261a81 100644 --- a/services/WebKitEngineService/WebKitEngineService.cpp +++ b/services/WebKitEngineService/WebKitEngineService.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "BrowserAssert.h" #include "BrowserLogger.h" @@ -477,6 +478,16 @@ void WebKitEngineService::searchOnWebsite(const std::string & searchString, int m_currentWebView->searchOnWebsite(searchString, flags); } +void WebKitEngineService::backButtonClicked() const +{ + if(isBackEnabled()) { + M_ASSERT(m_currentWebView); + m_currentWebView->back(); + } else { + app_efl_exit(); + } +} + } /* end of webkitengine_service */ } /* end of basic_webengine */ } /* end of tizen_browser */ diff --git a/services/WebKitEngineService/WebKitEngineService.h b/services/WebKitEngineService/WebKitEngineService.h index df8160e..6931a9c 100644 --- a/services/WebKitEngineService/WebKitEngineService.h +++ b/services/WebKitEngineService/WebKitEngineService.h @@ -154,6 +154,11 @@ public: */ std::shared_ptr getFavicon(); + /** + * @brief back or exit when back key is pressed + */ + void backButtonClicked() const; + private: // callbacks from WebView void _favIconChanged(std::shared_ptr bi); diff --git a/services/WebKitEngineService/WebView.cpp b/services/WebKitEngineService/WebView.cpp index 6cc11a6..f3deff2 100644 --- a/services/WebKitEngineService/WebView.cpp +++ b/services/WebKitEngineService/WebView.cpp @@ -157,6 +157,9 @@ void WebView::registerCallbacks() evas_object_event_callback_add(m_ewkView, EVAS_CALLBACK_MOUSE_DOWN, __setFocusToEwkView, this); evas_object_smart_callback_add(m_ewkView, "favicon,changed", onFaviconChaged, this); + + evas_object_smart_callback_add(m_ewkView, "editorclient,ime,closed", __IMEClosed, this); + evas_object_smart_callback_add(m_ewkView, "editorclient,ime,opened", __IMEOpened, this); #endif } @@ -182,6 +185,9 @@ void WebView::unregisterCallbacks() evas_object_event_callback_del(m_ewkView, EVAS_CALLBACK_MOUSE_DOWN, __setFocusToEwkView); evas_object_smart_callback_del_full(m_ewkView, "favicon,changed", onFaviconChaged, this); + + evas_object_smart_callback_del_full(m_ewkView, "editorclient,ime,closed", __IMEClosed, this); + evas_object_smart_callback_del_full(m_ewkView, "editorclient,ime,opened", __IMEOpened, this); #endif } @@ -746,6 +752,16 @@ void WebView::onFaviconChaged(void* data, Evas_Object*, void*) } } +void WebView::__IMEClosed(void* data, Evas_Object*, void*) +{ + BROWSER_LOGD("%s", __func__); +} + +void WebView::__IMEOpened(void* data, Evas_Object*, void*) +{ + BROWSER_LOGD("%s", __func__); +} + std::string WebView::securityOriginToUri(const Ewk_Security_Origin *origin) { std::string protocol = tizen_browser::tools::fromChar(ewk_security_origin_protocol_get(origin)); diff --git a/services/WebKitEngineService/WebView.h b/services/WebKitEngineService/WebView.h index 8fad26d..69609cd 100644 --- a/services/WebKitEngineService/WebView.h +++ b/services/WebKitEngineService/WebView.h @@ -176,6 +176,9 @@ private: //from webkit ewk_view static void onFaviconChaged(void * data, Evas_Object *obj, void *event_info); + static void __IMEClosed(void * data, Evas_Object *obj, void *event_info); + static void __IMEOpened(void * data, Evas_Object *obj, void *event_info); + // confirmation requests static void __geolocationPermissionRequest(void * data, Evas_Object * obj, void * event_info); static void __usermediaPermissionRequest(void * data, Evas_Object * obj, void * event_info); -- 2.7.4 From 86927216ba72c03d68d281c24a5245682309404a Mon Sep 17 00:00:00 2001 From: "sungwon2.han" Date: Thu, 11 Jun 2015 10:26:07 +0900 Subject: [PATCH 07/16] [Issues] TNEF-2062,TNEF-2056,TNEF-2055,TNEF-2129, TNEF-2128,TNEF-2127 [Problem] Not possible to Click the web contents area. [Cause] In the 800x60 size area of searchbox, mouse click is not working to web contents area [Solution] Removed the searchbox code. Searchbox is not scope of reference browser GUI. [Verify] click the 1120,130~1920,190 area Change-Id: I431a91da11010526a9df24476a43347e4d1fd4e0 Signed-off-by: sungwon2.han --- services/SimpleUI/SimpleUI.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 3801759..17f89da 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -283,9 +283,9 @@ int SimpleUI::exec(const std::string& _url) - m_searchBox = std::make_shared(m_window.get()); - m_searchBox->textChanged.connect(boost::bind(&SimpleUI::searchWebPage, this, _1, _2)); - elm_object_part_content_set(m_mainLayout, "search_box", m_searchBox->getContent()); + //m_searchBox = std::make_shared(m_window.get()); + //m_searchBox->textChanged.connect(boost::bind(&SimpleUI::searchWebPage, this, _1, _2)); + //elm_object_part_content_set(m_mainLayout, "search_box", m_searchBox->getContent()); m_sessionService = std::dynamic_pointer_cast < -- 2.7.4 From 56d361c8b9c63ce114f3c2dde43b023dd1712deb Mon Sep 17 00:00:00 2001 From: "sungwon2.han" Date: Thu, 11 Jun 2015 13:16:47 +0900 Subject: [PATCH 08/16] [Issues] TNEF-2062,TNEF-2056,TNEF-2055,TNEF-2129, TNEF-2128,TNEF-2127 [Problem] Not possible to Click the web contents area. [Cause] In the 800x60 size area of searchbox, mouse click is not working to web contents area [Solution] Removed the searchbox code. Searchbox is not scope of reference browser GUI. [Verify] click the 1120,130~1920,190 area Change-Id: I69dd8bb644e144ffb286d60444062709196bcfbc Signed-off-by: sungwon2.han --- services/SimpleUI/CMakeLists.txt | 3 - services/SimpleUI/SearchBox.cpp | 150 --------- services/SimpleUI/SearchBox.h | 70 ----- services/SimpleUI/SimpleUI.cpp | 28 +- services/SimpleUI/SimpleUI.h | 5 - services/SimpleUI/edc/MainLayout.edc | 15 - services/SimpleUI/edc/SearchBox.edc | 570 ----------------------------------- 7 files changed, 1 insertion(+), 840 deletions(-) delete mode 100644 services/SimpleUI/SearchBox.cpp delete mode 100644 services/SimpleUI/SearchBox.h delete mode 100644 services/SimpleUI/edc/SearchBox.edc diff --git a/services/SimpleUI/CMakeLists.txt b/services/SimpleUI/CMakeLists.txt index 587c2db..4053a76 100644 --- a/services/SimpleUI/CMakeLists.txt +++ b/services/SimpleUI/CMakeLists.txt @@ -12,7 +12,6 @@ set(SimpleUI_SRCS SimpleScroller.cpp WebTitleBar.cpp RelatedWebPages.cpp - SearchBox.cpp CustomPopup.cpp ) @@ -28,7 +27,6 @@ set(SimpleUI_HEADERS HistoryList.h WebTitleBar.h RelatedWebPages.h - SearchBox.h CustomPopup.h ) @@ -95,7 +93,6 @@ set(edcFiles ErrorMessage.edc RelatedPages.edc Tooltip.edc - SearchBox.edc CustomPopup.edc ) diff --git a/services/SimpleUI/SearchBox.cpp b/services/SimpleUI/SearchBox.cpp deleted file mode 100644 index 9185c46..0000000 --- a/services/SimpleUI/SearchBox.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "SearchBox.h" -#include "BrowserLogger.h" - -namespace tizen_browser -{ -namespace base_ui -{ - -SearchBox::SearchBox(Evas_Object *parent) -{ - std::string edjFilePath = EDJE_DIR; - edjFilePath.append("SimpleUI/SearchBox.edj"); - elm_theme_extension_add(NULL, edjFilePath.c_str()); - - m_entry_layout = elm_layout_add(parent); - if(!elm_layout_file_set(m_entry_layout, edjFilePath.c_str(), "search_box")) - throw std::runtime_error("Layout file not found: " + edjFilePath); - - m_webSearchEntry = elm_entry_add(m_entry_layout); - - elm_object_style_set(m_webSearchEntry, "search_entry"); - - elm_entry_single_line_set(m_webSearchEntry, EINA_TRUE); - elm_entry_scrollable_set(m_webSearchEntry, EINA_TRUE); - - search_caseSensitive = false; - - elm_object_translatable_part_text_set(m_webSearchEntry, "elm.guide", "Search"); - - evas_object_smart_callback_add(m_webSearchEntry, "changed,user", SearchBox::searchNext, this); - - //Add Case sensitive checkbox - m_caseSensitive = elm_check_add(m_entry_layout); - elm_object_part_text_set(m_caseSensitive, "default", "Match case"); - elm_object_part_text_set(m_caseSensitive, "on", "Match case"); - elm_object_part_text_set(m_caseSensitive, "off", "Match case"); - elm_check_state_set(m_caseSensitive, EINA_FALSE); - elm_object_part_content_set(m_entry_layout, "search_opts_case", m_caseSensitive); - - //Add prev and next buttons - m_searchPrev = elm_button_add(m_entry_layout); - elm_object_style_set(m_searchPrev, "default_button"); - elm_object_part_text_set(m_searchPrev, "default", "Prev"); - elm_object_part_content_set(m_entry_layout, "search_opts_prev", m_searchPrev); - - m_searchNext = elm_button_add(m_entry_layout); - elm_object_style_set(m_searchNext, "default_button"); - elm_object_part_text_set(m_searchNext, "default", "Next"); - elm_object_part_content_set(m_entry_layout, "search_opts_next", m_searchNext); - - evas_object_smart_callback_add(m_searchNext, "clicked", SearchBox::searchNext, this); - evas_object_smart_callback_add(m_searchPrev, "clicked", SearchBox::searchPrev, this); - evas_object_smart_callback_add(m_caseSensitive, "changed", SearchBox::caseSensitiveChanged, this); - - elm_object_part_content_set(m_entry_layout, "search_entry_swallow", m_webSearchEntry); - - hide(); -} - -Evas_Object* SearchBox::getContent() -{ - return m_entry_layout; -} - -void SearchBox::hide() -{ - elm_object_signal_emit(m_entry_layout, "elm,state,hide", "elm"); - elm_object_signal_emit(m_searchNext, "elm,state,hide", "elm"); - elm_object_signal_emit(m_searchPrev, "elm,state,hide", "elm"); - elm_object_signal_emit(m_webSearchEntry, "elm,state,hide", "elm"); - elm_entry_entry_set(m_webSearchEntry, ""); -// evas_object_hide(m_caseSensitive); - visible = false; -} - -void SearchBox::show() -{ - elm_object_signal_emit(m_entry_layout, "elm,state,show", "elm"); - elm_object_signal_emit(m_searchNext, "elm,state,show", "elm"); - elm_object_signal_emit(m_searchPrev, "elm,state,show", "elm"); - elm_object_signal_emit(m_webSearchEntry, "elm,state,show", "elm"); -// evas_object_show(m_caseSensitive); - visible = true; -} - -bool SearchBox::is_visible() -{ - return visible; -} - -void SearchBox::searchNext(void *data, Evas_Object */*obj*/, void */*event_info*/) -{ - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - SearchBox *self = reinterpret_cast(data); - std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_webSearchEntry))); - - if (self->search_caseSensitive) - self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT); - else - self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE); - -} - -void SearchBox::searchPrev(void *data, Evas_Object */*obj*/, void */*event_info*/) -{ - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - SearchBox *self = reinterpret_cast(data); - std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_webSearchEntry))); - - if (self->search_caseSensitive) - self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_BACKWARDS); - else - self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE | EWK_FIND_OPTIONS_BACKWARDS); - -} - -void SearchBox::caseSensitiveChanged(void *data, Evas_Object */*obj*/, void */*event_info*/) -{ - BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); - SearchBox *self = reinterpret_cast(data); - std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_webSearchEntry))); - self->search_caseSensitive = elm_check_state_get(self->m_caseSensitive); - - if (self->search_caseSensitive) - self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT); - else - self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE); -} - - -} - -} - diff --git a/services/SimpleUI/SearchBox.h b/services/SimpleUI/SearchBox.h deleted file mode 100644 index b754536..0000000 --- a/services/SimpleUI/SearchBox.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _SEARCHBOX_H -#define _SEARCHBOX_H - -#include -#include -#include - -namespace tizen_browser -{ -namespace base_ui -{ - -enum Ewk_Find_Options { - EWK_FIND_OPTIONS_NONE, /**< no search flags, this means a case sensitive, no wrap, forward only search. */ - EWK_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, /**< case insensitive search. */ - EWK_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, /**< search text only at the beginning of the words. */ - EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, /**< treat capital letters in the middle of words as word start. */ - EWK_FIND_OPTIONS_BACKWARDS = 1 << 3, /**< search backwards. */ - EWK_FIND_OPTIONS_WRAP_AROUND = 1 << 4, /**< if not present search will stop at the end of the document. */ - EWK_FIND_OPTIONS_SHOW_OVERLAY = 1 << 5, /**< show overlay */ - EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, /**< show indicator */ - EWK_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 /**< show highlight */ -}; - -class SearchBox{ - -public: - SearchBox(Evas_Object *parent); - Evas_Object* getContent(); - void hide(); - void show(); - bool is_visible(); - boost::signals2::signal textChanged; - -private: - Evas_Object* m_webSearchEntry; - Evas_Object* m_entry_layout; - Evas_Object* m_searchPrev; - Evas_Object* m_searchNext; - Evas_Object* m_caseSensitive; - - bool search_caseSensitive; - bool visible; - - static void searchNext(void *data, Evas_Object */*obj*/, void */*event_info*/); - static void searchPrev(void *data, Evas_Object */*obj*/, void */*event_info*/); - static void caseSensitiveChanged(void *data, Evas_Object */*obj*/, void */*event_info*/); -}; - -} - -} - -#endif //_SEARCHBOX_H diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 17f89da..3b6ee0d 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -281,12 +281,6 @@ int SimpleUI::exec(const std::string& _url) m_netErrorHandler->networkError.connect(boost::bind(&SimpleUI::onNetworkError, this)); m_netErrorHandler->networkConnected.connect(boost::bind(&SimpleUI::onNetworkConnected, this)); - - - //m_searchBox = std::make_shared(m_window.get()); - //m_searchBox->textChanged.connect(boost::bind(&SimpleUI::searchWebPage, this, _1, _2)); - //elm_object_part_content_set(m_mainLayout, "search_box", m_searchBox->getContent()); - m_sessionService = std::dynamic_pointer_cast < tizen_browser::services::SessionStorage, @@ -332,7 +326,6 @@ void SimpleUI::loadThemes() elm_theme_extension_add(NULL, edjePath("SimpleUI/ZoomItem.edj").c_str()); elm_theme_extension_add(NULL, edjePath("SimpleUI/TabItem.edj").c_str()); elm_theme_extension_add(NULL, edjePath("SimpleUI/ErrorMessage.edj").c_str()); - elm_theme_extension_add(NULL, edjePath("SimpleUI/SearchBox.edj").c_str()); elm_theme_overlay_add(0, edjePath("SimpleUI/ScrollerDefault.edj").c_str()); elm_theme_overlay_add(0, edjePath("SimpleUI/Tooltip.edj").c_str()); @@ -508,10 +501,7 @@ void SimpleUI::switchViewToHomePage() forwardEnable(false); backEnable(false); - m_simpleURI->setSearchIcon(); webTitleBar->hide(); - hideSearchBox(); - hideProgressBar(); } @@ -755,19 +745,6 @@ void SimpleUI::setErrorButtons() evas_object_hide(m_progressBar); } - -void SimpleUI::showSearchBox() -{ - if (m_searchBox.get()) - m_searchBox->show(); -} - -void SimpleUI::hideSearchBox() -{ - if (m_searchBox.get()) - m_searchBox->hide(); -} - void SimpleUI::filterURL(const std::string& url) { BROWSER_LOGD("[%s] url=%s", __func__, url.c_str()); @@ -1195,12 +1172,9 @@ void SimpleUI::favicon_clicked(void *data, Evas_Object */*obj*/, const char */*e { BROWSER_LOGD("[%s],", __func__); SimpleUI *self = reinterpret_cast(data); - if (self->m_searchBox->is_visible()) - self->m_searchBox->hide(); - else if (!self->isHomePageActive() && !self->isErrorPageActive()) + if (!self->isHomePageActive() && !self->isErrorPageActive()) { self->m_simpleURI->clearFocus(); - self->m_searchBox->show(); } } diff --git a/services/SimpleUI/SimpleUI.h b/services/SimpleUI/SimpleUI.h index fd0bc5d..793f87e 100644 --- a/services/SimpleUI/SimpleUI.h +++ b/services/SimpleUI/SimpleUI.h @@ -55,7 +55,6 @@ #include "TabList.h" #include "Settings.h" #include "HistoryList.h" -#include "SearchBox.h" #include "NetworkErrorHandler.h" #include "CustomPopup.h" #include "Config.h" @@ -207,9 +206,6 @@ private: void showSettingsMenu(); void hideSettingsMenu(); - void showSearchBox(); - void hideSearchBox(); - void showProgressBar(); void hideProgressBar(); @@ -259,7 +255,6 @@ private: std::shared_ptr m_bookmarksUI; std::shared_ptr m_zoomList; std::shared_ptr m_tabList; - std::shared_ptr m_searchBox; std::shared_ptr m_platformInputManager; std::shared_ptr m_sessionService; tizen_browser::Session::Session m_currentSession; diff --git a/services/SimpleUI/edc/MainLayout.edc b/services/SimpleUI/edc/MainLayout.edc index aa34c1e..3e70303 100644 --- a/services/SimpleUI/edc/MainLayout.edc +++ b/services/SimpleUI/edc/MainLayout.edc @@ -1,5 +1,4 @@ #include "Spacer.edc" -#include "SearchBox.edc" #define DEBUG_RECT_OVER(over_part, r, g, b) \ part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__)); \ \ @@ -198,20 +197,6 @@ collections { rel2 { to: "web_view"; relative: 1.0 1.0; } } } - part { name: "search_box"; - type: SWALLOW; - scale: 1; - description { - state: "default" 0.0; - visible: 1; - min: SEARCH_WIDTH SEARCH_HEIGHT; - max: SEARCH_WIDTH SEARCH_HEIGHT; - align: 1.0 0.0; - rel1 {relative: 0.0 0.0; to: "web_view";} - rel2 {relative: 1.0 1.0; to: "web_view";} - } - } - part {name: "popup_bg"; type: RECT; diff --git a/services/SimpleUI/edc/SearchBox.edc b/services/SimpleUI/edc/SearchBox.edc deleted file mode 100644 index 8903f67..0000000 --- a/services/SimpleUI/edc/SearchBox.edc +++ /dev/null @@ -1,570 +0,0 @@ -#define SEARCH_ENTRY_WIDTH 200 -#define SEARCH_HEIGHT 60 -#define SEARCH_WIDTH 800 -#define OPT_BUTTON_WIDTH 160 -#define TRANSITION_VALUE 0.1 -collections { - group { name: "elm/entry/selection/browser_entry"; - parts { - part { name: "bg"; - scale:1; - type: RECT; - mouse_events: 0; - description { state: "default" 0.0; - color: 0 0 128 64; - } - } - } - } - group { name: "elm/entry/cursor/browser_entry"; - parts { - part { name: "bg"; - scale:1; - type: RECT; - mouse_events: 0; - description { state: "default" 0.0; - color: 69 149 255 255; - min: 2 36; - max: 2 36; - visible: 0; - } - description { - state: "focused" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - } - programs { - program { name: "focused"; - signal: "elm,action,focus"; - source: "elm"; - action: STATE_SET "focused" 0.0; - target: "bg"; - } - program { name: "unfocused"; - signal: "elm,action,unfocus"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "bg"; - } - } - } - group { - name: "elm/entry/base-single/search_entry"; - styles { - style { - name: "browser-entry-uri-style-unselected"; - base: "font=Tizen:style=SVD_Medium font_size="32" wrap=none color=#CCCCCC"; - } - style { - name: "browser-entry-uri-style-selected"; - base: "font=Tizen:style=SVD_Medium font_size="32" wrap=none color=#3D3D3D"; - } - } - data { - item: focus_highlight "off"; - } - parts { - part { - name: "elm.guide"; - scale:1; - type: TEXTBLOCK; - mouse_events: 0; - description { state: "default" 0.0; - visible: 0; - rel1.relative: 0.0 0.0; - rel2.relative: 1.0 1.0; - align: 0.0 0.0; - text { - style: "browser-entry-uri-style-unselected"; - min: 0 1; - } - } - description { state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - description { state: "hidden" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - part { name: "label.text.clip"; - scale:1; - type: RECT; - description { - state: "default" 0.0; - } - } - part { - name: "elm.text"; - scale:1; - multiline: 0; - entry_mode: EDITABLE; - select_mode: DEFAULT; - cursor_mode: BEFORE; - type: TEXTBLOCK; - clip_to: "label.text.clip"; - source: "elm/entry/selection/browser_entry"; - source4: "elm/entry/cursor/browser_entry"; - description { state: "default" 0.0; - visible: 0; - rel1.relative: 0.0 0.0; - rel2.relative: 1.0 1.0; - align: 0.0 0.0; - text { - style: "browser-entry-uri-style-selected"; - min: 0 1; - } - } - description { state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - } - programs { - program { name: "focus"; - signal: "load"; - source: ""; - action: FOCUS_SET; - target: "elm.text"; - } - program { name: "gdisabled"; - signal: "elm,guide,disabled"; - source: "elm"; - action: STATE_SET "hidden" 0.0; - target: "elm.guide"; - } - program { name: "genabled"; - signal: "elm,guide,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "elm.guide"; - } - program { - signal: "elm,state,show"; source: "elm"; - action: STATE_SET "visible" 0.0; - transition: LINEAR TRANSITION_VALUE; - target: "elm.guide"; - target: "elm.text"; - } - program { - signal: "elm,state,hide"; source: "elm"; - action: STATE_SET "default" 0.0; - transition: LINEAR TRANSITION_VALUE; - target: "elm.guide"; - target: "elm.text"; - } - } - }//group - group{ name: "search_box"; - images { - image: "search_searchbar_bg_foc.png" COMP; - image: "search_searchbar_bg_nor.png" COMP; - image: "ico_search.png" COMP; - image: "ico_url.png" COMP; - } - parts{ - part { name: "bg_clipper"; - type: RECT; - scale: 1; - description{ - state: "default" 0.0; - visible: 1; - align: 0.0 0.0; - color: 18 22 34 0; - min: SEARCH_WIDTH SEARCH_HEIGHT; - max: SEARCH_WIDTH SEARCH_HEIGHT; - } - description{ - state: "visible" 0.0; - inherit: "default" 0.0; - min: SEARCH_WIDTH SEARCH_HEIGHT; - max: SEARCH_WIDTH SEARCH_HEIGHT; - color: 18 22 34 245; - visible: 1; - } - } - part { name: "bg"; - type: IMAGE; - scale: 1; - clip_to: "bg_clipper"; - description{ - state: "default" 0.0; - visible: 1; - align: 0.0 1.0; - color: 18 22 34 0; - min: SEARCH_WIDTH SEARCH_HEIGHT*2; - max: SEARCH_WIDTH SEARCH_HEIGHT*2; - image.normal: "search_searchbar_bg_nor.png"; - image.border: 5 5 5 5; - rel1 { relative: 0 0; to: "bg_clipper"; } - rel2 { relative: 1 1; to: "bg_clipper"; } - fill { - type: SCALE; - smooth: 0; - origin { - relative: 0 0; - offset: 0 0; - } - size { - relative: 1 1; - offset: 0 0; - } - } - } - description{ - state: "visible" 0.0; - inherit: "default" 0.0; - min: SEARCH_WIDTH SEARCH_HEIGHT*2; - max: SEARCH_WIDTH SEARCH_HEIGHT*2; - color: 18 22 34 245; - visible: 1; - } - } - part { name: "search_swallow"; - type : SWALLOW; - scale: 1; - description { - state: "default" 0.0; - visible: 0; - align: 0.0 0.85; - min: SEARCH_ENTRY_WIDTH 40; - max: SEARCH_ENTRY_WIDTH 40; - rel1 { relative: 0 0; to: "bg"; offset: 30 0;} - rel2 { relative: 1 1; to: "bg"; } - fixed: 1 1; - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { name: "bg_search_over"; - type : RECT; - scale: 1; - description { - state: "default" 0.0; - color: 0 0 0 0; - visible: 0; - align: 0.0 0.5; - rel1 { relative: 0 0; to: "search_swallow"; offset: 0 -5; } - rel2 { relative: 1 1; to: "search_swallow"; } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { name: "bg_search"; - mouse_events: 1; - scale:1; - type: IMAGE; - description { - state: "default" 0.0; - visible: 0; - align: 0.0 0.5; - min: SEARCH_ENTRY_WIDTH 40; - max: SEARCH_ENTRY_WIDTH 40; - fixed: 1 1; - rel1 { relative: 0 0; to: "search_swallow"; offset: 0 -8; } - rel2 { relative: 1 1; to: "search_swallow"; } - image.normal: "search_searchbar_bg_nor.png"; - image.border: 5 5 5 5; - fill { - type: SCALE; - smooth: 0; - origin { - relative: 0 0; - offset: 0 0; - } - size { - relative: 1 1; - offset: 0 0; - } - } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { - name: "search_over"; - type: RECT; - mouse_events: 1; - repeat_events: 1; - description { - state: "default" 0.0; - visible: 1; - color: 0 0 0 0; - rel1 { relative: 0 0; to: "search_entry_swallow"; } - rel2 { relative: 1 1; to: "search_entry_swallow"; } - } - } - part { name: "search_entry_swallow"; - type : SWALLOW; - scale: 1; - description { - state: "default" 0.0; - visible: 0; - align: 0.0 0.0; - min: SEARCH_ENTRY_WIDTH-10 40; - max: SEARCH_ENTRY_WIDTH-10 40; - fixed: 1 1; - rel1 { relative: 0 0; to: "search_swallow"; offset: 4 -4;} - rel2 { relative: 1 1; to: "search_swallow";} - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { name: "search_opts_prev"; - type : SWALLOW; - scale: 1; - description { - state: "default" 0.0; - color: 100 200 100 150; - visible: 0; - min: OPT_BUTTON_WIDTH SEARCH_HEIGHT; - max: OPT_BUTTON_WIDTH SEARCH_HEIGHT; - align: 0.0 0.0; - rel1 { relative: 1 0; to: "search_entry_swallow"; offset: 15 -9; } - rel2 { relative: 1 1; } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { name: "search_opts_next"; - type : SWALLOW; - scale: 1; - description { - state: "default" 0.0; - color: 100 100 200 150; - visible: 0; - min: OPT_BUTTON_WIDTH SEARCH_HEIGHT; - max: OPT_BUTTON_WIDTH SEARCH_HEIGHT; - align: 0.0 0.0; - rel1 { relative: 1 0; to: "search_opts_prev"; } - rel2 { relative: 1 1; } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { name: "search_opts_case"; - type : SWALLOW; - scale: 1; - description { - state: "default" 0.0; - visible: 0; - min: OPT_BUTTON_WIDTH SEARCH_HEIGHT; - max: OPT_BUTTON_WIDTH SEARCH_HEIGHT; - align: 0.0 0.0; - rel1 { relative: 1 0; to: "search_opts_next"; } - rel2 { relative: 1 1; } - } - description { - state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - } - programs { - program { - signal: "elm,state,show"; source: "elm"; - action: STATE_SET "visible" 0.0; - transition: LINEAR TRANSITION_VALUE; - target: "bg"; - target: "bg_clipper"; - target: "search_entry_swallow"; - target: "bg_search"; - target: "search_opts_case"; - target: "search_opts_next"; - target: "search_opts_prev"; - } - program { - signal: "elm,state,hide"; source: "elm"; - action: STATE_SET "default" 0.0; - transition: LINEAR TRANSITION_VALUE; - target: "bg"; - target: "bg_clipper"; - target: "search_entry_swallow"; - target: "bg_search"; - target: "search_opts_case"; - target: "search_opts_next"; - target: "search_opts_prev"; - } - } - } - group { - name: "elm/button/base/default_button"; - parts { - part { - name: "bg"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - visible: 1; - min: 150 40; - max: 150 40; - align: 0.5 0.5; - fixed: 1 1; - color: 225 225 225 0; - } - description { state: "visible" 0.0; - inherit: "default" 0.0; - color: 225 225 225 255; - } - description { state: "focus" 0.0; - inherit: "visible" 0.0; - color: 69 143 255 255; - } - description { state: "dim" 0.0; - inherit: "visible" 0.0; - color: 225 225 225 102; - } - } - part { - name: "elm.text"; - type: TEXT; - scale: 1; - description { state: "default" 0.0; - visible: 1; - fixed: 1 1; - align: 0.0 0.5; - min: 90 40; - max: 90 40; - rel1 { relative: 0.0 0.0; to: "bg"; offset: 30 0;} - rel2 { relative: 1.0 1.0; to: "bg";} - color: 89 89 89 0; - text { - text: "Next"; - font: "font_name"; - size: 30; - align: 0.5 0.5; - } - } - description { state: "visible" 0.0; - inherit: "default" 0.0; - color: 89 89 89 255; - } - description { state: "focus" 0.0; - inherit: "visible" 0.0; - color: 255 255 255 255; - text.font: "Tizen:style=Bold"; - } - description { state: "dim" 0.0; - inherit: "visible" 0.0; - color: 89 89 89 102; - } - } - part { - name: "over"; - scale:1; - mouse_events: 1; - type: RECT; - description { - state: "default" 0.0; - visible: 0; - rel1 { relative: 0.0 0.0; to: "bg";} - rel2 { relative: 1.0 1.0; to: "bg";} - color: 0 0 0 0; - } - description { state: "visible" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - } - programs{ - program { - name: "mouse_in"; - signal: "mouse,in"; - source: "over"; - action: STATE_SET "focus" 0.0; - target: "elm.text"; - target: "bg"; - script { - new st[31]; - new Float:vl; - get_state(PART:"elm.text", st, 30, vl); - if(!strcmp(st, "visible")) { - set_state(PART:"bg", "focus", 0.0); - set_state(PART:"elm.text", "focus", 0.0); - } - } - } - program { - name: "mouse_out"; - signal: "mouse,out"; - source: "over"; - action: STATE_SET "default" 0.0; - target: "elm.text"; - target: "bg"; - script { - new st[31]; - new Float:vl; - get_state(PART:"elm.text", st, 30, vl); - if(!strcmp(st, "focus")) { - set_state(PART:"bg", "visible", 0.0); - set_state(PART:"elm.text", "visible", 0.0); - } - } - } - program { - name: "mouse_click"; - signal: "mouse,clicked,1"; - source: "over"; - script { - emit("elm,action,click", ""); - } - } - program { - name: "disable"; - signal: "elm,state,disabled"; - source: "elm"; - action: STATE_SET "dim" 0.0; - target: "elm.text"; - target: "bg"; - } - program { - name: "enable"; - signal: "elm,state,enabled"; - source: "elm"; - action: STATE_SET "default" 0.0; - target: "elm.text"; - target: "bg"; - } - program { - signal: "elm,state,show"; source: "elm"; - action: STATE_SET "visible" 0.0; - transition: LINEAR TRANSITION_VALUE; - target: "bg"; - target: "elm.text"; - target: "over"; - } - program { - signal: "elm,state,hide"; source: "elm"; - action: STATE_SET "default" 0.0; - transition: LINEAR TRANSITION_VALUE; - target: "bg"; - target: "elm.text"; - target: "over"; - } - } - } -} \ No newline at end of file -- 2.7.4 From 42a0048dfdab872071171f6f92e6cb1e8742e61b Mon Sep 17 00:00:00 2001 From: "sungwon2.han" Date: Tue, 16 Jun 2015 09:49:48 +0900 Subject: [PATCH 09/16] Script files to build the reference browser Change-Id: Ib50f1c53f94c92d44b4e4531d1ef997a08562df7 Signed-off-by: sungwon2.han --- .gbs.conf | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ build.sh | 2 +- 2 files changed, 165 insertions(+), 1 deletion(-) create mode 100755 .gbs.conf diff --git a/.gbs.conf b/.gbs.conf new file mode 100755 index 0000000..6313a06 --- /dev/null +++ b/.gbs.conf @@ -0,0 +1,164 @@ +############################################### +# +# Tizen v3.0 for TV (arm-x11) +# +[obs.tizen] +url = https://api.tizen.org + +[profile.tztv_v3.0] +obs = obs.tizen +repos = repo.tv_arm-x11 +buildroot = ~/GBS-ROOT-3.0-TV + +[repo.tv_arm-x11] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/arm-x11/packages/ + +############################################### +# +# Tizen v3.0 for tv (emulator32-x11) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_emulator] +obs = obs.tizentv +repos = repo.tztv_v3.0_emul +buildroot = ~/GBS-ROOT-3.0-TV-EMUL + +[repo.tztv_v3.0_emul] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/emulator32-x11/packages/ + +############################################### +# +# Tizen v3.0 for tv (arm64-x11) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_arm64-x11] +obs = obs.tizentv +repos = repo.tztv_v3.0_arm64-x11 +buildroot = ~/GBS-ROOT-3.0-TV-arm64-x11 + +[repo.tztv_v3.0_arm64-x11] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/arm64-x11/packages/ + +############################################### +# +# Tizen v3.0 for tv (ia32-x11) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_ia32-x11] +obs = obs.tizentv +repos = repo.tztv_v3.0_ia32-x11 +buildroot = ~/GBS-ROOT-3.0-TV-ia32-x11 + +[repo.tztv_v3.0_ia32-x11] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/ia32-x11/packages/ + +############################################### +# +# Tizen v3.0 for tv (x86_64-x11) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_x86_64-x11] +obs = obs.tizentv +repos = repo.tztv_v3.0_x86_64-x11 +buildroot = ~/GBS-ROOT-3.0-TV-x86_64-x11 + +[repo.tztv_v3.0_x86_64-x11] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/x86_64-x11/packages/ + +############################################### +# +# Tizen v3.0 for TV (arm-wayland) +# +[obs.tizen] +url = https://api.tizen.org + +[profile.tztv_v3.0-wayland] +obs = obs.tizen +repos = repo.tv_arm-wayland +buildroot = ~/GBS-ROOT-3.0-TV-wayland + +[repo.tv_arm-wayland] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/arm-wayland/packages/ + +############################################### +# +# Tizen v3.0 for tv (emulator32-wayland) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_emulator-wayland] +obs = obs.tizentv +repos = repo.tztv_v3.0_emul-wayland +buildroot = ~/GBS-ROOT-3.0-TV-EMUL-wayland + +[repo.tztv_v3.0_emul-wayland] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/emulator32-wayland/packages/ + +############################################### +# +# Tizen v3.0 for tv (arm64-wayland) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_arm64-wayland] +obs = obs.tizentv +repos = repo.tztv_v3.0_arm64-wayland +buildroot = ~/GBS-ROOT-3.0-TV-arm64-wayland + +[repo.tztv_v3.0_arm64-wayland] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/arm64-wayland/packages/ + +############################################### +# +# Tizen v3.0 for mobile (arm64-wayland) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tzmo_v3.0_arm64-wayland] +obs = obs.tizentv +repos = repo.tzmo_v3.0_arm64-wayland +buildroot = ~/GBS-ROOT-3.0-MOBILE-arm64-wayland + +[repo.tzmo_v3.0_arm64-wayland] +url = http://download.tizen.org/snapshots/tizen/mobile/latest/repos/arm64-wayland/packages/ + +############################################### +# +# Tizen v3.0 for tv (ia32-wayland) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_ia32-wayland] +obs = obs.tizentv +repos = repo.tztv_v3.0_ia32-wayland +buildroot = ~/GBS-ROOT-3.0-TV-ia32-wayland + +[repo.tztv_v3.0_ia32-wayland] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/ia32-wayland/packages/ + +############################################### +# +# Tizen v3.0 for tv (x86_64-wayland) +# +[obs.tizentv] +url = https://api.tizen.org + +[profile.tztv_v3.0_x86_64-wayland] +obs = obs.tizentv +repos = repo.tztv_v3.0_x86_64-wayland +buildroot = ~/GBS-ROOT-3.0-TV-x86_64-wayland + +[repo.tztv_v3.0_x86_64-wayland] +url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/x86_64-wayland/packages/ diff --git a/build.sh b/build.sh index 4478e3a..b61fe4f 100755 --- a/build.sh +++ b/build.sh @@ -1 +1 @@ -gbs -c .gbs.conf build -P tztv_v3.0 -A armv7l --include-all $@ +gbs -c .gbs.conf build -P tztv_v3.0-wayland -A armv7l --include-all $@ -- 2.7.4 From aa8269d97a8f9eca52623023a6b982680c7860da Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 22 Jun 2015 16:45:15 +0900 Subject: [PATCH 10/16] Modifying path for db files Browser crashes due to the error below. >> Error while starting transaction >> UNHANDLED EXCEPTION attempt to write a readonly database Platform only allows following path to access db files. >> /home/{ACCOUNT}/.applications/dbspace/ This patch supports multi-user mode and fixes the crash. However, this should be reverted later once multi-user db is supported via browser-provider. Change-Id: I2a2cf7d3956dbba37653b773b203706f866e96a9 Signed-off-by: Youngsoo Choi --- CMakeLists.txt | 1 - core/Config/Config.cpp | 14 +++++++++----- core/Config/ConfigValues.h.in | 1 - packaging/org.tizen.browser.spec | 16 ++-------------- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cde5451..94aed0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,6 @@ cmake_minimum_required(VERSION 2.8) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(BINDIR "${PREFIX}/bin") SET(RESDIR "${PREFIX}/res" CACHE STRING "The path of resources") -SET(RESDBDIR "/opt${PREFIX}/res") SET(WEBKITDIR "/opt/usr/data/webkit" CACHE STRING "The path of web engine") SET(EDJE_DIR "${RESDIR}/edje/") SET(CERTS_DIR "${RESDIR}/certs/") diff --git a/core/Config/Config.cpp b/core/Config/Config.cpp index 3e274ea..2665734 100644 --- a/core/Config/Config.cpp +++ b/core/Config/Config.cpp @@ -16,6 +16,7 @@ #include "browser_config.h" #include "Config.h" +#include namespace tizen_browser { @@ -24,13 +25,16 @@ namespace config void DefaultConfig::load(const std::string &) { + const char *db_path = NULL; + db_path = tzplatform_getenv(TZ_USER_DB); + m_data["main_service_name"] = std::string("org.tizen.browser.base_UI"); //m_data["favorite_service_name"] = std::string("org.tizen.browser.service.favorite.browserProvider"); m_data["favorite_service_name"] = std::string("org.tizen.browser.favoriteservice"); - m_data["DB_BOOKMARK"] = std::string("bookmark.db"); - m_data["DB_SETTINGS"] = std::string("settings.db"); - m_data["DB_HISTORY"] = std::string("history.db"); - m_data["DB_SESSION"] = std::string("session.db"); + m_data["DB_BOOKMARK"] = std::string(".browser.bookmark.db"); + m_data["DB_SETTINGS"] = std::string(".browser.settings.db"); + m_data["DB_HISTORY"] = std::string(".browser.history.db"); + m_data["DB_SESSION"] = std::string(".browser.session.db"); m_data["TOOLTIP_DELAY"] = 0.05; // time from mouse in to tooltip show m_data["TOOLTIP_HIDE_TIMEOUT"] = 2.0; // time from tooltip show to tooltip hide @@ -39,7 +43,7 @@ void DefaultConfig::load(const std::string &) # include "ConfigValues.h" - + m_data["resourcedb/dir"] = std::string(db_path)+"/"; } void DefaultConfig::store(const std::string & ) diff --git a/core/Config/ConfigValues.h.in b/core/Config/ConfigValues.h.in index ae28002..53fce72 100644 --- a/core/Config/ConfigValues.h.in +++ b/core/Config/ConfigValues.h.in @@ -1,5 +1,4 @@ //This is template file for configuration variables. m_data["services/dir"] = std::string("@CMAKE_INSTALL_PREFIX@/services"); m_data["resource/dir"] = std::string("@RESDIR@"); -m_data["resourcedb/dir"] = std::string("@RESDBDIR@/db/"); m_data["webkit/dir"] = std::string("@WEBKITDIR@"); diff --git a/packaging/org.tizen.browser.spec b/packaging/org.tizen.browser.spec index ffbba3b..66ddef9 100644 --- a/packaging/org.tizen.browser.spec +++ b/packaging/org.tizen.browser.spec @@ -35,7 +35,8 @@ BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(capi-network-connection) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libcurl) -BuildRequires: browser-provider-devel +BuildRequires: pkgconfig(libtzplatform-config) +BuildRequires: browser-provider-devel BuildRequires: cmake BuildRequires: edje-tools @@ -56,7 +57,6 @@ BuildRequires: pkgconfig(dlog) %define _appdir /usr/apps/%{name} %define _bindir %{_appdir}/bin -%define _appdatadir /opt/usr/apps/%{name} %define COVERAGE_STATS %{?coverage_stats:ON}%{!?coverage_stats:OFF} %define _manifestdir /usr/share/packages @@ -98,23 +98,11 @@ cd %{_build_dir} %post -#Prepare files -if [ ! -f %{_appdatadir}/res/db/bookmark.db ]; -then - mkdir -p %{_appdatadir}/res/db - chsmack -a "dtv-org.tizen.browser" %{_appdatadir}/res/db - sqlite3 %{_appdatadir}/res/db/bookmark.db '' - chsmack -a "dtv-org.tizen.browser" %{_appdatadir}/res/db/bookmark.db -fi - mkdir -p /opt/usr/data/webkit/storage mkdir -p /opt/usr/data/webkit/favicon #Change ownership and privileges -chown -R 5000:5000 %{_appdatadir}/res/db chown -R 5000:5000 /opt/usr/data/webkit -chmod -R 777 %{_appdatadir}/res/db -chmod 777 %{_appdatadir}/res/db/bookmark.db chmod -R 660 /opt/usr/data/webkit %files -- 2.7.4 From c3d5d61f316279c6b1aed481337368ca588628d4 Mon Sep 17 00:00:00 2001 From: Gajendra N Date: Fri, 26 Jun 2015 14:13:58 +0530 Subject: [PATCH 11/16] fixup! Unable to delete all history items. 1) Fixes popup button not disabled on deleting last item. 2) Shows proper date and time. Change-Id: I323fdd6a6e7871f153c68f7c10d8587638a1de28 --- services/HistoryService/HistoryService.h | 1 + services/HistoryService/src/HistoryService.cpp | 66 ++++++++++++++++++++++---- services/SimpleUI/SimpleUI.cpp | 1 + 3 files changed, 60 insertions(+), 8 deletions(-) diff --git a/services/HistoryService/HistoryService.h b/services/HistoryService/HistoryService.h index e92cf5d..0e09cab 100644 --- a/services/HistoryService/HistoryService.h +++ b/services/HistoryService/HistoryService.h @@ -43,6 +43,7 @@ public: virtual ~HistoryService(); virtual std::string getName(); + int getHistoryId(const std::string & url); /** * @throws HistoryException on error */ diff --git a/services/HistoryService/src/HistoryService.cpp b/services/HistoryService/src/HistoryService.cpp index a377bf1..5aff218 100644 --- a/services/HistoryService/src/HistoryService.cpp +++ b/services/HistoryService/src/HistoryService.cpp @@ -17,12 +17,16 @@ #include #include #include +#include +#include +#include #include "ServiceManager.h" #include "HistoryService.h" #include "HistoryItem.h" #include "AbstractWebEngine.h" #include "EflTools.h" + namespace tizen_browser { namespace services @@ -60,8 +64,7 @@ void HistoryService::setStorageServiceTestMode(bool testmode) { } int HistoryService::getHistoryItemsCount(){ - return 1; - //return getStorageManager()->getHistoryItemsCount(); + return history_list.size(); } static int __get_duplicated_ids_p(int **ids, int *count, const int limit, const int offset, @@ -122,11 +125,12 @@ void HistoryService::addHistoryItem(std::shared_ptr his){ bp_history_adaptor_set_url(id, (his->getUrl()).c_str()); bp_history_adaptor_set_title(id, (his->getTitle()).c_str()); - + bp_history_adaptor_set_date_visited(id,-1); std::unique_ptr favicon_blob = tizen_browser::tools::EflTools::getBlobPNG(favicon); unsigned char * fav = std::move((unsigned char*)favicon_blob->getData()); bp_history_adaptor_set_icon(id, favicon->width, favicon->height, fav, favicon_blob->getLength()); + history_list.push_back(his); BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); } @@ -141,7 +145,28 @@ void HistoryService::insertOrRefresh(std::shared_ptr hi) { */ void HistoryService::clearAllHistory() { - getStorageManager()->deleteHistory(); + bp_history_adaptor_reset(); + history_list.clear(); +} + +int HistoryService::getHistoryId(const std::string & url) +{ + bp_history_rows_cond_fmt conds; + conds.limit = -1; + conds.offset = 0; + conds.order_offset = BP_HISTORY_O_DATE_CREATED; + conds.ordering = 0; + conds.period_offset = BP_HISTORY_O_DATE_CREATED; + conds.period_type = BP_HISTORY_DATE_ALL; + int *ids = 0; + int ids_count = 0; + int ret = bp_history_adaptor_get_cond_ids_p(&ids ,&ids_count, &conds, BP_HISTORY_O_URL, url.c_str(), 0); + if (ids_count!=0){ + int i = *ids; + free(ids); + return i; + } + return 0; } /** @@ -149,9 +174,12 @@ void HistoryService::clearAllHistory() */ void HistoryService::clearURLHistory(const std::string & url) { - getStorageManager()->deleteHistory(url); - if(0 == getHistoryItemsCount()){ - historyEmpty(true); + int id = getHistoryId(url); + if (id != 0) + bp_history_adaptor_delete(id); + if (0 == (getHistoryItemsCount() - 1)) { + historyEmpty(true); + history_list.clear(); } } @@ -182,13 +210,35 @@ HistoryItemVector& HistoryService::getHistoryItems(int historyDepthInDays, int m BROWSER_LOGD("Error! Could not get ids!"); } - bp_history_offset offset = (BP_HISTORY_O_URL | BP_HISTORY_O_TITLE | BP_HISTORY_O_FAVICON); + bp_history_offset offset = (BP_HISTORY_O_URL | BP_HISTORY_O_TITLE | BP_HISTORY_O_FAVICON | BP_HISTORY_O_DATE_CREATED); for(int i = 0; i< (*count1); i++){ bp_history_info_fmt history_info; bp_history_adaptor_get_info(ids[i],offset,&history_info); + int date; + bp_history_adaptor_get_date_created(ids[i], &date); + + struct tm *item_time_info; + time_t item_time = (time_t)date; + item_time_info = localtime(&item_time); + + int m_year = item_time_info->tm_year; + int m_month = item_time_info->tm_mon + 1; + int m_day = item_time_info->tm_yday; + int m_month_day = item_time_info->tm_mday; + int m_date = date; + int min = item_time_info->tm_min; + int hour= item_time_info->tm_hour; + int sec = item_time_info->tm_sec; + m_year = 2000 + m_year % 100; + std::shared_ptr history = std::make_shared(std::string(history_info.url)); + boost::gregorian::date d(m_year,m_month,m_month_day); + boost::posix_time::ptime t(d,boost::posix_time::time_duration(hour,min,sec)); + history->setLastVisit(t); + history->setUrl(std::string(history_info.url ? history_info.url : "")); + history->setTitle(std::string(history_info.title ? history_info.title : "")); history_list.push_back(history); } ids = NULL; diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 3b6ee0d..a25ef5d 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -978,6 +978,7 @@ void SimpleUI::disableHistoryButton(bool flag) { BROWSER_LOGD("[%s:%d] flag:%d ", __PRETTY_FUNCTION__, __LINE__, flag); m_history->setEnabled(!flag); + m_settingDeleteHistory->setEnabled(m_historyService->getHistoryItemsCount()); hidePopup(); } -- 2.7.4 From d1cea92b3c285b651f1ea525acc8c62317f5a449 Mon Sep 17 00:00:00 2001 From: Jung Ick Guack Date: Tue, 30 Jun 2015 21:37:15 +0900 Subject: [PATCH 12/16] 1) Fixed a crash of adding bookmark. (Added null checking) 2) Added privilege for using browser-provider Change-Id: I2c9c8b4208e9d1ff7b951419fad15ed404a170bb Signed-off-by: Jung Ick Guack --- manifest.xml.in | 4 ++++ services/BookmarkService/BookmarkService.cpp | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/manifest.xml.in b/manifest.xml.in index b8756da..8c4c7f1 100644 --- a/manifest.xml.in +++ b/manifest.xml.in @@ -73,4 +73,8 @@ + + http://tizen.org/privilege/bookmark.admin + http://tizen.org/privilege/history.admin + diff --git a/services/BookmarkService/BookmarkService.cpp b/services/BookmarkService/BookmarkService.cpp index 2fd0bf7..99b14e2 100644 --- a/services/BookmarkService/BookmarkService.cpp +++ b/services/BookmarkService/BookmarkService.cpp @@ -97,14 +97,16 @@ std::shared_ptr BookmarkService::addToBookmarks( bp_bookmark_adaptor_set_url(bookmark_id, address.c_str()); bp_bookmark_adaptor_set_title(bookmark_id, tittle.c_str()); - - std::unique_ptr thumb_blob = tizen_browser::tools::EflTools::getBlobPNG(thumbnail); - unsigned char * thumb = std::move((unsigned char*)thumb_blob->getData()); - bp_bookmark_adaptor_set_snapshot(bookmark_id, thumbnail->width, thumbnail->height, thumb, thumb_blob->getLength()); - - std::unique_ptr favicon_blob = tizen_browser::tools::EflTools::getBlobPNG(favicon); - unsigned char * fav = std::move((unsigned char*)favicon_blob->getData()); - bp_bookmark_adaptor_set_icon(bookmark_id, favicon->width, favicon->height, fav, favicon_blob->getLength()); + if (thumbnail) { + std::unique_ptr thumb_blob = tizen_browser::tools::EflTools::getBlobPNG(thumbnail); + unsigned char * thumb = std::move((unsigned char*)thumb_blob->getData()); + bp_bookmark_adaptor_set_snapshot(bookmark_id, thumbnail->width, thumbnail->height, thumb, thumb_blob->getLength()); + } + if (favicon) { + std::unique_ptr favicon_blob = tizen_browser::tools::EflTools::getBlobPNG(favicon); + unsigned char * fav = std::move((unsigned char*)favicon_blob->getData()); + bp_bookmark_adaptor_set_icon(bookmark_id, favicon->width, favicon->height, fav, favicon_blob->getLength()); + } m_bookmarks.push_back(bookmark); BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); -- 2.7.4 From 8d99569cc11767afa8c7fd7cda7289bb5c32d3cc Mon Sep 17 00:00:00 2001 From: Jung Ick Guack Date: Thu, 2 Jul 2015 09:43:32 +0900 Subject: [PATCH 13/16] Changed "opengl" to "3d" on elm_config_accel_preference_set Change-Id: I227e313d22ffaf5b5294da53bbf232d1943cd4f7 Signed-off-by: Jung Ick Guack --- core/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 core/main.cpp diff --git a/core/main.cpp b/core/main.cpp old mode 100644 new mode 100755 index f435d7e..9342b05 --- a/core/main.cpp +++ b/core/main.cpp @@ -38,7 +38,8 @@ const std::string DEFAULT_URL = ""; static bool app_create(void * /*app_data*/) { - elm_config_accel_preference_set("opengl"); +// elm_config_accel_preference_set("opengl"); + elm_config_accel_preference_set("3d"); elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_CLICK); // Enabling focus -- 2.7.4 From c55051a1a252e538fd50bdc07fcf17713464a3a1 Mon Sep 17 00:00:00 2001 From: Jung Ick Guack Date: Thu, 2 Jul 2015 09:44:48 +0900 Subject: [PATCH 14/16] Fixed app service is not working during runtime. Change-Id: Ie0ed329ba8449debae7e5d81372097b15c62957e Signed-off-by: Jung Ick Guack --- services/SimpleUI/SimpleUI.cpp | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index a25ef5d..f2567ba 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -294,26 +294,27 @@ int SimpleUI::exec(const std::string& _url) } m_initialised = true; - // only when first run - if (url.empty()) { - BROWSER_LOGD("[%s]: changing to homeUrl", __func__); - switchViewToHomePage(); - filterURL(HomePageURL); - if(lastSession.items().size() >= 1){ - for(auto iter=lastSession.items().begin(), - end=lastSession.items().end(); - iter != end; - iter++ - ){ - openNewTab(iter->second); - } - m_sessionService->getStorage()->deleteSession(lastSession); - } - } - else - openNewTab(url); } + // only when first run + if (url.empty()) { + BROWSER_LOGD("[%s]: changing to homeUrl", __func__); + switchViewToHomePage(); + filterURL(HomePageURL); + if(lastSession.items().size() >= 1){ + for(auto iter=lastSession.items().begin(), + end=lastSession.items().end(); + iter != end; + iter++ + ){ + openNewTab(iter->second); + } + m_sessionService->getStorage()->deleteSession(lastSession); + } + } + else + openNewTab(url); + BROWSER_LOGD("[%s]:%d url=%s", __func__, __LINE__, url.c_str()); m_simpleURI->setFocus(); -- 2.7.4 From bf8072a5a99133eea135c87d65559ed750dfde72 Mon Sep 17 00:00:00 2001 From: Jung Ick Guack Date: Thu, 2 Jul 2015 22:08:01 +0900 Subject: [PATCH 15/16] 1) Getting favicon by proper API. 2) Enabling create new tab by tag target attribute. - Removed smart class, Using smart callback 3) Changed toast text when delete data from setting 4) Not set user agent by full string, just set applicatino name for UA 5) Disabled function of private browsing Change-Id: I712044d64b791f28cd9608e876ba9472e8a08300 Signed-off-by: Jung Ick Guack --- services/SimpleUI/SimpleUI.cpp | 4 +-- services/WebKitEngineService/WebView.cpp | 58 ++++++++++++++++++++++++++------ services/WebKitEngineService/WebView.h | 1 + 3 files changed, 50 insertions(+), 13 deletions(-) diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index f2567ba..7e514cc 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -422,7 +422,7 @@ void SimpleUI::connectActions() m_showSettingsPopup->triggered.connect(boost::bind(&SimpleUI::showSettingsMenu, this)); // m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::services::PlatformInputManager::setPointerModeEnabled, m_platformInputManager.get(), _1)); - m_settingPrivateBrowsing->toggled.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, _1)); +// m_settingPrivateBrowsing->toggled.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, _1)); m_settingDeleteHistory->triggered.connect(boost::bind(&SimpleUI::settingsDeleteHistory, this)); m_settingDeleteData->triggered.connect(boost::bind(&SimpleUI::settingsDeleteData, this));; m_settingDeleteFavorite->triggered.connect(boost::bind(&SimpleUI::settingsDeleteFavorite, this));; @@ -1061,7 +1061,7 @@ void SimpleUI::onDeleteDataButton(PopupButtons button, std::shared_ptr< PopupDat BROWSER_LOGD("[%s]: OK", __func__); m_webEngine->clearPrivateData(); webTitleBar->removeFavIcon(); - webTitleBar->show("Data deleted"); + webTitleBar->show("All cookies and cache are deleted"); hidePopup(); } } diff --git a/services/WebKitEngineService/WebView.cpp b/services/WebKitEngineService/WebView.cpp index 963e192..75ea343 100644 --- a/services/WebKitEngineService/WebView.cpp +++ b/services/WebKitEngineService/WebView.cpp @@ -46,6 +46,7 @@ #include "ServiceManager.h" #define certificate_crt_path CERTS_DIR +#define APPLICATION_NAME_FOR_USER_AGENT "SamsungBrowser/1.0" using namespace tizen_browser::tools; @@ -75,6 +76,8 @@ WebView::~WebView() void WebView::init(Evas_Object * opener) { #if defined(USE_EWEBKIT) + +#if 0 //not using smart class static Ewk_View_Smart_Class *clasz = NULL; Ewk_Context *context = ewk_context_default_get(); if (!clasz) { @@ -84,13 +87,11 @@ void WebView::init(Evas_Object * opener) // clasz->run_javascript_alert = onJavascriptAlert; // clasz->run_javascript_confirm = onJavascriptConfirm; // clasz->run_javascript_prompt = onJavascriptPrompt; -// clasz->window_create = onWindowCreate; -// clasz->window_close = onWindowClose; - + clasz->window_create = onWindowCreate; + clasz->window_close = onWindowClose; ewk_context_cache_model_set(context, EWK_CACHE_MODEL_PRIMARY_WEBBROWSER); ewk_context_certificate_file_set(context, certificate_crt_path); - } Evas_Smart *smart = evas_smart_class_new(&clasz->sc); @@ -98,8 +99,12 @@ void WebView::init(Evas_Object * opener) /// \todo: Consider process model. Now, One UIProcess / One WebProcess. // if (opener) // m_ewkView = ewk_view_smart_add(evas_object_evas_get(m_parent), smart, context, ewk_view_page_group_get(opener)); -// else + else m_ewkView = ewk_view_smart_add(evas_object_evas_get(m_parent), smart, context, ewk_page_group_create(NULL)); +#else + m_ewkView = ewk_view_add(evas_object_evas_get(m_parent)); +// Ewk_Context *context = ewk_view_context_get(m_ewkView); +#endif evas_object_data_set(m_ewkView, "_container", this); BROWSER_LOGD("%s:%d %s self=%p", __FILE__, __LINE__, __func__, this); @@ -107,14 +112,14 @@ void WebView::init(Evas_Object * opener) evas_object_color_set(m_ewkView, 255, 255, 255, 255); evas_object_size_hint_weight_set(m_ewkView, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(m_ewkView, EVAS_HINT_FILL, EVAS_HINT_FILL); - ewk_view_user_agent_set(m_ewkView, "Mozilla/5.0 (X11; SMART-TV; Linux) AppleWebkit/538.1 (KHTML, like Gecko) Safari/538.1"); + ewk_view_application_name_for_user_agent_set(m_ewkView, APPLICATION_NAME_FOR_USER_AGENT); //\todo: when value is other than 1.0, scroller is located improperly // ewk_view_device_pixel_ratio_set(m_ewkView, 1.0f); #if PLATFORM(TIZEN) ewk_view_resume(m_ewkView); #endif - +#if 0 // set local storage, favion, cookies std::string webkit_path = boost::any_cast (config.get("webkit/dir")); // ewk_context_web_storage_path_set(context, (webkit_path + std::string("/storage")).c_str()); @@ -127,7 +132,7 @@ void WebView::init(Evas_Object * opener) // ewk_cookie_manager_widget_cookie_directory_set(ewk_context_cookie_manager_get(context), webkit_path.c_str()); ewk_favicon_database_icon_change_callback_add(ewk_context_favicon_database_get(context), __faviconChanged, this); - +#endif setupEwkSettings(); registerCallbacks(); #else @@ -149,6 +154,8 @@ void WebView::registerCallbacks() evas_object_smart_callback_add(m_ewkView, "back,forward,list,changed", __backForwardListChanged, this); + evas_object_smart_callback_add(m_ewkView, "create,window", __OnNewWindowRequest, this); + evas_object_smart_callback_add(m_ewkView, "geolocation,permission,request", __geolocationPermissionRequest, this); evas_object_smart_callback_add(m_ewkView, "usermedia,permission,request", __usermediaPermissionRequest, this); evas_object_smart_callback_add(m_ewkView, "notification,permission,request", __notificationPermissionRequest, this); @@ -177,6 +184,8 @@ void WebView::unregisterCallbacks() evas_object_smart_callback_del_full(m_ewkView, "back,forward,list,changed", __backForwardListChanged, this); + evas_object_smart_callback_del_full(m_ewkView, "create,window", __OnNewWindowRequest, this); + evas_object_smart_callback_del_full(m_ewkView, "geolocation,permission,request", __geolocationPermissionRequest, this); evas_object_smart_callback_del_full(m_ewkView, "usermedia,permission,request", __usermediaPermissionRequest, this); evas_object_smart_callback_del_full(m_ewkView, "notification,permission,request", __notificationPermissionRequest, this); @@ -712,6 +721,30 @@ void WebView::__backForwardListChanged(void * data, Evas_Object * /* obj */, voi self->forwardEnableChanged(self->isForwardEnabled()); } +void WebView::__OnNewWindowRequest(void *data, Evas_Object*, void* out) +{ + BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); + + WebView * self = reinterpret_cast(data); + BROWSER_LOGD("Window creating in tab: %s", self->getTabId().toString().c_str()); + + std::shared_ptr> m_webEngine; + m_webEngine = std::dynamic_pointer_cast + < + basic_webengine::AbstractWebEngine,tizen_browser::core::AbstractService + > + (tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.webkitengineservice")); + M_ASSERT(m_webEngine); + + /// \todo: Choose newly created tab. + TabId id = m_webEngine->addTab(std::string(), &self->getTabId()); + BROWSER_LOGD("Created tab: %s", id.toString().c_str()); + + Evas_Object* tab_ewk_view = m_webEngine->getTabView(id); + *static_cast(out) = tab_ewk_view; +} + + #if PLATFORM(TIZEN) void WebView::__faviconChanged(const char * uri, void * data) #else @@ -965,12 +998,15 @@ std::shared_ptr WebView::getFavicon() { #if defined(USE_EWEBKIT) if (faviconImage.get() == NULL) { -//#if PLATFORM(TIZEN) + +#if PLATFORM(TIZEN) // Evas_Object * favicon = ewk_view_favicon_get(m_ewkView); -//#else + Evas_Object * favicon = ewk_context_icon_database_icon_object_add(ewk_view_context_get(m_ewkView), ewk_view_url_get(m_ewkView),evas_object_evas_get(m_ewkView)); +#else Ewk_Favicon_Database * database = ewk_context_favicon_database_get(ewk_view_context_get(m_ewkView)); Evas_Object * favicon = ewk_favicon_database_icon_get(database, ewk_view_url_get(m_ewkView), evas_object_evas_get(m_ewkView)); -//#endif +#endif + #ifndef NDEBUG int w = 0, h = 0; evas_object_image_size_get(favicon, &w, &h); diff --git a/services/WebKitEngineService/WebView.h b/services/WebKitEngineService/WebView.h index 0b6b504..ce6233d 100644 --- a/services/WebKitEngineService/WebView.h +++ b/services/WebKitEngineService/WebView.h @@ -165,6 +165,7 @@ private: static void __urlChanged(void * data, Evas_Object * obj, void * event_info); static void __backForwardListChanged(void * data, Evas_Object * obj, void * event_info); + static void __OnNewWindowRequest(void *data, Evas_Object*, void* out); // Favicon - from database #if defined(USE_EWEBKIT) -- 2.7.4 From a16dfb0bd899bd791f1aff1eebc501b2a3153a45 Mon Sep 17 00:00:00 2001 From: Jung Ick Guack Date: Thu, 2 Jul 2015 22:23:14 +0900 Subject: [PATCH 16/16] Release 0.0.9 Change-Id: I8d0ec64259ef4e777885a88cbb589a810d0a52c4 Signed-off-by: Jung Ick Guack --- packaging/org.tizen.browser.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/org.tizen.browser.spec b/packaging/org.tizen.browser.spec index 66ddef9..44c7454 100644 --- a/packaging/org.tizen.browser.spec +++ b/packaging/org.tizen.browser.spec @@ -1,6 +1,6 @@ Name: org.tizen.browser Summary: Tizen TV Open Browser -Version: 0.0.8 +Version: 0.0.9 Release: 0 Group: Applications/Web License: Apache-2.0 -- 2.7.4