Modified: trunk/Source/WebKit2/ChangeLog (132482 => 132483)
--- trunk/Source/WebKit2/ChangeLog 2012-10-25 14:45:32 UTC (rev 132482)
+++ trunk/Source/WebKit2/ChangeLog 2012-10-25 14:48:41 UTC (rev 132483)
@@ -1,3 +1,21 @@
+2012-10-25 Yael Aharon <[email protected]>
+
+ [EFL][WK2][AC] Regression(132392) infinite loop when displaying certain animations.
+ https://bugs.webkit.org/show_bug.cgi?id=100288
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ When PageClientImpl::setViewNeedsDisplay is called, start a 0 length timer.
+ That breaks the synchronous loop we were experiencing when ewk_view_display
+ was called directly.
+
+ * UIProcess/API/efl/EwkViewImpl.cpp:
+ (EwkViewImpl::EwkViewImpl):
+ (EwkViewImpl::displayTimerFired):
+ (EwkViewImpl::redrawRegion):
+ * UIProcess/API/efl/EwkViewImpl.h:
+ (EwkViewImpl):
+
2012-10-25 Mikhail Pozdnyakov <[email protected]>
Add setMediaTypeOverride to window.internals.settings
Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp (132482 => 132483)
--- trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp 2012-10-25 14:45:32 UTC (rev 132482)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp 2012-10-25 14:48:41 UTC (rev 132483)
@@ -155,6 +155,7 @@
, evasGlSurface(0)
#endif
, m_view(view)
+ , m_displayTimer(this, &EwkViewImpl::displayTimerFired)
{
ASSERT(view);
Ewk_View_Smart_Data* sd = smartData();
@@ -246,7 +247,7 @@
ecore_evas_object_cursor_set(ecoreEvas, cursorObject.get(), EVAS_LAYER_MAX, hotspotX, hotspotY);
}
-void EwkViewImpl::redrawRegion(const IntRect& rect)
+void EwkViewImpl::displayTimerFired(WebCore::Timer<EwkViewImpl>*)
{
Ewk_View_Smart_Data* sd = smartData();
@@ -255,14 +256,35 @@
#if USE(COORDINATED_GRAPHICS)
EWK_VIEW_IMPL_GET_OR_RETURN(sd, viewImpl);
+#endif
- evas_gl_make_current(viewImpl->evasGl, viewImpl->evasGlSurface, viewImpl->evasGlContext);
- viewImpl->pageViewportControllerClient->display(rect, IntPoint(sd->view.x, sd->view.y));
+ Region dirtyRegion;
+ for (Vector<IntRect>::iterator it = m_dirtyRects.begin(); it != m_dirtyRects.end(); ++it)
+ dirtyRegion.unite(*it);
+
+ m_dirtyRects.clear();
+
+ Vector<IntRect> rects = dirtyRegion.rects();
+ Vector<IntRect>::iterator end = rects.end();
+
+ for (Vector<IntRect>::iterator it = rects.begin(); it != end; ++it) {
+ IntRect rect = *it;
+#if USE(COORDINATED_GRAPHICS)
+ evas_gl_make_current(viewImpl->evasGl, viewImpl->evasGlSurface, viewImpl->evasGlContext);
+ viewImpl->pageViewportControllerClient->display(rect, IntPoint(sd->view.x, sd->view.y));
#endif
- evas_object_image_data_update_add(sd->image, rect.x(), rect.y(), rect.width(), rect.height());
+ evas_object_image_data_update_add(sd->image, rect.x(), rect.y(), rect.width(), rect.height());
+ }
}
+void EwkViewImpl::redrawRegion(const IntRect& rect)
+{
+ if (!m_displayTimer.isActive())
+ m_displayTimer.startOneShot(0);
+ m_dirtyRects.append(rect);
+}
+
/**
* @internal
* A download for that view was cancelled.
Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h (132482 => 132483)
--- trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h 2012-10-25 14:45:32 UTC (rev 132482)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h 2012-10-25 14:48:41 UTC (rev 132483)
@@ -28,6 +28,7 @@
#include <Ecore_IMF_Evas.h>
#include <Evas.h>
#include <WebCore/TextDirection.h>
+#include <WebCore/Timer.h>
#include <WebKit2/WKBase.h>
#include <wtf/HashMap.h>
#include <wtf/OwnPtr.h>
@@ -228,10 +229,13 @@
private:
Ewk_View_Smart_Data* smartData();
+ void displayTimerFired(WebCore::Timer<EwkViewImpl>*);
Evas_Object* m_view;
typedef HashMap<WKPageRef, const Evas_Object*> PageViewMap;
static PageViewMap pageViewMap;
+ WebCore::Timer<EwkViewImpl> m_displayTimer;
+ WTF::Vector <WebCore::IntRect> m_dirtyRects;
};
#endif // EwkViewImpl_h