Bug 109469 - [GTK] MOUSE_CURSOR_SCALE is not implemented
Summary: [GTK] MOUSE_CURSOR_SCALE is not implemented
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, LayoutTestFailure
Depends on:
Blocks:
 
Reported: 2013-02-11 12:13 PST by Zan Dobersek
Modified: 2019-07-18 01:28 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.49 KB, patch)
2017-07-31 06:39 PDT, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2 (6.38 MB, application/zip)
2017-07-31 08:06 PDT, Build Bot
no flags Details
Patch (1.49 KB, patch)
2017-07-31 08:07 PDT, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags Details | Formatted Diff | Diff
Patch (1.48 KB, patch)
2017-07-31 08:17 PDT, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags Details | Formatted Diff | Diff
Patch (4.70 KB, patch)
2017-08-04 01:02 PDT, Ms2ger (he/him; ⌚ UTC+1/+2)
no flags Details | Formatted Diff | Diff
Patch (3.08 KB, patch)
2019-07-17 08:52 PDT, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2013-02-11 12:13:06 PST
Despite the CSS image-set feature enabled, the following two tests still fail:
fast/css/cursor-parsing-image-set.html
fast/events/mouse-cursor-image-set.html

The first fails with a text diff failure, the other times out. In both cases the tests try to load mouse cursor images through -webkit-image-set(url(path/to/image)). That doesn't work, though - the image files are not loaded. It works on Chromium, signaling possible differences in JS bindings or even the KURL backend (or something else, I don't have much to grasp on).
Comment 1 Brent Fulgham 2015-01-22 09:00:20 PST
Is MOUSE_CURSOR_SCALE activated for your port? I think this test requires it.
Comment 2 Carlos Garcia Campos 2017-02-11 02:41:35 PST
The test no longer crashes nor times out, so I've added platform specific results, because it only the scale parts fail.
Comment 3 Ms2ger (he/him; ⌚ UTC+1/+2) 2017-07-31 06:39:20 PDT
Created attachment 316774 [details]
Patch
Comment 4 Build Bot 2017-07-31 08:06:31 PDT
Comment on attachment 316774 [details]
Patch

Attachment 316774 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4229263

New failing tests:
fast/images/low-memory-decode.html
Comment 5 Build Bot 2017-07-31 08:06:33 PDT
Created attachment 316782 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 6 Ms2ger (he/him; ⌚ UTC+1/+2) 2017-07-31 08:07:55 PDT
Created attachment 316783 [details]
Patch
Comment 7 Ms2ger (he/him; ⌚ UTC+1/+2) 2017-07-31 08:17:33 PDT
Created attachment 316784 [details]
Patch
Comment 8 Carlos Alberto Lopez Perez 2017-08-03 19:11:45 PDT
It seems MOUSE_CURSOR_SCALE is not enabled on the GTK+ port.

The test fast/css/cursor-parsing-image-set.html is passing fine (even without this enabled) and the test fast/events/mouse-cursor-image-set.html seems to be passing but is not really passing as it should do, as it has a gtk platform specific result that lacks the scale= values

I suggest doing the following:

 - Remove the gtk+ custom expectation for fast/events/mouse-cursor-image-set.html and mark it as failing and assign it to this bug. 
 - Remove fast/css/cursor-parsing-image-set.html from the list of tests expected to fail.

Another (maybe better) option is to try to enable MOUSE_CURSOR_SCALE and see if it fixes also the test fast/css/cursor-parsing-image-set.html.

