From 5ef7c8a6a70875d4430752d146bdcb069605d71d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 21 Aug 2012 10:57:44 +0200 Subject: Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147) New snapshot including various build fixes for newer Qt 5 --- Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp | 5 +++++ Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'Source/WebKit2/UIProcess/API/cpp') diff --git a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp index d2681203c..ea43df167 100644 --- a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp +++ b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp @@ -100,3 +100,8 @@ WKEinaSharedString& WKEinaSharedString::operator=(const char* str) eina_stringshare_replace(&m_string, str); return *this; } + +bool WKEinaSharedString::operator==(const char* str) const +{ + return (!str || !m_string) ? (str == m_string) : !strcmp(m_string, str); +} diff --git a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h index 83f661418..68d76f4ea 100644 --- a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h +++ b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h @@ -52,6 +52,9 @@ public: ALWAYS_INLINE bool operator==(const WKEinaSharedString& other) const { return this->m_string == other.m_string; } ALWAYS_INLINE bool operator!=(const WKEinaSharedString& other) const { return !(*this == other); } + bool operator==(const char* str) const; + ALWAYS_INLINE bool operator!=(const char* str) const { return !(*this == str); } + ALWAYS_INLINE operator const char* () const { return m_string; } ALWAYS_INLINE bool isNull() const { return !m_string; } -- cgit v1.2.1