Diff
Modified: trunk/Source/WTF/ChangeLog (128506 => 128507)
--- trunk/Source/WTF/ChangeLog 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WTF/ChangeLog 2012-09-13 21:19:41 UTC (rev 128507)
@@ -1,3 +1,22 @@
+2012-09-13 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ Evas_Object* is a ref'ed structure, so tread it as such
+ https://bugs.webkit.org/show_bug.cgi?id=96659
+
+ Reviewed by Adam Barth.
+
+ Remove OwnPtr support for Evas_Object* and add support for it
+ with RefPtr instead (the latter moved from WebCore).
+
+ * wtf/PlatformEfl.cmake:
+ * wtf/efl/OwnPtrEfl.cpp:
+ * wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
+ (WTF):
+ (WTF::refIfNotNull):
+ (WTF::derefIfNotNull):
+ * wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
+ (WTF):
+
2012-09-13 Michael Saboff <msab...@apple.com>
Added 8 bit path to WidthIterator::advance()
Modified: trunk/Source/WTF/wtf/PlatformEfl.cmake (128506 => 128507)
--- trunk/Source/WTF/wtf/PlatformEfl.cmake 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WTF/wtf/PlatformEfl.cmake 2012-09-13 21:19:41 UTC (rev 128507)
@@ -1,6 +1,7 @@
LIST(APPEND WTF_SOURCES
efl/MainThreadEfl.cpp
efl/OwnPtrEfl.cpp
+ efl/RefPtrEfl.cpp
gobject/GOwnPtr.cpp
gobject/GRefPtr.cpp
@@ -33,5 +34,6 @@
${GLIB_INCLUDE_DIRS}
${ICU_INCLUDE_DIRS}
${_javascript_CORE_DIR}/wtf/gobject
- ${_javascript_CORE_DIR}/wtf/unicode/
+ ${_javascript_CORE_DIR}/wtf/unicode
+ ${_javascript_CORE_DIR}/wtf/efl
)
Modified: trunk/Source/WTF/wtf/efl/OwnPtrEfl.cpp (128506 => 128507)
--- trunk/Source/WTF/wtf/efl/OwnPtrEfl.cpp 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WTF/wtf/efl/OwnPtrEfl.cpp 2012-09-13 21:19:41 UTC (rev 128507)
@@ -40,11 +40,6 @@
ecore_evas_free(ptr);
}
-void deleteOwnedPtr(Evas_Object* ptr)
-{
- evas_object_del(ptr);
-}
-
void deleteOwnedPtr(Ecore_Pipe* ptr)
{
if (ptr)
Copied: trunk/Source/WTF/wtf/efl/RefPtrEfl.cpp (from rev 128506, trunk/Source/WebCore/platform/efl/RefPtrEfl.cpp) (0 => 128507)
--- trunk/Source/WTF/wtf/efl/RefPtrEfl.cpp (rev 0)
+++ trunk/Source/WTF/wtf/efl/RefPtrEfl.cpp 2012-09-13 21:19:41 UTC (rev 128507)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "RefPtrEfl.h"
+
+#include <Evas.h>
+
+namespace WTF {
+
+template<> void refIfNotNull(Evas_Object* ptr)
+{
+ if (LIKELY(!!ptr))
+ evas_object_ref(ptr);
+}
+
+template<> void derefIfNotNull(Evas_Object* ptr)
+{
+ if (LIKELY(!!ptr)) {
+ evas_object_unref(ptr);
+ evas_object_del(ptr);
+ }
+}
+
+}
Copied: trunk/Source/WTF/wtf/efl/RefPtrEfl.h (from rev 128506, trunk/Source/WebCore/platform/efl/RefPtrEfl.h) (0 => 128507)
--- trunk/Source/WTF/wtf/efl/RefPtrEfl.h (rev 0)
+++ trunk/Source/WTF/wtf/efl/RefPtrEfl.h 2012-09-13 21:19:41 UTC (rev 128507)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RefPtrEfl_h
+#define RefPtrEfl_h
+
+#include <wtf/RefPtr.h>
+
+typedef struct _Evas_Object Evas_Object;
+
+namespace WTF {
+
+template<> void refIfNotNull(Evas_Object* ptr);
+template<> void derefIfNotNull(Evas_Object* ptr);
+
+}
+
+#endif // RefPtrEfl_h
Modified: trunk/Source/WebCore/ChangeLog (128506 => 128507)
--- trunk/Source/WebCore/ChangeLog 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebCore/ChangeLog 2012-09-13 21:19:41 UTC (rev 128507)
@@ -1,3 +1,21 @@
+2012-09-13 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ Evas_Object* is a ref'ed structure, so tread it as such
+ https://bugs.webkit.org/show_bug.cgi?id=96659
+
+ Reviewed by Adam Barth.
+
+ Replace OwnPtr<Evas_Object> with RefPtr.
+
+ * PlatformEfl.cmake:
+ * platform/efl/RenderThemeEfl.cpp:
+ (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
+ (WebCore::RenderThemeEfl::loadTheme):
+ (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
+ * platform/efl/RenderThemeEfl.h:
+ (RenderThemeEfl):
+ (ThemePartCacheEntry):
+
2012-09-13 Michael Saboff <msab...@apple.com>
Added 8 bit path to WidthIterator::advance()
Modified: trunk/Source/WebCore/PlatformEfl.cmake (128506 => 128507)
--- trunk/Source/WebCore/PlatformEfl.cmake 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebCore/PlatformEfl.cmake 2012-09-13 21:19:41 UTC (rev 128507)
@@ -39,7 +39,6 @@
platform/efl/PlatformMouseEventEfl.cpp
platform/efl/PlatformScreenEfl.cpp
platform/efl/PlatformWheelEventEfl.cpp
- platform/efl/RefPtrEfl.cpp
platform/efl/RenderThemeEfl.cpp
platform/efl/RunLoopEfl.cpp
platform/efl/ScrollViewEfl.cpp
Deleted: trunk/Source/WebCore/platform/efl/RefPtrEfl.cpp (128506 => 128507)
--- trunk/Source/WebCore/platform/efl/RefPtrEfl.cpp 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebCore/platform/efl/RefPtrEfl.cpp 2012-09-13 21:19:41 UTC (rev 128507)
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2011 Samsung Electronics
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "RefPtrEfl.h"
-
-#include <Evas.h>
-
-namespace WTF {
-
-template<> void refIfNotNull(Evas_Object* ptr)
-{
- if (LIKELY(!!ptr))
- evas_object_ref(ptr);
-}
-
-template<> void derefIfNotNull(Evas_Object* ptr)
-{
- if (LIKELY(!!ptr)) {
- evas_object_unref(ptr);
- evas_object_del(ptr);
- }
-}
-
-}
Deleted: trunk/Source/WebCore/platform/efl/RefPtrEfl.h (128506 => 128507)
--- trunk/Source/WebCore/platform/efl/RefPtrEfl.h 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebCore/platform/efl/RefPtrEfl.h 2012-09-13 21:19:41 UTC (rev 128507)
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2011 Samsung Electronics
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef RefPtrEfl_h
-#define RefPtrEfl_h
-
-#include <wtf/RefPtr.h>
-
-typedef struct _Evas_Object Evas_Object;
-
-namespace WTF {
-
-template<> void refIfNotNull(Evas_Object* ptr);
-template<> void derefIfNotNull(Evas_Object* ptr);
-
-}
-
-#endif // RefPtrEfl_h
Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (128506 => 128507)
--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2012-09-13 21:19:41 UTC (rev 128507)
@@ -214,7 +214,7 @@
// By default EFL creates buffers without alpha.
ecore_evas_alpha_set(entry->canvas(), EINA_TRUE);
- entry->m_edje = adoptPtr(edje_object_add(ecore_evas_get(entry->canvas())));
+ entry->m_edje = adoptRef(edje_object_add(ecore_evas_get(entry->canvas())));
ASSERT(entry->edje());
if (!setSourceGroupForEdjeObject(entry->edje(), themePath, toEdjeGroup(type)))
@@ -509,7 +509,7 @@
"Could not create canvas required by theme, things will not work properly.");
}
- OwnPtr<Evas_Object> o = adoptPtr(edje_object_add(ecore_evas_get(canvas())));
+ RefPtr<Evas_Object> o = adoptRef(edje_object_add(ecore_evas_get(canvas())));
_ASSERT_ON_RELEASE_RETURN_VAL(o, false, "Could not create new base Edje object.");
if (!setSourceGroupForEdjeObject(o.get(), m_themePath, "webkit/base"))
@@ -520,7 +520,7 @@
flushThemePartCache();
// Set new loaded theme, and apply it.
- m_edje.swap(o);
+ m_edje = o;
edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/active", applyColorCallback, this);
edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/inactive", applyColorCallback, this);
@@ -601,7 +601,7 @@
void RenderThemeEfl::applyPartDescriptionsFrom(const String& themePath)
{
- OwnPtr<Evas_Object> temp = adoptPtr(edje_object_add(ecore_evas_get(canvas())));
+ RefPtr<Evas_Object> temp = adoptRef(edje_object_add(ecore_evas_get(canvas())));
_ASSERT_ON_RELEASE_RETURN(temp, "Could not create Edje object.");
for (size_t i = 0; i < FormTypeLast; i++) {
Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.h (128506 => 128507)
--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.h 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.h 2012-09-13 21:19:41 UTC (rev 128507)
@@ -36,6 +36,7 @@
#include "RenderTheme.h"
#include <cairo.h>
+#include <wtf/efl/RefPtrEfl.h>
typedef struct _Ecore_Evas Ecore_Evas;
typedef struct _Evas_Object Evas_Object;
@@ -250,7 +251,7 @@
String m_themePath;
// Order so that the canvas gets destroyed at last.
OwnPtr<Ecore_Evas> m_canvas;
- OwnPtr<Evas_Object> m_edje;
+ RefPtr<Evas_Object> m_edje;
struct ThemePartDesc {
FormType type;
@@ -275,7 +276,7 @@
private:
// Order so that the canvas gets destroyed at last.
OwnPtr<Ecore_Evas> m_canvas;
- OwnPtr<Evas_Object> m_edje;
+ RefPtr<Evas_Object> m_edje;
RefPtr<cairo_surface_t> m_surface;
};
Modified: trunk/Source/WebKit/efl/ChangeLog (128506 => 128507)
--- trunk/Source/WebKit/efl/ChangeLog 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-09-13 21:19:41 UTC (rev 128507)
@@ -1,3 +1,17 @@
+2012-09-13 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ Evas_Object* is a ref'ed structure, so tread it as such
+ https://bugs.webkit.org/show_bug.cgi?id=96659
+
+ Reviewed by Adam Barth.
+
+ Replace OwnPtr<Evas_Object> with RefPtr.
+
+ * tests/UnitTestUtils/EWKTestView.cpp:
+ (EWKUnitTests::EWKTestView::init):
+ * tests/UnitTestUtils/EWKTestView.h:
+ (EWKTestView):
+
2012-09-13 Christophe Dumez <christophe.du...@intel.com>
[EFL] Remove a lot of C'ism from Ewk_Tiled_Backing_Store
Modified: trunk/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp (128506 => 128507)
--- trunk/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp 2012-09-13 21:19:41 UTC (rev 128507)
@@ -23,6 +23,7 @@
#include <EWebKit.h>
#include <wtf/PassOwnPtr.h>
+#include <wtf/RefPtr.h>
namespace EWKUnitTests {
@@ -98,11 +99,11 @@
switch (m_defaultViewType) {
case SingleView:
- m_webView = adoptPtr(ewk_view_single_add(m_evas));
+ m_webView = adoptRef(ewk_view_single_add(m_evas));
break;
case TiledView:
- m_webView = adoptPtr(ewk_view_tiled_add(m_evas));
+ m_webView = adoptRef(ewk_view_tiled_add(m_evas));
break;
}
Modified: trunk/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h (128506 => 128507)
--- trunk/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h 2012-09-13 21:19:41 UTC (rev 128507)
@@ -23,6 +23,7 @@
#include <Evas.h>
#include <string>
#include <wtf/OwnPtr.h>
+#include <wtf/efl/RefPtrEfl.h>
namespace EWKUnitTests {
@@ -63,7 +64,7 @@
EWKTestView operator=(const EWKTestView&);
Evas* m_evas;
- OwnPtr<Evas_Object> m_webView;
+ RefPtr<Evas_Object> m_webView;
int m_width, m_height;
EwkViewType m_defaultViewType;
Modified: trunk/Tools/ChangeLog (128506 => 128507)
--- trunk/Tools/ChangeLog 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Tools/ChangeLog 2012-09-13 21:19:41 UTC (rev 128507)
@@ -1,3 +1,18 @@
+2012-09-13 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ Evas_Object* is a ref'ed structure, so tread it as such
+ https://bugs.webkit.org/show_bug.cgi?id=96659
+
+ Reviewed by Adam Barth.
+
+ Replace OwnPtr<Evas_Object> with RefPtr.
+
+ * DumpRenderTree/efl/ImageDiff.cpp:
+ (calculateDifference):
+ (printImageDifferences):
+ (readImageFromStdin):
+ (main):
+
2012-09-13 Csaba Osztrogonác <o...@webkit.org>
One more unreviewed trivial fix after r128399.
Modified: trunk/Tools/DumpRenderTree/efl/ImageDiff.cpp (128506 => 128507)
--- trunk/Tools/DumpRenderTree/efl/ImageDiff.cpp 2012-09-13 21:07:46 UTC (rev 128506)
+++ trunk/Tools/DumpRenderTree/efl/ImageDiff.cpp 2012-09-13 21:19:41 UTC (rev 128507)
@@ -45,6 +45,8 @@
#include <wtf/OwnArrayPtr.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/efl/RefPtrEfl.h>
enum PixelComponent {
Red,
@@ -106,7 +108,7 @@
return sqrtf(red * red + green * green + blue * blue + alpha * alpha) / 2.0f;
}
-static float calculateDifference(Evas_Object* baselineImage, Evas_Object* actualImage, OwnPtr<Evas_Object>& differenceImage)
+static float calculateDifference(Evas_Object* baselineImage, Evas_Object* actualImage, RefPtr<Evas_Object>& differenceImage)
{
int width, height, baselineWidth, baselineHeight;
evas_object_image_size_get(actualImage, &width, &height);
@@ -163,7 +165,7 @@
difference = roundf(difference * 100.0f) / 100.0f;
difference = std::max(difference, 0.01f); // round to 2 decimal places
- differenceImage = adoptPtr(differenceImageFromDifferenceBuffer(evas_object_evas_get(baselineImage), diffBuffer.get(), width, height));
+ differenceImage = adoptRef(differenceImageFromDifferenceBuffer(evas_object_evas_get(baselineImage), diffBuffer.get(), width, height));
}
return difference;
@@ -226,7 +228,7 @@
static void printImageDifferences(Evas_Object* baselineImage, Evas_Object* actualImage)
{
- OwnPtr<Evas_Object> differenceImage;
+ RefPtr<Evas_Object> differenceImage;
const float difference = calculateDifference(baselineImage, actualImage, differenceImage);
if (difference > 0.0f) {
@@ -254,7 +256,7 @@
ecore_evas_resize(gEcoreEvas.get(), currentWidth, currentHeight);
}
-static PassOwnPtr<Evas_Object> readImageFromStdin(Evas* evas, long imageSize)
+static PassRefPtr<Evas_Object> readImageFromStdin(Evas* evas, long imageSize)
{
OwnArrayPtr<unsigned char> imageBuffer = adoptArrayPtr(new unsigned char[imageSize]);
if (!imageBuffer)
@@ -262,7 +264,7 @@
const size_t bytesRead = fread(imageBuffer.get(), 1, imageSize, stdin);
if (!bytesRead)
- return PassOwnPtr<Evas_Object>();
+ return PassRefPtr<Evas_Object>();
Evas_Object* image = evas_object_image_filled_add(evas);
evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888);
@@ -270,7 +272,7 @@
resizeEcoreEvasIfNeeded(image);
- return adoptPtr(image);
+ return adoptRef(image);
}
static bool parseCommandLineOptions(int argc, char** argv)
@@ -331,8 +333,8 @@
Evas* evas = initEfl();
- OwnPtr<Evas_Object> actualImage;
- OwnPtr<Evas_Object> baselineImage;
+ RefPtr<Evas_Object> actualImage;
+ RefPtr<Evas_Object> baselineImage;
char buffer[2048];
while (fgets(buffer, sizeof(buffer), stdin)) {