Title: [87706] trunk/Source/WebKit/efl
Revision
87706
Author
commit-qu...@webkit.org
Date
2011-05-30 19:18:05 -0700 (Mon, 30 May 2011)

Log Message

2011-05-30  Raphael Kubo da Costa  <k...@profusion.mobi>

        Reviewed by Kent Tamura.

        [efl] Fix _ewk_frame_children_iterator_next().
        https://bugs.webkit.org/show_bug.cgi?id=61749

        The iterator was returning always the first child, making tests like
        fast/history/history-back-initial-vs-final-url.html to timeout and
        eventually run out of memory.

        * ewk/ewk_frame.cpp:
        (_ewk_frame_children_iterator_next):
        (ewk_frame_children_iterator_new):

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (87705 => 87706)


--- trunk/Source/WebKit/efl/ChangeLog	2011-05-31 02:04:53 UTC (rev 87705)
+++ trunk/Source/WebKit/efl/ChangeLog	2011-05-31 02:18:05 UTC (rev 87706)
@@ -1,3 +1,18 @@
+2011-05-30  Raphael Kubo da Costa  <k...@profusion.mobi>
+
+        Reviewed by Kent Tamura.
+
+        [efl] Fix _ewk_frame_children_iterator_next().
+        https://bugs.webkit.org/show_bug.cgi?id=61749
+
+        The iterator was returning always the first child, making tests like
+        fast/history/history-back-initial-vs-final-url.html to timeout and
+        eventually run out of memory.
+
+        * ewk/ewk_frame.cpp:
+        (_ewk_frame_children_iterator_next):
+        (ewk_frame_children_iterator_new):
+
 2011-05-28  Adam Barth  <aba...@webkit.org>
 
         Reviewed by Alexey Proskuryakov.

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (87705 => 87706)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2011-05-31 02:04:53 UTC (rev 87705)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2011-05-31 02:18:05 UTC (rev 87706)
@@ -80,7 +80,7 @@
 struct Eina_Iterator_Ewk_Frame {
     Eina_Iterator base;
     Evas_Object* obj;
-    WebCore::Frame* last;
+    unsigned currentIndex;
 };
 
 #ifndef EWK_TYPE_CHECK
@@ -161,17 +161,12 @@
     WebCore::FrameTree* tree = sd->frame->tree(); // check if it's still valid
     EINA_SAFETY_ON_NULL_RETURN_VAL(tree, EINA_FALSE);
 
-    WebCore::Frame* frame;
-    if (it->last)
-        frame = it->last->tree()->nextSibling();
-    else
-        frame = tree->firstChild();
+    if (it->currentIndex < tree->childCount()) {
+        *data = ""
+        return EINA_TRUE;
+    }
 
-    if (!frame)
-        return EINA_FALSE;
-
-    *data = ""
-    return EINA_TRUE;
+    return EINA_FALSE;
 }
 
 static Evas_Object* _ewk_frame_children_iterator_get_container(Eina_Iterator_Ewk_Frame* it)
@@ -386,6 +381,7 @@
     it->base.get_container = FUNC_ITERATOR_GET_CONTAINER(_ewk_frame_children_iterator_get_container);
     it->base.free = FUNC_ITERATOR_FREE(free);
     it->obj = o;
+    it->currentIndex = 0;
     return &it->base;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to