Title: [132803] trunk/Source/WebKit2
- Revision
- 132803
- Author
- [email protected]
- Date
- 2012-10-29 07:50:24 -0700 (Mon, 29 Oct 2012)
Log Message
[EFL][WK2] Fix cursor change detection in EwkViewImpl::setCursor()
https://bugs.webkit.org/show_bug.cgi?id=100662
Patch by Christophe Dumez <[email protected]> on 2012-10-29
Reviewed by Kenneth Rohde Christiansen.
Cursor change detection in EwkViewImpl::setCursor() relies on
addresses returned by Cursor::platformCursor(). However, the
value returned is currently assigned to a WKEinaSharedString
instead of a raw pointer. Therefore, the address is always
different and we keep recreating Evas Objects for the same
cursor.
* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::EwkViewImpl):
(EwkViewImpl::setCursor): Call smartData() after same cursor
detection since it is not needed if the cursor has not changed
and it may affect performance.
* UIProcess/API/efl/EwkViewImpl.h:
(EwkViewImpl):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (132802 => 132803)
--- trunk/Source/WebKit2/ChangeLog 2012-10-29 14:47:34 UTC (rev 132802)
+++ trunk/Source/WebKit2/ChangeLog 2012-10-29 14:50:24 UTC (rev 132803)
@@ -1,3 +1,25 @@
+2012-10-29 Christophe Dumez <[email protected]>
+
+ [EFL][WK2] Fix cursor change detection in EwkViewImpl::setCursor()
+ https://bugs.webkit.org/show_bug.cgi?id=100662
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Cursor change detection in EwkViewImpl::setCursor() relies on
+ addresses returned by Cursor::platformCursor(). However, the
+ value returned is currently assigned to a WKEinaSharedString
+ instead of a raw pointer. Therefore, the address is always
+ different and we keep recreating Evas Objects for the same
+ cursor.
+
+ * UIProcess/API/efl/EwkViewImpl.cpp:
+ (EwkViewImpl::EwkViewImpl):
+ (EwkViewImpl::setCursor): Call smartData() after same cursor
+ detection since it is not needed if the cursor has not changed
+ and it may affect performance.
+ * UIProcess/API/efl/EwkViewImpl.h:
+ (EwkViewImpl):
+
2012-10-29 Jocelyn Turcotte <[email protected]>
Coordinated Graphics: Make sure that we release images immediately when purging resources
Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp (132802 => 132803)
--- trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp 2012-10-29 14:47:34 UTC (rev 132802)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp 2012-10-29 14:50:24 UTC (rev 132803)
@@ -111,6 +111,7 @@
, m_evasGlSurface(0)
#endif
, m_settings(Ewk_Settings::create(this))
+ , m_cursorGroup(0)
, m_mouseEventsEnabled(false)
#if ENABLE(TOUCH_EVENTS)
, m_touchEventsEnabled(false)
@@ -187,13 +188,12 @@
void EwkViewImpl::setCursor(const Cursor& cursor)
{
- Ewk_View_Smart_Data* sd = smartData();
-
const char* group = cursor.platformCursor();
if (!group || group == m_cursorGroup)
return;
m_cursorGroup = group;
+ Ewk_View_Smart_Data* sd = smartData();
m_cursorObject = adoptRef(edje_object_add(sd->base.evas));
Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(sd->base.evas);
Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h (132802 => 132803)
--- trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h 2012-10-29 14:47:34 UTC (rev 132802)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h 2012-10-29 14:50:24 UTC (rev 132803)
@@ -260,7 +260,7 @@
#endif
OwnPtr<Ewk_Settings> m_settings;
RefPtr<Evas_Object> m_cursorObject;
- WKEinaSharedString m_cursorGroup;
+ const char* m_cursorGroup; // This is an address, do not free it or use WKEinaSharedString.
WKEinaSharedString m_faviconURL;
WKEinaSharedString m_url;
mutable WKEinaSharedString m_title;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes