Title: [132800] trunk/Source/WebKit2
Revision
132800
Author
[email protected]
Date
2012-10-29 07:37:22 -0700 (Mon, 29 Oct 2012)

Log Message

[EFL][WK2] Avoid useless assignment in EwkViewImpl::setCustomTextEncodingName()
https://bugs.webkit.org/show_bug.cgi?id=100667

Patch by Christophe Dumez <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (132799 => 132800)


--- trunk/Source/WebKit2/ChangeLog	2012-10-29 14:29:52 UTC (rev 132799)
+++ trunk/Source/WebKit2/ChangeLog	2012-10-29 14:37:22 UTC (rev 132800)
@@ -1,3 +1,24 @@
+2012-10-29  Christophe Dumez  <[email protected]>
+
+        [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  <[email protected]>
 
         [WK2] Enable delegated scrolling as soon as the FrameView is created when using fixed layout

Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp (132799 => 132800)


--- trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp	2012-10-29 14:29:52 UTC (rev 132799)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp	2012-10-29 14:37:22 UTC (rev 132800)
@@ -616,10 +616,9 @@
     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)

Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h (132799 => 132800)


--- trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h	2012-10-29 14:29:52 UTC (rev 132799)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h	2012-10-29 14:37:22 UTC (rev 132800)
@@ -125,7 +125,7 @@
     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);

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (132799 => 132800)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-10-29 14:29:52 UTC (rev 132799)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-10-29 14:37:22 UTC (rev 132800)
@@ -814,7 +814,7 @@
     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;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to