Unreviewed, rolling out r128507.
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 07:12:24 +0000 (07:12 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 07:12:24 +0000 (07:12 +0000)
http://trac.webkit.org/changeset/128507
https://bugs.webkit.org/show_bug.cgi?id=96659

Source/WebCore:

Revert. r128507 makes too many crashes in EFL layout test bots.

* PlatformEfl.cmake:
* platform/efl/RefPtrEfl.cpp: Renamed from Source/WTF/wtf/efl/RefPtrEfl.cpp.
(WTF):
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* platform/efl/RefPtrEfl.h: Renamed from Source/WTF/wtf/efl/RefPtrEfl.h.
(WTF):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):
(ThemePartCacheEntry):

Source/WebKit/efl:

Revert. r128507 makes too many crashes in EFL layout test bots.

* tests/UnitTestUtils/EWKTestView.cpp:
(EWKUnitTests::EWKTestView::init):
* tests/UnitTestUtils/EWKTestView.h:
(EWKTestView):

Source/WTF:

Revert. r128507 makes too many crash in EFL layout test bots.

* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
(WTF::deleteOwnedPtr):
(WTF):

Tools:

Revert. r128507 makes too many crashes in EFL layout test bots.

* DumpRenderTree/efl/ImageDiff.cpp:
(calculateDifference):
(printImageDifferences):
(readImageFromStdin):
(main):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/PlatformEfl.cmake
Source/WTF/wtf/efl/OwnPtrEfl.cpp
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/platform/efl/RefPtrEfl.cpp [moved from Source/WTF/wtf/efl/RefPtrEfl.cpp with 100% similarity]
Source/WebCore/platform/efl/RefPtrEfl.h [moved from Source/WTF/wtf/efl/RefPtrEfl.h with 100% similarity]
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/efl/RenderThemeEfl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.cpp
Source/WebKit/efl/tests/UnitTestUtils/EWKTestView.h
Tools/ChangeLog
Tools/DumpRenderTree/efl/ImageDiff.cpp

index 8b87295..784e99e 100644 (file)
@@ -1,3 +1,16 @@
+2012-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Unreviewed, rolling out r128507.
+        http://trac.webkit.org/changeset/128507
+        https://bugs.webkit.org/show_bug.cgi?id=96659
+
+        Revert. r128507 makes too many crash in EFL layout test bots.
+
+        * wtf/PlatformEfl.cmake:
+        * wtf/efl/OwnPtrEfl.cpp:
+        (WTF::deleteOwnedPtr):
+        (WTF):
+
 2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
 
         Make compile with both OS(WINCE) and PLATFORM(QT) support
index 2d663fa..05ad847 100644 (file)
@@ -1,7 +1,6 @@
 LIST(APPEND WTF_SOURCES
     efl/MainThreadEfl.cpp
     efl/OwnPtrEfl.cpp
-    efl/RefPtrEfl.cpp
     gobject/GOwnPtr.cpp
     gobject/GRefPtr.cpp
 
@@ -34,6 +33,5 @@ LIST(APPEND WTF_INCLUDE_DIRECTORIES
     ${GLIB_INCLUDE_DIRS}
     ${ICU_INCLUDE_DIRS}
     ${JAVASCRIPTCORE_DIR}/wtf/gobject
-    ${JAVASCRIPTCORE_DIR}/wtf/unicode
-    ${JAVASCRIPTCORE_DIR}/wtf/efl
+    ${JAVASCRIPTCORE_DIR}/wtf/unicode/
 )
index c6ca5e2..6501a96 100644 (file)
@@ -40,6 +40,11 @@ void deleteOwnedPtr(Ecore_Evas* ptr)
         ecore_evas_free(ptr);
 }
 
