[EFL][WK2] Avoid useless assignment in EwkViewImpl::setCustomTextEncodingName()

https://bugs.webkit.org/show_bug.cgi?id=100667

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-29
Reviewed by Kenneth Rohde Christiansen.

Remove useless m_customEncoding assignment in EwkViewImpl::setCustomTextEncodingName()
since the member is anyway assigned in EwkViewImpl::customTextEncodingName().

Have EwkViewImpl::setCustomTextEncodingName() take a String in argument instead
of a const char* to make the API more C++ and since we don't need a const char*
to assign to m_customEncoding anymore.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::setCustomTextEncodingName):
* UIProcess/API/efl/EwkViewImpl.h:
(EwkViewImpl):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_setting_encoding_custom_set):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 654202a9
2012-10-29 Christophe Dumez <christophe.dumez@intel.com>
[EFL][WK2] Avoid useless assignment in EwkViewImpl::setCustomTextEncodingName()
https://bugs.webkit.org/show_bug.cgi?id=100667
Reviewed by Kenneth Rohde Christiansen.
Remove useless m_customEncoding assignment in EwkViewImpl::setCustomTextEncodingName()
since the member is anyway assigned in EwkViewImpl::customTextEncodingName().
Have EwkViewImpl::setCustomTextEncodingName() take a String in argument instead
of a const char* to make the API more C++ and since we don't need a const char*
to assign to m_customEncoding anymore.
* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::setCustomTextEncodingName):
* UIProcess/API/efl/EwkViewImpl.h:
(EwkViewImpl):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_setting_encoding_custom_set):
2012-10-29 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[WK2] Enable delegated scrolling as soon as the FrameView is created when using fixed layout
......
......@@ -616,10 +616,9 @@ const char* EwkViewImpl::customTextEncodingName() const
return m_customEncoding;
}
void EwkViewImpl::setCustomTextEncodingName(const char* encoding)
void EwkViewImpl::setCustomTextEncodingName(const String& encoding)
{
m_customEncoding = encoding;
m_pageProxy->setCustomTextEncodingName(encoding ? encoding : String());
m_pageProxy->setCustomTextEncodingName(encoding);
}
void EwkViewImpl::setMouseEventsEnabled(bool enabled)
......
......@@ -125,7 +125,7 @@ public:
const char* themePath() const;
void setThemePath(const char* theme);
const char* customTextEncodingName() const;
void setCustomTextEncodingName(const char* encoding);
void setCustomTextEncodingName(const String& encoding);
bool mouseEventsEnabled() const { return m_mouseEventsEnabled; }
void setMouseEventsEnabled(bool enabled);
......
......@@ -814,7 +814,7 @@ Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object* ewkView, const char*
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
impl->setCustomTextEncodingName(encoding);
impl->setCustomTextEncodingName(encoding ? encoding : String());
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment