New issue
Advanced search Search tips

Issue 904039 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

single process mash: cursors

Project Member Reported by est...@chromium.org, Nov 10

Issue description

Custom cursors don't work for single process mash. They work in classic and multi process Mash.

In chrome_browser_main_extra_parts_ash.cc we have:
  params.create_cursor_factory = !features::IsSingleProcessMash();

which means the Mus client doesn't create a CursorDataFactoryOzone (the mojo-compatible version of CursorFactoryOzone) for single process mash. This is because there currently can only be one CursorFactoryOzone per thread and Ash needs/wants/has created X11CursorFactoryOzone.
 
current stack trace:

[156836:156836:1111/133041.489340:FATAL:cursor_data_factory_ozone.cc(36)] Check failed: magic_cookie_ == kCookie (48234935 vs. 4128055628)
#0 0x7f91979e28bf base::debug::StackTrace::StackTrace()
#1 0x7f919791265b logging::LogMessage::~LogMessage()
#2 0x7f9197be42ec ui::CursorDataFactoryOzone::GetCursorData()
#3 0x7f91909aac54 views::(anonymous namespace)::NativeCursorManagerMus::SetCursor()
#4 0x7f919094fc19 wm::CursorManager::SetCursor()
#5 0x7f919094eaf6 wm::CompoundEventFilter::UpdateCursor()
#6 0x7f919094f27f wm::CompoundEventFilter::OnMouseEvent()
#7 0x7f91933ade9f ui::EventDispatcher::DispatchEventToEventHandlers()
#8 0x7f91933ada99 ui::EventDispatcher::ProcessEvent()
#9 0x7f91933ad979 ui::EventDispatcherDelegate::DispatchEventToTarget()
#10 0x7f91933ad8e6 ui::EventDispatcherDelegate::DispatchEvent()
#11 0x7f9192d6dd85 aura::WindowEventDispatcher::DispatchMouseEnterOrExit()
#12 0x7f9192d6fb4b aura::WindowEventDispatcher::PreDispatchMouseEvent()
#13 0x7f9192d6f4a6 aura::WindowEventDispatcher::PreDispatchEvent()
#14 0x7f91933ad8c6 ui::EventDispatcherDelegate::DispatchEvent()
#15 0x7f91933af5f2 ui::EventProcessor::OnEventFromSource()
#16 0x7f91933afbbe ui::EventSource::SendEventToSinkFromRewriter()
#17 0x7f9192d5fddd aura::WindowTreeClient::OnWindowInputEvent()
#18 0x7f9192d8bbdd ws::mojom::WindowTreeClientStubDispatch::Accept()
#19 0x7f9197ca2e46 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#20 0x7f9197ca2776 mojo::FilterChain::Accept()
#21 0x7f9197ca41d5 mojo::InterfaceEndpointClient::HandleIncomingMessage()
#22 0x7f9197caa7db mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#23 0x7f9197ca9c00 mojo::internal::MultiplexRouter::Accept()
#24 0x7f9197ca2776 mojo::FilterChain::Accept()
#25 0x7f9197c9d68f mojo::Connector::ReadSingleMessage()
#26 0x7f9197c9e1d1 mojo::Connector::ReadAllAvailableMessages()
#27 0x7f9197c9e079 mojo::Connector::OnHandleReadyInternal()
#28 0x7f9197c9e8c7 mojo::SimpleWatcher::DiscardReadyState()
#29 0x7f9197c63c04 mojo::SimpleWatcher::OnHandleReady()
#30 0x7f9197c64111 _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo13SimpleWatcherEFvijRKNS3_18HandleSignalsStateEEJNS_7WeakPtrIS4_EEijS5_EEEFvvEE7RunImplIRKS9_RKNSt3__15tupleIJSB_ijS5_EEEJLm0ELm1ELm2ELm3EEEEvOT_OT0_NSI_16integer_sequenceImJXspT1_EEEE
#31 0x7f91978f596a base::debug::TaskAnnotator::RunTask()
#32 0x7f9197921b1f base::MessageLoopImpl::RunTask()
#33 0x7f91979220b3 base::MessageLoopImpl::DoWork()
#34 0x7f9197a06119 base::MessagePumpLibevent::Run()
#35 0x7f91979216c4 base::MessageLoopImpl::Run()
#36 0x7f91979532a9 base::RunLoop::Run()
#37 0x562ff925a2fd ChromeBrowserMainParts::MainMessageLoopRun()
#38 0x7f919488d987 content::BrowserMainLoop::RunMainMessageLoopParts()
#39 0x7f9194890486 content::BrowserMainRunnerImpl::Run()
#40 0x7f9194889f49 content::BrowserMain()
#41 0x7f919535c8d6 content::ContentMainRunnerImpl::Run()
#42 0x7f9187eaf046 service_manager::Main()
#43 0x7f919535abc4 content::ContentMain()
#44 0x562ff842af63 ChromeMain
#45 0x7f918847a2b1 __libc_start_main
#46 0x562ff842adda _start

