if (cert->getResult() == WebConfirmation::ConfirmationResult::Confirmed) {
result = EINA_TRUE;
- }
- else if (cert->getResult() == WebConfirmation::ConfirmationResult::Rejected) {
+ } else if (cert->getResult() == WebConfirmation::ConfirmationResult::Rejected) {
result = EINA_FALSE;
- }
- else {
+ } else {
BROWSER_LOGE("Wrong ConfirmationResult");
return;
}
area.y = 0;
area.w = vh*getZoomFactor()*snapshotProportions;
area.h = vh*getZoomFactor();
- }
- else {
+ } else {
area.x = 0;
area.y = 0;
area.w = vw*getZoomFactor();
if (area.w == 0 || area.h == 0)
return std::make_shared<BrowserImage>();
- BROWSER_LOGD("[%s:%d] Before snapshot (screenshot) - look at the time of taking snapshot below",__func__, __LINE__);
+ BROWSER_LOGD("[%s:%d] Before snapshot (screenshot) - look at the time of taking snapshot below", __func__, __LINE__);
if (async) {
SnapshotItemData *snapshot_data = new SnapshotItemData();
- snapshot_data->web_view = this;
- snapshot_data->snapshot_type = snapshot_type;
- bool result = ewk_view_screenshot_contents_get_async(m_ewkView, area, scale, evas_object_evas_get(m_ewkView), __screenshotCaptured, snapshot_data);
- if (!result)
- BROWSER_LOGD("[%s:%d] ewk_view_screenshot_contents_get_async API failed", __func__, __LINE__);
+ if (snapshot_data) {
+ snapshot_data->web_view = this;
+ snapshot_data->snapshot_type = snapshot_type;
+ bool result = ewk_view_screenshot_contents_get_async(m_ewkView, area, scale, evas_object_evas_get(m_ewkView), __screenshotCaptured, snapshot_data);
+ if (!result)
+ BROWSER_LOGD("[%s:%d] ewk_view_screenshot_contents_get_async API failed", __func__, __LINE__);
+ }
} else {
Evas_Object *snapshot = ewk_view_screenshot_contents_get(m_ewkView, area, scale, evas_object_evas_get(m_ewkView));
BROWSER_LOGD("[%s:%d] Snapshot (screenshot) catched, evas pointer: %p", __func__, __LINE__, snapshot);
std::shared_ptr<basic_webengine::AbstractWebEngine> m_webEngine;
m_webEngine = std::dynamic_pointer_cast
<
- basic_webengine::AbstractWebEngine,tizen_browser::core::AbstractService
+ basic_webengine::AbstractWebEngine, tizen_browser::core::AbstractService
>
(tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.webengineservice", "libWebEngineService.so"));
M_ASSERT(m_webEngine);
WebView * self = reinterpret_cast<WebView *>(data);
std::shared_ptr<AbstractWebEngine> m_webEngine =
std::dynamic_pointer_cast
- <basic_webengine::AbstractWebEngine,tizen_browser::core::AbstractService>
+ <basic_webengine::AbstractWebEngine, tizen_browser::core::AbstractService>
(tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.webengineservice", "libWebEngineService.so"));
m_webEngine->closeTab(self->getTabId());
}
self->m_manifestData.icons.clear();
for (size_t iconNumber = 0; iconNumber < self->m_manifestData.icons_count; iconNumber++) {
ManifestData::_icon icon;
- icon.src = (( tmp = ewk_manifest_icons_src_get(manifest, iconNumber)) ? tmp : "");
- icon.type = (( tmp = ewk_manifest_icons_type_get(manifest, iconNumber)) ? tmp : "");
+ icon.src = ((tmp = ewk_manifest_icons_src_get(manifest, iconNumber)) ? tmp : "");
+ icon.type = ((tmp = ewk_manifest_icons_type_get(manifest, iconNumber)) ? tmp : "");
icon.sizes_count = ewk_manifest_icons_sizes_count_get(manifest, iconNumber);
for (size_t sizeNumber = 0; sizeNumber < icon.sizes_count; sizeNumber++) {
ManifestData::_icon::_size size;
BROWSER_LOGD("Stop signal emitted");
BROWSER_LOGD("Error description: %s", ewk_error_description_get(error));
evas_object_smart_callback_call(obj, "load,stop", nullptr);
- }
- else {
+ } else {
self->loadError();
self->m_loadError = true;
}
void WebView::__faviconChanged(void* data, Evas_Object*, void*)
{
- if(data)
- {
+ if (data) {
WebView * self = static_cast<WebView *>(data);
Evas_Object * favicon = ewk_context_icon_database_icon_object_add(self->m_ewkContext, ewk_view_url_get(self->m_ewkView), evas_object_evas_get(self->m_ewkView));
if (favicon) {
return TEXT_LINK;
if (image && !link)
return IMAGE_ONLY;
- if(selection_mode && image && link)
+ if (selection_mode && image && link)
return TEXT_IMAGE_LINK;
if (image && link)
return IMAGE_LINK;
}
/* Open in new window */
- ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW,_("IDS_BR_OPT_OPEN_IN_NEW_WINDOW_ABB"), true); //TODO: missing translation
+ ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW, _("IDS_BR_OPT_OPEN_IN_NEW_WINDOW_ABB"), true); //TODO: missing translation
/* Save link */
ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_DOWNLOAD_LINK_TO_DISK, _("IDS_BR_BODY_SAVE_LINK"), true);
/* Copy link address */
}
/* Open in new window */
- ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW,_("IDS_BR_OPT_OPEN_IN_NEW_WINDOW_ABB"), true); //TODO: missing translation
+ ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_OPEN_LINK_IN_NEW_WINDOW, _("IDS_BR_OPT_OPEN_IN_NEW_WINDOW_ABB"), true); //TODO: missing translation
/* Save link */
ewk_context_menu_item_append_as_action(menu, EWK_CONTEXT_MENU_ITEM_TAG_DOWNLOAD_LINK_TO_DISK, _("IDS_BR_OPT_SAVE_LINK"), true);
/* Copy link address */
if (data) {
auto *self = static_cast<WebView *>(data);
self->rotatePrepared();
- } else
+ } else {
BROWSER_LOGW("[%s] data = nullptr", __PRETTY_FUNCTION__);
+ }
}
void WebView::__top_controls_moved_cb(void* data, Evas_Object*, void* event_info)
double WebView::getZoomFactor() const
{
- if(EINA_UNLIKELY(m_ewkView == nullptr)) {
+ if (EINA_UNLIKELY(m_ewkView == nullptr)) {
return 1.0;
}
M_ASSERT(m_ewkContext);
if (m_ewkContext) {
ewk_context_form_candidate_data_delete_all(m_ewkContext);
- } else
+ } else {
BROWSER_LOGD("[%s:%d] Warning: no context", __PRETTY_FUNCTION__, __LINE__);
+ }
}
void WebView::searchOnWebsite(const std::string & searchString, int flags)