Bug 136324

Summary: [EFL] Drop evas object cursor support
Product: WebKit Reporter: Ryuan Choi <ryuan.choi>
Component: WebKit EFLAssignee: Ryuan Choi <ryuan.choi>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, gyuyoung.kim, lucas.de.marchi, rakuco, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 136617    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Ryuan Choi 2014-08-27 17:17:26 PDT
Although ewebkit is available on X,
ewebkit supports two types of cursor, ecore_x cursor and evas_object cursor(theme cursor).

However, evas object cursor has some issues.
1. It is just on the webview application so it can not be drawn when other application covered webview application.
2. When mouse is moved in and out of webview, cursor may be drawn twice sometimes.(x cursor and evas object cursor)

So, I suggest to drop evas object cursor from now.
If we can start to support other backend like wayland, we can also use ecore-wayland APIs for the cursor at that time.
Comment 1 Ryuan Choi 2014-08-27 17:24:00 PDT
Created attachment 237273 [details]
Patch
Comment 2 Gyuyoung Kim 2014-08-31 23:30:56 PDT
Comment on attachment 237273 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=237273&action=review

> Source/WebCore/platform/efl/EflScreenUtilities.cpp:111
> +void applyCursorFromString(Ecore_X_Window window, const char* cursorString)

This function is to get cursor from ecore_x, isn't it ? If so, how about using applyCursorFromEcoreX() ?

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:437
>      if (cursor.image()) {

Current cursor.image() is called twice within this block. To reduce function call overhead, how about using below routine ?

if (Image* cursorImage = cursor.image()) {
    // Custom cursor.
    if (cursorImage == m_cursorIdentifier.image)
        return;

    IntPoint hotSpot;
    cursorImage->getHotSpot(hotSpot);

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:456
>          m_useCustomCursor = true;

Should we continue to keep this flag ? It looks we don't need to use this flag anymore if this patch is landed.

> Source/WebKit2/UIProcess/API/efl/EwkView.h:276
> +    WKEinaSharedString m_applicationNameForUserAgent;

Any reason you move these variable to upper place ?
Comment 3 Ryuan Choi 2014-09-01 08:31:59 PDT
Created attachment 237450 [details]
Patch
Comment 4 Gyuyoung Kim 2014-09-01 21:59:00 PDT
Comment on attachment 237450 [details]
Patch

r=me.
Comment 5 Ryuan Choi 2014-09-06 04:18:08 PDT
Comment on attachment 237450 [details]
Patch

Clearing flags on attachment: 237450

Committed r173354: <http://trac.webkit.org/changeset/173354>
Comment 6 Ryuan Choi 2014-09-06 04:18:19 PDT
All reviewed patches have been landed.  Closing bug.