For testing, https://css-tricks.com/using-css-cursors/ is convenient for sp Mash, but it uses iframes which for other reasons break Oop Mash.

A page with just a custom cursor that doesn't use iframes is https://davidwalsh.name/demo/css-custom-cursor.php
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/891067b2c40e0624546cb9d8ee5c9777b9760a3b

commit 891067b2c40e0624546cb9d8ee5c9777b9760a3b
Author: Evan Stade <estade@chromium.org>
Date: Fri Nov 16 01:26:33 2018

Don't use ui::CursorData as PlatformCursor for mash clients.

ui::Cursor now holds the data necessary for custom cursors, although for
simplicity this patch still converts to CursorData for serializing over
mojo.

CursorFactoryOzone goes back to being a true singleton, which shouldn't
be used from client code in Mash (in Oop Mash, it's actually null; in
single process Mash it is avoided by checking the feature switch).

This patch also makes some tweaks to how custom web cursors are stored
as ui::Cursors, which shouldn't impact other platforms but brings the
ui::Cursor representation into alignment with the PlatformCursor
representation for ozone.

As a future cleanup we should be able to get rid of CursorData and
serialize ui::Cursor directly.

Bug:  904039 ,  734668 
Change-Id: I4168c0266899bd276c60a0ac6a286b3a79df572f
Reviewed-on: https://chromium-review.googlesource.com/c/1334968
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608617}
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/ash/components/tap_visualizer/tap_visualizer_app_unittest.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/ash/ws/ash_window_manager_unittest.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/chrome/browser/ui/ash/chrome_browser_main_extra_parts_ash.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/content/common/cursors/webcursor.h
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/content/common/cursors/webcursor_aura.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/content/common/cursors/webcursor_aurawin.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/content/common/cursors/webcursor_aurax11.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/content/common/cursors/webcursor_ozone.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/content/common/cursors/webcursor_unittest.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/ui/base/BUILD.gn
[delete] https://crrev.com/7de3a17b0ef130a5723f012829bb9170139394e8/ui/base/cursor/ozone/cursor_data_factory_ozone.cc
[delete] https://crrev.com/7de3a17b0ef130a5723f012829bb9170139394e8/ui/base/cursor/ozone/cursor_data_factory_ozone.h
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/ui/ozone/public/cursor_factory_ozone.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/ui/views/mus/desktop_window_tree_host_mus.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/ui/views/mus/mus_client.cc
[modify] https://crrev.com/891067b2c40e0624546cb9d8ee5c9777b9760a3b/ui/views/mus/mus_client.h

Components: Internals>Services>WindowService
Labels: -Pri-2 Pri-3
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c

commit bbc189965a770585c9457aa6bbfaf11f9cf6cf1c
Author: Evan Stade <estade@chromium.org>
Date: Mon Jan 07 18:27:50 2019

Remove CursorData and serialize Cursor over mojo.

Bug:  904039 
Change-Id: I86728440c0e34efd2f20b141039bc76dd3057907
Reviewed-on: https://chromium-review.googlesource.com/c/1383439
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620387}
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ash/cursor_unittest.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/content/common/cursors/webcursor_aura.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/content/renderer/mus/renderer_window_tree_client.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/content/renderer/mus/renderer_window_tree_client.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/mojo/public/tools/bindings/chromium_bindings_configuration.gni
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/BUILD.gn
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/public/mojom/BUILD.gn
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/BUILD.gn
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/DEPS
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/OWNERS
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/cursor.typemap
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/cursor_struct_traits.cc
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/cursor_struct_traits.h
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/cursor_struct_traits_unittest.cc
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/services/ws/public/mojom/cursor/typemaps.gni
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/public/mojom/window_tree.mojom
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/test_change_tracker.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/test_change_tracker.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/test_window_tree_client.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/test_window_tree_client.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/window_delegate_impl_unittest.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/window_tree.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/window_tree.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/window_tree_client_unittest.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/window_tree_test_helper.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/services/ws/window_tree_test_helper.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/mus/in_flight_change.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/mus/in_flight_change.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/mus/window_mus.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/mus/window_port_mus.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/mus/window_port_mus.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/mus/window_tree_client.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/test/mus/test_window_tree.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/aura/test/mus/test_window_tree.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/BUILD.gn
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/cursor/cursor.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/cursor/cursor.h
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/ui/base/cursor/cursor_data.cc
[delete] https://crrev.com/40edc5504ec9003e263d1a8ecc833cdd48c588b7/ui/base/cursor/cursor_data.h
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/BUILD.gn
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/DEPS
[rename] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/cursor.mojom
[add] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/cursor.typemap
[add] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/cursor_struct_traits.cc
[add] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/cursor_struct_traits.h
[add] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/cursor_struct_traits_unittest.cc
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/base/mojo/typemaps.gni
[modify] https://crrev.com/bbc189965a770585c9457aa6bbfaf11f9cf6cf1c/ui/views/mus/desktop_window_tree_host_mus.cc

Status: Fixed (was: Started)

Sign in to add a comment