But I guess a screen with HiDPI will be needed to test this properly (I don't have that)
Comment 9 Ms2ger (he/him; ⌚ UTC+1/+2) 2017-08-04 01:02:37 PDT
Created attachment 317223 [details]
Patch
Comment 10 Adrian Perez 2017-08-04 02:37:58 PDT
If there is some test that needs to run manually in a HiDPI screen,
my laptop has one, so just let me know and I'll give it a try.
Comment 11 Carlos Alberto Lopez Perez 2017-08-04 03:11:53 PDT
Comment on attachment 317223 [details]
Patch

Looks good. Let's land this and keep the bug open for checking the possibility of enabling MOUSE_CURSOR_SCALE.
Comment 12 Carlos Alberto Lopez Perez 2017-08-04 03:12:59 PDT
Comment on attachment 317223 [details]
Patch

Clearing flags on attachment: 317223

Committed r220266: <http://trac.webkit.org/changeset/220266>
Comment 13 Carlos Alberto Lopez Perez 2017-08-04 03:17:28 PDT
(In reply to Adrian Perez from comment #10)
> If there is some test that needs to run manually in a HiDPI screen,
> my laptop has one, so just let me know and I'll give it a try.

I think the tests should work regardless of having an HiDPI screen or not, as the test infrastructure mocks this things (AFAIK).

My suggestion was more to actually test this on real websites and see how the browser renders the cursor.

I don't know about an URL to test this, maybe opening the test itself on the MiniBrowser can be a good start.
Comment 14 Alicia Boya García 2019-07-03 07:23:22 PDT Comment hidden (obsolete)
Comment 15 Alicia Boya García 2019-07-03 07:29:55 PDT
Sorry, wrong traceback.

fast/events/mouse-cursor-image-set.html

ASSERTION FAILED: scale == 1
../../Source/WebCore/page/EventHandler.cpp(1510) : WTF::Optional<WebCore::Cursor> WebCore::EventHandler::selectCursor(const WebCore::HitTestResult&, bool)
1   0x7f7202ea81e1 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x9) [0x7f7202ea81e1]
2   0x7f72113c78ab /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::EventHandler::selectCursor(WebCore::HitTestResult const&, bool)+0x45f) [0x7f72113c78ab]
3   0x7f72113c73e7 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::EventHandler::updateCursor(WebCore::FrameView&, WebCore::HitTestResult const&, bool)+0x31) [0x7f72113c73e7]
4   0x7f72113c98d8 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::EventHandler::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&, WebCore::HitTestResult*, bool)+0x680) [0x7f72113c98d8]
5   0x7f72113c9090 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::EventHandler::mouseMoved(WebCore::PlatformMouseEvent const&)+0x11c) [0x7f72113c9090]
6   0x7f7211c28e8c /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebCore::UserInputBridge::handleMouseMoveEvent(WebCore::PlatformMouseEvent const&, WebCore::InputSource)+0x3c) [0x7f7211c28e8c]
7   0x7f720f7809e9 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(+0xb02b9e9) [0x7f720f7809e9]
8   0x7f720f780bf5 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebPage::mouseEvent(WebKit::WebMouseEvent const&)+0x1b9) [0x7f720f780bf5]
9   0x7f720ed0298c /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(void IPC::callMemberFunctionImpl<WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&), std::tuple<WebKit::WebMouseEvent>, 0ul>(WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&), std::tuple<WebKit::WebMouseEvent>&&, std::integer_sequence<unsigned long, 0ul>)+0x80) [0x7f720ed0298c]
10  0x7f720ecfc98f /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(void IPC::callMemberFunction<WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&), std::tuple<WebKit::WebMouseEvent>, std::integer_sequence<unsigned long, 0ul> >(std::tuple<WebKit::WebMouseEvent>&&, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&))+0x3b) [0x7f720ecfc98f]
11  0x7f720ecf026f /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(void IPC::handleMessage<Messages::WebPage::MouseEvent, WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&)>(IPC::Decoder&, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&))+0xf3) [0x7f720ecf026f]
12  0x7f720ece68f8 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&)+0x7d4) [0x7f720ece68f8]
13  0x7f720f7860c4 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebPage::didReceiveMessage(IPC::Connection&, IPC::Decoder&)+0x240) [0x7f720f7860c4]
14  0x7f720ef9f7fc /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)+0x126) [0x7f720ef9f7fc]
15  0x7f720f4a590a /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)+0x4c) [0x7f720f4a590a]
16  0x7f720ef7daed /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(IPC::Decoder&)+0x183) [0x7f720ef7daed]
17  0x7f720ef7dc68 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >)+0x178) [0x7f720ef7dc68]
18  0x7f720ef797c9 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*)+0x16b) [0x7f720ef797c9]
19  0x7f720ef7d5c6 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchSyncMessage(IPC::Decoder&)+0x22a) [0x7f720ef7d5c6]
20  0x7f720ef7dc48 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >)+0x158) [0x7f720ef7dc48]
21  0x7f720ef797c9 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::SyncMessageState::dispatchMessages(IPC::Connection*)+0x16b) [0x7f720ef797c9]
22  0x7f720ef7b978 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::waitForSyncReply(unsigned long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)+0xae) [0x7f720ef7b978]
23  0x7f720ef7b7e4 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(IPC::Connection::sendSyncMessage(unsigned long, std::unique_ptr<IPC::Encoder, std::default_delete<IPC::Encoder> >, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)+0x1ca) [0x7f720ef7b7e4]
24  0x7f720f7aa258 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(bool IPC::Connection::sendSync<Messages::WebPageProxy::HandleSynchronousMessage>(Messages::WebPageProxy::HandleSynchronousMessage&&, Messages::WebPageProxy::HandleSynchronousMessage::Reply&&, unsigned long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)+0xfe) [0x7f720f7aa258]
25  0x7f720f7a2d22 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(bool IPC::MessageSender::sendSync<Messages::WebPageProxy::HandleSynchronousMessage>(Messages::WebPageProxy::HandleSynchronousMessage&&, Messages::WebPageProxy::HandleSynchronousMessage::Reply&&, unsigned long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)+0xbe) [0x7f720f7a2d22]
26  0x7f720f799d44 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(bool IPC::MessageSender::sendSync<Messages::WebPageProxy::HandleSynchronousMessage>(Messages::WebPageProxy::HandleSynchronousMessage&&, Messages::WebPageProxy::HandleSynchronousMessage::Reply&&, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>)+0x74) [0x7f720f799d44]
27  0x7f720f78a3db /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WebKit::WebPage::postSynchronousMessageForTesting(WTF::String const&, API::Object*, WTF::RefPtr<API::Object, WTF::DumbPtrTraits<API::Object> >&)+0xc5) [0x7f720f78a3db]
28  0x7f720f5170b1 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37(WKBundlePagePostSynchronousMessageForTesting+0x79) [0x7f720f5170b1]
29  0x7f71a91f3619 /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/lib/libTestRunnerInjectedBundle.so(WTR::EventSendingController::mouseMoveTo(int, int)+0x20d) [0x7f71a91f3619]
30  0x7f71a92302b1 /home/slave/webkitgtk/gtk-linux-64-debug-tests/build/WebKitBuild/Debug/lib/libTestRunnerInjectedBundle.so(WTR::JSEventSendingController::mouseMoveTo(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)+0xdb) [0x7f71a92302b1]
31  0x7f7201b1ca62 /home/slave/webkitgtk/gtk-linux-64-debug/build/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18(long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*)+0x1ec) [0x7f7201b1ca62]
LEAK: 1 WebPageProxy
Comment 16 Carlos Garcia Campos 2019-07-17 08:49:29 PDT
We can actually just enable MOUSE_CURSOR_SCALE, since gtk already takes into account the device scale factor when rendering cursors.
Comment 17 Carlos Garcia Campos 2019-07-17 08:52:00 PDT
Created attachment 374296 [details]
Patch
Comment 18 Darin Adler 2019-07-17 09:25:40 PDT
Comment on attachment 374296 [details]
Patch

While I am not a GTK platform expert, patch looks good.
Comment 19 Carlos Garcia Campos 2019-07-18 01:28:14 PDT
Committed r247560: <https://trac.webkit.org/changeset/247560>