summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungSeop Park <sns.park@samsung.com>2017-06-02 14:26:56 +0900
committerHye Kyoung Hwang <cookie@samsung.com>2017-06-02 05:51:03 +0000
commit0449439b65a4639b201833f89839d66894010369 (patch)
treedc92f6da0ab50bd9d957ed5eea9b48f838b9544d
parent260c94b164264e2fbbb231d56c32fe725b68595e (diff)
downloadbrowser-0449439b65a4639b201833f89839d66894010369.tar.gz
browser-0449439b65a4639b201833f89839d66894010369.tar.bz2
browser-0449439b65a4639b201833f89839d66894010369.zip
Fix below issues: - [CRC][SPC_M_SEP]Missing space after , [whitespace/comma] [3] - [CRC][SPC_M_SEP]Extra space before ) [whitespace/parens] [2] - [CRC][SPC_M_SEP]Missing space before ( in for( [whitespace/parens] [5] - [CRC][BRC_M_SMT]If an 'else' has a brace on one side, it should have it on both [readability/braces] [5] - [CRC][BRC_M_SMT] An else should appear on the same line as the preceding } [whitespace/newline] [4] Change-Id: Ia35bd1dd9e94192e5ae1f5dfc614aca0803c9d9f Signed-off-by: SeungSeop Park <sns.park@samsung.com>
-rwxr-xr-xservices/WebEngineService/WebEngineService.cpp79
1 files changed, 40 insertions, 39 deletions
diff --git a/services/WebEngineService/WebEngineService.cpp b/services/WebEngineService/WebEngineService.cpp
index c36b5e8..a437f04 100755
--- a/services/WebEngineService/WebEngineService.cpp
+++ b/services/WebEngineService/WebEngineService.cpp
@@ -88,7 +88,7 @@ Evas_Object * WebEngineService::getLayout()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return nullptr;
}
return m_currentWebView->getLayout();
@@ -100,7 +100,7 @@ Evas_Object * WebEngineService::getWidget()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return nullptr;
}
return m_currentWebView->getWidget();
@@ -193,7 +193,7 @@ void WebEngineService::connectSignals(std::shared_ptr<WebView> webView)
});
webView->changeUIColor.connect(
[this](const int& r, const int& g, const int& b, const int& a){
- this->changeUIColor(r,g,b,a);
+ this->changeUIColor(r, g, b, a);
});
webView->installPWA.connect(
[this](const std::string& str, const std::string& id, const std::string& sn) { return *installPWA(str, id, sn); });
@@ -265,7 +265,7 @@ int WebEngineService::createTabId()
void WebEngineService::onTabIdCreated(int tabId)
{
- m_tabIdCreated= tabId;
+ m_tabIdCreated = tabId;
}
void WebEngineService::setURI(const std::string & uri)
@@ -273,7 +273,7 @@ void WebEngineService::setURI(const std::string & uri)
BROWSER_LOGD("[%s:%d] uri=%s", __PRETTY_FUNCTION__, __LINE__, uri.c_str());
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_stopped = false;
@@ -316,8 +316,9 @@ std::string WebEngineService::getTitle() const
return m_currentWebView->getURI();
else
return m_currentWebView->getTitle();
- } else
+ } else {
return std::string("");
+ }
}
TabOrigin WebEngineService::getOrigin() const
@@ -333,7 +334,7 @@ std::string WebEngineService::getUserAgent() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return std::string();
}
return m_currentWebView->getUserAgent();
@@ -344,7 +345,7 @@ void WebEngineService::setUserAgent(const std::string& ua)
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_currentWebView->setUserAgent(ua);
@@ -355,7 +356,7 @@ void WebEngineService::suspend()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
disconnectSignals(m_currentWebView);
@@ -368,7 +369,7 @@ void WebEngineService::resume()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
if (!m_signalsConnected)
@@ -393,7 +394,7 @@ bool WebEngineService::isSuspended() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return false;
}
return m_currentWebView->isSuspended();
@@ -404,7 +405,7 @@ void WebEngineService::stopLoading(void)
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_stopped = true;
@@ -416,7 +417,7 @@ void WebEngineService::reload(void)
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_stopped = false;
@@ -428,7 +429,7 @@ void WebEngineService::back(void)
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_stopped = false;
@@ -441,7 +442,7 @@ void WebEngineService::forward(void)
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_stopped = false;
@@ -454,7 +455,7 @@ bool WebEngineService::isBackEnabled() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return false;
}
return m_currentWebView->isBackEnabled();
@@ -465,7 +466,7 @@ bool WebEngineService::isForwardEnabled() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return false;
}
return m_currentWebView->isForwardEnabled();
@@ -476,7 +477,7 @@ bool WebEngineService::isLoading() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return false;
}
return m_currentWebView->isLoading();
@@ -610,8 +611,8 @@ TabId WebEngineService::addTab(
p->setURI(uri);
}
- p->getRotation.connect([this] { return _getRotation(); } );
- p->rotatePrepared.connect([this] { rotatePrepared(); } );
+ p->getRotation.connect([this] { return _getRotation(); });
+ p->rotatePrepared.connect([this] { rotatePrepared(); });
AbstractWebEngine::tabCreated();
@@ -697,8 +698,7 @@ bool WebEngineService::closeTab(TabId id) {
disconnectSignals(m_currentWebView);
m_currentWebView.reset();
}
- }
- else if (closingTabId == m_stateStruct->currentTabId && m_stateStruct->mostRecentTab.size()){
+ } else if (closingTabId == m_stateStruct->currentTabId && m_stateStruct->mostRecentTab.size()) {
res = switchToTab(m_stateStruct->mostRecentTab.back());
}
@@ -760,7 +760,7 @@ void WebEngineService::setFocus()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_currentWebView->setFocus();
@@ -771,7 +771,7 @@ void WebEngineService::clearFocus()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_currentWebView->clearFocus();
@@ -782,7 +782,7 @@ bool WebEngineService::hasFocus() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return false;
}
return m_currentWebView->hasFocus();
@@ -797,8 +797,9 @@ tools::BrowserImagePtr WebEngineService::getFavicon()
return std::make_shared<tizen_browser::tools::BrowserImage>();
else
return m_currentWebView->getFavicon();
- } else
+ } else {
return std::make_shared<tizen_browser::tools::BrowserImage>();
+ }
}
void WebEngineService::setWebViewSettings(std::shared_ptr<WebView> webView) {
@@ -830,28 +831,28 @@ void WebEngineService::_findOnPage(const std::string& str)
void WebEngineService::clearCache()
{
- for(const auto& it: m_stateStruct->tabs) {
+ for (const auto& it: m_stateStruct->tabs) {
it.second->clearCache();
}
}
void WebEngineService::clearCookies()
{
- for(const auto& it: m_stateStruct->tabs) {
+ for (const auto& it: m_stateStruct->tabs) {
it.second->clearCookies();
}
}
void WebEngineService::clearPrivateData()
{
- for(const auto& it: m_stateStruct->tabs) {
+ for (const auto& it: m_stateStruct->tabs) {
it.second->clearPrivateData();
}
}
void WebEngineService::clearPasswordData()
{
- for(const auto& it: m_stateStruct->tabs) {
+ for (const auto& it: m_stateStruct->tabs) {
it.second->clearPasswordData();
}
}
@@ -869,7 +870,7 @@ void WebEngineService::clearFormData()
}
}
ewk_context_form_candidate_data_delete_all(m_defaultContext);
- for(const auto& it: m_stateStruct->tabs)
+ for (const auto& it: m_stateStruct->tabs)
it.second->clearFormData();
}
@@ -878,7 +879,7 @@ void WebEngineService::searchOnWebsite(const std::string & searchString, int fla
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_currentWebView->searchOnWebsite(searchString, flags);
@@ -954,7 +955,7 @@ void WebEngineService::backButtonClicked()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
@@ -983,7 +984,7 @@ void WebEngineService::switchToDesktopMode()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_currentWebView->switchToDesktopMode();
@@ -994,7 +995,7 @@ void WebEngineService::switchToMobileMode()
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_currentWebView->switchToMobileMode();
@@ -1005,7 +1006,7 @@ bool WebEngineService::isDesktopMode() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return false;
}
return m_currentWebView->isDesktopMode();
@@ -1016,7 +1017,7 @@ bool WebEngineService::isFullScreenMode() const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return false;
}
return m_currentWebView->isFullScreen();
@@ -1034,7 +1035,7 @@ bool WebEngineService::getSettingsParam(WebEngineSettings param) {
void WebEngineService::setSettingsParam(WebEngineSettings param, bool value) {
m_settings[param] = value;
- for(auto it = m_stateStruct->tabs.cbegin(); it != m_stateStruct->tabs.cend(); ++it) {
+ for (auto it = m_stateStruct->tabs.cbegin(); it != m_stateStruct->tabs.cend(); ++it) {
switch (param) {
case WebEngineSettings::PAGE_OVERVIEW:
it->second->ewkSettingsAutoFittingSet(value);
@@ -1089,7 +1090,7 @@ void WebEngineService::setBarsShown(bool value) const
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_currentWebView);
if (!m_currentWebView) {
- BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__,"m_currentWebView is null");
+ BROWSER_LOGD("[%s:%d:%s] ", __PRETTY_FUNCTION__, __LINE__, "m_currentWebView is null");
return;
}
m_currentWebView->setBarsShown(value);