+void deleteOwnedPtr(Evas_Object* ptr)
+{
+    evas_object_del(ptr);
+}
+
 void deleteOwnedPtr(Ecore_Pipe* ptr)
 {
     if (ptr)
index 1b955aa..b663ffd 100644 (file)
@@ -1,3 +1,26 @@
+2012-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Unreviewed, rolling out r128507.
+        http://trac.webkit.org/changeset/128507
+        https://bugs.webkit.org/show_bug.cgi?id=96659
+
+        Revert. r128507 makes too many crashes in EFL layout test bots.
+
+        * PlatformEfl.cmake:
+        * platform/efl/RefPtrEfl.cpp: Renamed from Source/WTF/wtf/efl/RefPtrEfl.cpp.
+        (WTF):
+        (WTF::refIfNotNull):
+        (WTF::derefIfNotNull):
+        * platform/efl/RefPtrEfl.h: Renamed from Source/WTF/wtf/efl/RefPtrEfl.h.
+        (WTF):
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
+        (WebCore::RenderThemeEfl::loadTheme):
+        (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
+        * platform/efl/RenderThemeEfl.h:
+        (RenderThemeEfl):
+        (ThemePartCacheEntry):
+
 2012-09-13  Patrick Gansterer  <paroga@webkit.org>
 
         Reuse floating point formatting of TextStream in [SVG]RenderTreeAsText.cpp
index 70d68d7..793c821 100644 (file)
@@ -39,6 +39,7 @@ LIST(APPEND WebCore_SOURCES
   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
index b4e403a..6483ee7 100644 (file)
@@ -214,7 +214,7 @@ RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::ThemePartCacheEntry::create
     // By default EFL creates buffers without alpha.
     ecore_evas_alpha_set(entry->canvas(), EINA_TRUE);
 
-    entry->m_edje = adoptRef(edje_object_add(ecore_evas_get(entry->canvas())));
+    entry->m_edje = adoptPtr(edje_object_add(ecore_evas_get(entry->canvas())));
     ASSERT(entry->edje());
 
     if (!setSourceGroupForEdjeObject(entry->edje(), themePath, toEdjeGroup(type)))
@@ -509,7 +509,7 @@ bool RenderThemeEfl::loadTheme()
                 "Could not create canvas required by theme, things will not work properly.");
     }
 
-    RefPtr<Evas_Object> o = adoptRef(edje_object_add(ecore_evas_get(canvas())));
+    OwnPtr<Evas_Object> o = adoptPtr(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 @@ bool RenderThemeEfl::loadTheme()
         flushThemePartCache();
 
     // Set new loaded theme, and apply it.
-    m_edje = o;
+    m_edje.swap(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::applyPartDescription(Evas_Object* object, ThemePartDesc* de
 
 void RenderThemeEfl::applyPartDescriptionsFrom(const String& themePath)
 {
-    RefPtr<Evas_Object> temp = adoptRef(edje_object_add(ecore_evas_get(canvas())));
+    OwnPtr<Evas_Object> temp = adoptPtr(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++) {
index 4ab5890..d1b81e0 100644 (file)
@@ -36,7 +36,6 @@
 #include "RenderTheme.h"
 
 #include <cairo.h>
-#include <wtf/efl/RefPtrEfl.h>
 
 typedef struct _Ecore_Evas Ecore_Evas;
 typedef struct _Evas_Object Evas_Object;
@@ -251,7 +250,7 @@ private:
     String m_themePath;
     // Order so that the canvas gets destroyed at last.
     OwnPtr<Ecore_Evas> m_canvas;
-    RefPtr<Evas_Object> m_edje;
+    OwnPtr<Evas_Object> m_edje;
 
     struct ThemePartDesc {
         FormType type;
@@ -276,7 +275,7 @@ private:
     private:
         // Order so that the canvas gets destroyed at last.
         OwnPtr<Ecore_Evas> m_canvas;
-        RefPtr<Evas_Object> m_edje;
+        OwnPtr<Evas_Object> m_edje;
         RefPtr<cairo_surface_t> m_surface;
     };
 
index be0d8d4..eba4650 100644 (file)
@@ -1,3 +1,16 @@
+2012-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Unreviewed, rolling out r128507.
+        http://trac.webkit.org/changeset/128507
+        https://bugs.webkit.org/show_bug.cgi?id=96659
+
+        Revert. r128507 makes too many crashes in EFL layout test bots.
+
+        * tests/UnitTestUtils/EWKTestView.cpp:
+        (EWKUnitTests::EWKTestView::init):
+        * tests/UnitTestUtils/EWKTestView.h:
+        (EWKTestView):
+
 2012-09-13  Christophe Dumez  <christophe.dumez@intel.com>
 
         [EFL] Remove a lot of C'ism from Ewk_Tiled_Matrix
index dbb0092..fd29b81 100644 (file)
@@ -23,7 +23,6 @@
 #include <EWebKit.h>
 
 #include <wtf/PassOwnPtr.h>
-#include <wtf/RefPtr.h>
 
 namespace EWKUnitTests {
 
@@ -99,11 +98,11 @@ bool EWKTestView::init()
 
     switch (m_defaultViewType) {
     case SingleView:
-        m_webView = adoptRef(ewk_view_single_add(m_evas));
+        m_webView = adoptPtr(ewk_view_single_add(m_evas));
         break;
 
     case TiledView:
-        m_webView = adoptRef(ewk_view_tiled_add(m_evas));
+        m_webView = adoptPtr(ewk_view_tiled_add(m_evas));
         break;
     }
 
index 1bdd9ed..6d15d0d 100644 (file)
@@ -23,7 +23,6 @@
 #include <Evas.h>
 #include <string>
 #include <wtf/OwnPtr.h>
-#include <wtf/efl/RefPtrEfl.h>
 
 namespace EWKUnitTests {
 
@@ -64,7 +63,7 @@ private:
     EWKTestView operator=(const EWKTestView&);
 
     Evas* m_evas;
-    RefPtr<Evas_Object> m_webView;
+    OwnPtr<Evas_Object> m_webView;
 
     int m_width, m_height;
     EwkViewType m_defaultViewType;
index fbd86e5..0490969 100644 (file)
@@ -1,3 +1,17 @@
+2012-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Unreviewed, rolling out r128507.
+        http://trac.webkit.org/changeset/128507
+        https://bugs.webkit.org/show_bug.cgi?id=96659
+
+        Revert. r128507 makes too many crashes in EFL layout test bots.
+
+        * DumpRenderTree/efl/ImageDiff.cpp:
+        (calculateDifference):
+        (printImageDifferences):
+        (readImageFromStdin):
+        (main):
+
 2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
 
         Make compile with both OS(WINCE) and PLATFORM(QT) support
index 129b6ca..88a0e4a 100644 (file)
@@ -45,8 +45,6 @@
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/efl/RefPtrEfl.h>
 
 enum PixelComponent {
     Red,
@@ -108,7 +106,7 @@ static float calculatePixelDifference(unsigned char* basePixel, unsigned char* a
     return sqrtf(red * red + green * green + blue * blue + alpha * alpha) / 2.0f;
 }
 
-static float calculateDifference(Evas_Object* baselineImage, Evas_Object* actualImage, RefPtr<Evas_Object>& differenceImage)
+static float calculateDifference(Evas_Object* baselineImage, Evas_Object* actualImage, OwnPtr<Evas_Object>& differenceImage)
 {
     int width, height, baselineWidth, baselineHeight;
     evas_object_image_size_get(actualImage, &width, &height);
@@ -165,7 +163,7 @@ static float calculateDifference(Evas_Object* baselineImage, Evas_Object* actual
         difference = roundf(difference * 100.0f) / 100.0f;
         difference = std::max(difference, 0.01f); // round to 2 decimal places
 
-        differenceImage = adoptRef(differenceImageFromDifferenceBuffer(evas_object_evas_get(baselineImage), diffBuffer.get(), width, height));
+        differenceImage = adoptPtr(differenceImageFromDifferenceBuffer(evas_object_evas_get(baselineImage), diffBuffer.get(), width, height));
     }
 
     return difference;
@@ -228,7 +226,7 @@ static void printImage(Evas_Object* image)
 
 static void printImageDifferences(Evas_Object* baselineImage, Evas_Object* actualImage)
 {
-    RefPtr<Evas_Object> differenceImage;
+    OwnPtr<Evas_Object> differenceImage;
     const float difference = calculateDifference(baselineImage, actualImage, differenceImage);
 
     if (difference > 0.0f) {
@@ -256,7 +254,7 @@ static void resizeEcoreEvasIfNeeded(Evas_Object* image)
     ecore_evas_resize(gEcoreEvas.get(), currentWidth, currentHeight);
 }
 
-static PassRefPtr<Evas_Object> readImageFromStdin(Evas* evas, long imageSize)
+static PassOwnPtr<Evas_Object> readImageFromStdin(Evas* evas, long imageSize)
 {
     OwnArrayPtr<unsigned char> imageBuffer = adoptArrayPtr(new unsigned char[imageSize]);
     if (!imageBuffer)
@@ -264,7 +262,7 @@ static PassRefPtr<Evas_Object> readImageFromStdin(Evas* evas, long imageSize)
 
     const size_t bytesRead = fread(imageBuffer.get(), 1, imageSize, stdin);
     if (!bytesRead)
-        return PassRefPtr<Evas_Object>();
+        return PassOwnPtr<Evas_Object>();
 
     Evas_Object* image = evas_object_image_filled_add(evas);
     evas_object_image_colorspace_set(image, EVAS_COLORSPACE_ARGB8888);
@@ -272,7 +270,7 @@ static PassRefPtr<Evas_Object> readImageFromStdin(Evas* evas, long imageSize)
 
     resizeEcoreEvasIfNeeded(image);
 
-    return adoptRef(image);
+    return adoptPtr(image);
 }
 
 static bool parseCommandLineOptions(int argc, char** argv)
@@ -333,8 +331,8 @@ int main(int argc, char* argv[])
 
     Evas* evas = initEfl();
 
-    RefPtr<Evas_Object> actualImage;
-    RefPtr<Evas_Object> baselineImage;
+    OwnPtr<Evas_Object> actualImage;
+    OwnPtr<Evas_Object> baselineImage;
 
     char buffer[2048];
     while (fgets(buffer, sizeof(buffer), stdin)) {