Replace blink::Cursor with ui::Cursor

ui::Cursor is a superset of blink::Cursor. Delete the latter and replace
all of its uses with the former.

Bug: 1028080
Change-Id: I687ebbc323f346aa12cc40f264e38d74e7173331
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000620
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#750369}
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index d81629a..de72331 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -247,6 +247,7 @@
     ":core",
     ":generated_testing_idls",
     "//third_party/blink/renderer/bindings/core/v8:testing",
+    "//ui/base/cursor",
     "//ui/base/mojom:cursor_type_blink",
   ]
 
diff --git a/third_party/blink/renderer/core/DEPS b/third_party/blink/renderer/core/DEPS
index 49ab19b..19b8fe3 100644
--- a/third_party/blink/renderer/core/DEPS
+++ b/third_party/blink/renderer/core/DEPS
@@ -52,6 +52,7 @@
     "+cc/paint/display_item_list.h",
     "+cc/paint/paint_canvas.h",
     "+cc/paint/paint_flags.h",
+    "+cc/paint/paint_image.h",
     "+cc/paint/paint_worklet_input.h",
     "+cc/trees/browser_controls_params.h",
     "+cc/trees/layer_tree_host.h",
diff --git a/third_party/blink/renderer/core/editing/link_selection_test.cc b/third_party/blink/renderer/core/editing/link_selection_test.cc
index 5d4d74d..69e1e4c 100644
--- a/third_party/blink/renderer/core/editing/link_selection_test.cc
+++ b/third_party/blink/renderer/core/editing/link_selection_test.cc
@@ -16,9 +16,9 @@
 #include "third_party/blink/renderer/core/page/context_menu_controller.h"
 #include "third_party/blink/renderer/core/page/focus_controller.h"
 #include "third_party/blink/renderer/core/page/page.h"
-#include "third_party/blink/renderer/platform/cursor.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
+#include "ui/base/cursor/cursor.h"
 #include "ui/base/mojom/cursor_type.mojom-blink.h"
 
 using testing::_;
@@ -195,7 +195,7 @@
   test::RunDelayedTasks(base::TimeDelta::FromMilliseconds(50));
   const auto& cursor =
       main_frame_->GetFrame()->GetChromeClient().LastSetCursorForTesting();
-  EXPECT_EQ(ui::mojom::blink::CursorType::kHand, cursor.GetType());
+  EXPECT_EQ(ui::mojom::blink::CursorType::kHand, cursor.type());
 }
 
 TEST_F(LinkSelectionTest, DragOnNothingShowsPointer) {
@@ -207,7 +207,7 @@
   test::RunDelayedTasks(base::TimeDelta::FromMilliseconds(50));
   const auto& cursor =
       main_frame_->GetFrame()->GetChromeClient().LastSetCursorForTesting();
-  EXPECT_EQ(ui::mojom::blink::CursorType::kPointer, cursor.GetType());
+  EXPECT_EQ(ui::mojom::blink::CursorType::kPointer, cursor.type());
 }
 
 TEST_F(LinkSelectionTest, CaretCursorOverLinkDuringSelection) {
@@ -220,7 +220,7 @@
   test::RunDelayedTasks(base::TimeDelta::FromMilliseconds(50));
   const auto& cursor =
       main_frame_->GetFrame()->GetChromeClient().LastSetCursorForTesting();
-  EXPECT_EQ(ui::mojom::blink::CursorType::kIBeam, cursor.GetType());
+  EXPECT_EQ(ui::mojom::blink::CursorType::kIBeam, cursor.type());
 }
 
 TEST_F(LinkSelectionTest, HandCursorOverLinkAfterContextMenu) {
@@ -239,7 +239,7 @@
   test::RunDelayedTasks(base::TimeDelta::FromMilliseconds(50));
   const auto& cursor =
       main_frame_->GetFrame()->GetChromeClient().LastSetCursorForTesting();
-  EXPECT_EQ(ui::mojom::blink::CursorType::kHand, cursor.GetType());
+  EXPECT_EQ(ui::mojom::blink::CursorType::kHand, cursor.type());
 }
 
 TEST_F(LinkSelectionTest, SingleClickWithAltStartsDownload) {
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc
index ece42ca..32f3704 100644
--- a/third_party/blink/renderer/core/exported/web_frame_test.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -164,7 +164,6 @@
 #include "third_party/blink/renderer/core/testing/sim/sim_test.h"
 #include "third_party/blink/renderer/platform/bindings/microtask.h"
 #include "third_party/blink/renderer/platform/blob/testing/fake_blob.h"
-#include "third_party/blink/renderer/platform/cursor.h"
 #include "third_party/blink/renderer/platform/exported/wrapped_resource_request.h"
 #include "third_party/blink/renderer/platform/graphics/graphics_layer.h"
 #include "third_party/blink/renderer/platform/keyboard_codes.h"
diff --git a/third_party/blink/renderer/core/exported/web_page_popup_impl.cc b/third_party/blink/renderer/core/exported/web_page_popup_impl.cc
index cfe80a2..02bed4eb 100644
--- a/third_party/blink/renderer/core/exported/web_page_popup_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_page_popup_impl.cc
@@ -69,7 +69,6 @@
 #include "third_party/blink/renderer/platform/keyboard_codes.h"
 #include "third_party/blink/renderer/platform/text/text_direction.h"
 #include "third_party/blink/renderer/platform/web_test_support.h"
-#include "ui/base/cursor/cursor.h"
 
 namespace blink {
 
@@ -175,8 +174,8 @@
 
   IntSize MinimumWindowSize() const override { return IntSize(0, 0); }
 
-  void SetCursor(const Cursor& cursor, LocalFrame* local_frame) override {
-    popup_->WidgetClient()->DidChangeCursor(cursor.GetCursor());
+  void SetCursor(const ui::Cursor& cursor, LocalFrame* local_frame) override {
+    popup_->WidgetClient()->DidChangeCursor(cursor);
   }
 
   void SetEventListenerProperties(
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 57e29da..4696a63 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -145,7 +145,6 @@
 #include "third_party/blink/renderer/core/scroll/scrollbar_theme.h"
 #include "third_party/blink/renderer/core/timing/dom_window_performance.h"
 #include "third_party/blink/renderer/core/timing/window_performance.h"
-#include "third_party/blink/renderer/platform/cursor.h"
 #include "third_party/blink/renderer/platform/fonts/font_cache.h"
 #include "third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.h"
 #include "third_party/blink/renderer/platform/graphics/image.h"
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc
index 7b99141..916e1ec 100644
--- a/third_party/blink/renderer/core/exported/web_view_test.cc
+++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -126,6 +126,7 @@
 #include "third_party/blink/renderer/core/timing/dom_window_performance.h"
 #include "third_party/blink/renderer/core/timing/event_timing.h"
 #include "third_party/blink/renderer/core/timing/window_performance.h"
+#include "third_party/blink/renderer/platform/cursors.h"
 #include "third_party/blink/renderer/platform/geometry/int_rect.h"
 #include "third_party/blink/renderer/platform/geometry/int_size.h"
 #include "third_party/blink/renderer/platform/graphics/color.h"
@@ -3309,9 +3310,9 @@
     int resize_width;
     int resize_height;
     ui::mojom::blink::CursorType expected_cursor;
-  } cursor_tests[] = {{100, 100, MiddlePanningCursor().GetType()},
-                      {1010, 100, MiddlePanningVerticalCursor().GetType()},
-                      {100, 2010, MiddlePanningHorizontalCursor().GetType()}};
+  } cursor_tests[] = {{100, 100, MiddlePanningCursor().type()},
+                      {1010, 100, MiddlePanningVerticalCursor().type()},
+                      {100, 2010, MiddlePanningHorizontalCursor().type()}};
 
   for (const CursorTests current_test : cursor_tests) {
     WebViewImpl* web_view = web_view_helper_.InitializeAndLoad(
@@ -3347,7 +3348,7 @@
 
     // Even if a plugin tries to change the cursor type, that should be ignored
     // during middle-click autoscroll.
-    web_view->GetChromeClient().SetCursorForPlugin(PointerCursor().GetCursor(),
+    web_view->GetChromeClient().SetCursorForPlugin(PointerCursor(),
                                                    local_frame);
     EXPECT_EQ(current_test.expected_cursor, client.GetLastCursorType());
 
@@ -3359,9 +3360,8 @@
     web_view->MainFrameWidget()->HandleInputEvent(
         WebCoalescedInputEvent(mouse_event));
 
-    web_view->GetChromeClient().SetCursorForPlugin(IBeamCursor().GetCursor(),
-                                                   local_frame);
-    EXPECT_EQ(IBeamCursor().GetType(), client.GetLastCursorType());
+    web_view->GetChromeClient().SetCursorForPlugin(IBeamCursor(), local_frame);
+    EXPECT_EQ(IBeamCursor().type(), client.GetLastCursorType());
   }
 
   // Explicitly reset to break dependency on locally scoped client.
diff --git a/third_party/blink/renderer/core/frame/BUILD.gn b/third_party/blink/renderer/core/frame/BUILD.gn
index fe63de1..cd5b289 100644
--- a/third_party/blink/renderer/core/frame/BUILD.gn
+++ b/third_party/blink/renderer/core/frame/BUILD.gn
@@ -213,4 +213,10 @@
     "window_or_worker_global_scope.cc",
     "window_or_worker_global_scope.h",
   ]
+
+  deps = [
+    "//skia",
+    "//ui/base/cursor",
+    "//ui/base/mojom:cursor_type_blink",
+  ]
 }
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc
index 0dc52a6..bd47439 100644
--- a/third_party/blink/renderer/core/frame/local_frame_view.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_view.cc
@@ -153,6 +153,9 @@
 #include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
 #include "third_party/blink/renderer/platform/web_test_support.h"
 #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/cursor/cursor.h"
+#include "ui/base/mojom/cursor_type.mojom-blink.h"
 
 // Used to check for dirty layouts violating document lifecycle rules.
 // If arg evaluates to true, the program will continue. If arg evaluates to
@@ -172,15 +175,15 @@
 // Logs a UseCounter for the size of the cursor that will be set. This will be
 // used for compatibility analysis to determine whether the maximum size can be
 // reduced.
-void LogCursorSizeCounter(LocalFrame* frame, const Cursor& cursor) {
+void LogCursorSizeCounter(LocalFrame* frame, const ui::Cursor& cursor) {
   DCHECK(frame);
-  Image* image = cursor.GetImage();
-  if (!image)
+  SkBitmap bitmap = cursor.custom_bitmap();
+  if (cursor.type() != ui::mojom::blink::CursorType::kCustom || bitmap.isNull())
     return;
   // Should not overflow, this calculation is done elsewhere when determining
   // whether the cursor exceeds its maximum size (see event_handler.cc).
-  IntSize scaled_size = image->Size();
-  scaled_size.Scale(1 / cursor.ImageScaleFactor());
+  auto scaled_size = IntSize(bitmap.width(), bitmap.height());
+  scaled_size.Scale(1 / cursor.image_scale_factor());
   if (scaled_size.Width() > 64 || scaled_size.Height() > 64) {
     UseCounter::Count(frame->GetDocument(), WebFeature::kCursorImageGT64x64);
   } else if (scaled_size.Width() > 32 || scaled_size.Height() > 32) {
@@ -3526,7 +3529,7 @@
   return nullptr;
 }
 
-void LocalFrameView::SetCursor(const Cursor& cursor) {
+void LocalFrameView::SetCursor(const ui::Cursor& cursor) {
   Page* page = GetFrame().GetPage();
   if (!page || frame_->GetEventHandler().IsMousePositionUnknown())
     return;
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.h b/third_party/blink/renderer/core/frame/local_frame_view.h
index c66dd9c..1cdd7415 100644
--- a/third_party/blink/renderer/core/frame/local_frame_view.h
+++ b/third_party/blink/renderer/core/frame/local_frame_view.h
@@ -60,11 +60,14 @@
 enum class PaintHoldingCommitTrigger;
 }
 
+namespace ui {
+class Cursor;
+}
+
 namespace blink {
 class AXObjectCache;
 class ChromeClient;
 class CompositorAnimationTimeline;
-class Cursor;
 class DocumentLifecycle;
 class FloatRect;
 class FloatSize;
@@ -423,7 +426,7 @@
 
   bool ShouldSetCursor() const;
 
-  void SetCursor(const Cursor&);
+  void SetCursor(const ui::Cursor&);
 
   // FIXME: Remove this method once plugin loading is decoupled from layout.
   void FlushAnyPendingPostLayoutTasks();
diff --git a/third_party/blink/renderer/core/input/BUILD.gn b/third_party/blink/renderer/core/input/BUILD.gn
index 1ba9bb6..069a846 100644
--- a/third_party/blink/renderer/core/input/BUILD.gn
+++ b/third_party/blink/renderer/core/input/BUILD.gn
@@ -39,5 +39,14 @@
     "touch_list.cc",
     "touch_list.h",
   ]
-  deps = [ "//third_party/blink/public:buildflags" ]
+
+  public_deps = [ "//ui/base/cursor" ]
+
+  deps = [
+    "//skia",
+    "//third_party/blink/public:buildflags",
+    "//third_party/blink/renderer/platform",
+    "//third_party/blink/renderer/platform/wtf",
+    "//ui/base/mojom:cursor_type_blink",
+  ]
 }
diff --git a/third_party/blink/renderer/core/input/event_handler.cc b/third_party/blink/renderer/core/input/event_handler.cc
index ed66cfb..fa20739 100644
--- a/third_party/blink/renderer/core/input/event_handler.cc
+++ b/third_party/blink/renderer/core/input/event_handler.cc
@@ -97,10 +97,12 @@
 #include "third_party/blink/renderer/core/style/computed_style.h"
 #include "third_party/blink/renderer/core/style/cursor_data.h"
 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
+#include "third_party/blink/renderer/platform/cursors.h"
 #include "third_party/blink/renderer/platform/geometry/float_point.h"
 #include "third_party/blink/renderer/platform/geometry/int_point.h"
 #include "third_party/blink/renderer/platform/geometry/int_rect.h"
 #include "third_party/blink/renderer/platform/graphics/image.h"
+#include "third_party/blink/renderer/platform/graphics/image_orientation.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/instrumentation/histogram.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
@@ -108,7 +110,10 @@
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
 #include "third_party/blink/renderer/platform/windows_keyboard_codes.h"
 #include "third_party/blink/renderer/platform/wtf/assertions.h"
+#include "third_party/blink/renderer/platform/wtf/math_extras.h"
 #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/mojom/cursor_type.mojom-blink.h"
 
 namespace blink {
 
@@ -150,6 +155,36 @@
          point.Y() >= rect.Y() && point.Y() <= rect.MaxY();
 }
 
+IntPoint DetermineHotSpot(const Image& image,
+                          bool hot_spot_specified,
+                          const IntPoint& specified_hot_spot) {
+  if (image.IsNull())
+    return IntPoint();
+
+  IntRect image_rect = image.Rect();
+
+  // Hot spot must be inside cursor rectangle.
+  if (hot_spot_specified) {
+    if (image_rect.Contains(specified_hot_spot))
+      return specified_hot_spot;
+
+    return IntPoint(clampTo<int>(specified_hot_spot.X(), image_rect.X(),
+                                 image_rect.MaxX() - 1),
+                    clampTo<int>(specified_hot_spot.Y(), image_rect.Y(),
+                                 image_rect.MaxY() - 1));
+  }
+
+  // If hot spot is not specified externally, it can be extracted from some
+  // image formats (e.g. .cur).
+  IntPoint intrinsic_hot_spot;
+  bool image_has_intrinsic_hot_spot = image.GetHotSpot(intrinsic_hot_spot);
+  if (image_has_intrinsic_hot_spot && image_rect.Contains(intrinsic_hot_spot))
+    return intrinsic_hot_spot;
+
+  // If neither is provided, use a default value of (0, 0).
+  return IntPoint();
+}
+
 }  // namespace
 
 // The amount of time to wait for a cursor update on style and layout changes
@@ -446,7 +481,7 @@
   layout_view->HitTest(location, result);
 
   if (LocalFrame* frame = result.InnerNodeFrame()) {
-    base::Optional<Cursor> optional_cursor =
+    base::Optional<ui::Cursor> optional_cursor =
         frame->GetEventHandler().SelectCursor(location, result);
     if (optional_cursor.has_value()) {
       view->SetCursor(optional_cursor.value());
@@ -493,7 +528,7 @@
   return HasEditableStyle(*node);
 }
 
-base::Optional<Cursor> EventHandler::SelectCursor(
+base::Optional<ui::Cursor> EventHandler::SelectCursor(
     const HitTestLocation& location,
     const HitTestResult& result) {
   if (scroll_manager_->InResizeMode())
@@ -536,7 +571,7 @@
   const ComputedStyle* style = layout_object ? layout_object->Style() : nullptr;
 
   if (layout_object) {
-    Cursor override_cursor;
+    ui::Cursor override_cursor;
     switch (layout_object->GetCursor(result.LocalPoint(), override_cursor)) {
       case kSetCursorBasedOnStyle:
         break;
@@ -592,12 +627,21 @@
 
       // Convert from logical pixels to physical pixels.
       hot_spot.Scale(scale, scale);
-      return Cursor(image, hot_spot_specified, hot_spot, scale);
+
+      ui::Cursor cursor(ui::mojom::blink::CursorType::kCustom);
+      cursor.set_custom_bitmap(
+          image ? image->AsSkBitmapForCurrentFrame(kRespectImageOrientation)
+                : SkBitmap());
+      cursor.set_custom_hotspot(
+          DetermineHotSpot(*image, hot_spot_specified, hot_spot));
+      cursor.set_image_scale_factor(scale);
+      return cursor;
     }
   }
 
   bool horizontal_text = !style || style->IsHorizontalWritingMode();
-  const Cursor& i_beam = horizontal_text ? IBeamCursor() : VerticalTextCursor();
+  const ui::Cursor& i_beam =
+      horizontal_text ? IBeamCursor() : VerticalTextCursor();
 
   switch (style ? style->Cursor() : ECursor::kAuto) {
     case ECursor::kAuto: {
@@ -677,10 +721,10 @@
   return PointerCursor();
 }
 
-base::Optional<Cursor> EventHandler::SelectAutoCursor(
+base::Optional<ui::Cursor> EventHandler::SelectAutoCursor(
     const HitTestResult& result,
     Node* node,
-    const Cursor& i_beam) {
+    const ui::Cursor& i_beam) {
   if (ShouldShowIBeamForNode(node, result))
     return i_beam;
 
@@ -1061,7 +1105,7 @@
     }
     LocalFrameView* view = frame_->View();
     if ((!is_remote_frame || is_portal) && view) {
-      base::Optional<Cursor> optional_cursor =
+      base::Optional<ui::Cursor> optional_cursor =
           SelectCursor(mev.GetHitTestLocation(), mev.GetHitTestResult());
       if (optional_cursor.has_value()) {
         view->SetCursor(optional_cursor.value());
diff --git a/third_party/blink/renderer/core/input/event_handler.h b/third_party/blink/renderer/core/input/event_handler.h
index 4b8b63eb..8645fc7 100644
--- a/third_party/blink/renderer/core/input/event_handler.h
+++ b/third_party/blink/renderer/core/input/event_handler.h
@@ -47,13 +47,13 @@
 #include "third_party/blink/renderer/core/page/event_with_hit_test_results.h"
 #include "third_party/blink/renderer/core/scroll/scroll_types.h"
 #include "third_party/blink/renderer/core/style/computed_style_constants.h"
-#include "third_party/blink/renderer/platform/cursor.h"
 #include "third_party/blink/renderer/platform/geometry/layout_point.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
 #include "third_party/blink/renderer/platform/wtf/hash_traits.h"
+#include "ui/base/cursor/cursor.h"
 
 namespace blink {
 
@@ -295,11 +295,11 @@
   bool IsSelectingLink(const HitTestResult&);
   bool ShouldShowIBeamForNode(const Node*, const HitTestResult&);
   bool ShouldShowResizeForNode(const Node*, const HitTestLocation&);
-  base::Optional<Cursor> SelectCursor(const HitTestLocation& location,
-                                      const HitTestResult&);
-  base::Optional<Cursor> SelectAutoCursor(const HitTestResult&,
-                                          Node*,
-                                          const Cursor& i_beam);
+  base::Optional<ui::Cursor> SelectCursor(const HitTestLocation& location,
+                                          const HitTestResult&);
+  base::Optional<ui::Cursor> SelectAutoCursor(const HitTestResult&,
+                                              Node*,
+                                              const ui::Cursor& i_beam);
 
   void HoverTimerFired(TimerBase*);
   void CursorUpdateTimerFired(TimerBase*);
diff --git a/third_party/blink/renderer/core/input/event_handler_test.cc b/third_party/blink/renderer/core/input/event_handler_test.cc
index 4e68c42..cca36d9 100644
--- a/third_party/blink/renderer/core/input/event_handler_test.cc
+++ b/third_party/blink/renderer/core/input/event_handler_test.cc
@@ -47,6 +47,7 @@
 #include "third_party/blink/renderer/platform/keyboard_codes.h"
 #include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
+#include "ui/base/cursor/cursor.h"
 #include "ui/base/mojom/cursor_type.mojom-blink.h"
 #include "ui/events/keycodes/dom/dom_code.h"
 #include "ui/events/keycodes/dom/dom_key.h"
@@ -627,7 +628,7 @@
                 ->GetEventHandler()
                 .SelectCursor(location, result)
                 .value()
-                .GetType(),
+                .type(),
             ui::mojom::blink::CursorType::kHand);  // A hand signals ability to
                                                    // navigate.
 }
@@ -652,7 +653,7 @@
           ->GetEventHandler()
           .SelectCursor(location, result)
           .value()
-          .GetType(),
+          .type(),
       ui::mojom::blink::CursorType::kIBeam);  // An I-beam signals editability.
 }
 
@@ -671,7 +672,7 @@
                 ->GetEventHandler()
                 .SelectCursor(location, result)
                 .value()
-                .GetType(),
+                .type(),
             // A north-south resize signals vertical resizability.
             ui::mojom::blink::CursorType::kNorthSouthResize);
 }
@@ -691,7 +692,7 @@
                 ->GetEventHandler()
                 .SelectCursor(location, result)
                 .value()
-                .GetType(),
+                .type(),
             // An east-west resize signals horizontal resizability.
             ui::mojom::blink::CursorType::kEastWestResize);
 }
@@ -711,7 +712,7 @@
                 ->GetEventHandler()
                 .SelectCursor(location, result)
                 .value()
-                .GetType(),
+                .type(),
             // An south-east resize signals both horizontal and
             // vertical resizability.
             ui::mojom::blink::CursorType::kSouthEastResize);
@@ -733,7 +734,7 @@
                 ->GetEventHandler()
                 .SelectCursor(location, result)
                 .value()
-                .GetType(),
+                .type(),
             // An south-west resize signals both horizontal and
             // vertical resizability when direction is RTL.
             ui::mojom::blink::CursorType::kSouthWestResize);
@@ -757,7 +758,7 @@
                 ->GetEventHandler()
                 .SelectCursor(location, result)
                 .value()
-                .GetType(),
+                .type(),
             ui::mojom::blink::CursorType::kSouthEastResize);
 }
 
@@ -779,7 +780,7 @@
                 ->GetEventHandler()
                 .SelectCursor(location, result)
                 .value()
-                .GetType(),
+                .type(),
             ui::mojom::blink::CursorType::kSouthEastResize);
 }
 
@@ -1598,7 +1599,7 @@
                                                      .GetFrame()
                                                      ->GetChromeClient()
                                                      .LastSetCursorForTesting()
-                                                     .GetType());
+                                                     .type());
 }
 
 // Ensure that tap on element in iframe should apply active state.
@@ -2121,9 +2122,9 @@
     GetDocument().GetFrame()->GetEventHandler().HandleMouseMoveEvent(
         mouse_move_event, Vector<WebMouseEvent>(), Vector<WebMouseEvent>());
 
-    const Cursor& cursor =
+    const ui::Cursor& cursor =
         GetDocument().GetFrame()->GetChromeClient().LastSetCursorForTesting();
-    EXPECT_EQ(ui::mojom::blink::CursorType::kCustom, cursor.GetType());
+    EXPECT_EQ(ui::mojom::blink::CursorType::kCustom, cursor.type());
   }
 
   // Now, move the cursor so that it intersects the visual viewport. The cursor
@@ -2137,9 +2138,9 @@
     GetDocument().GetFrame()->GetEventHandler().HandleMouseMoveEvent(
         mouse_move_event, Vector<WebMouseEvent>(), Vector<WebMouseEvent>());
 
-    const Cursor& cursor =
+    const ui::Cursor& cursor =
         GetDocument().GetFrame()->GetChromeClient().LastSetCursorForTesting();
-    EXPECT_EQ(ui::mojom::blink::CursorType::kPointer, cursor.GetType());
+    EXPECT_EQ(ui::mojom::blink::CursorType::kPointer, cursor.type());
   }
 }
 
@@ -2180,9 +2181,9 @@
     GetDocument().GetFrame()->GetEventHandler().HandleMouseMoveEvent(
         mouse_move_event, Vector<WebMouseEvent>(), Vector<WebMouseEvent>());
 
-    const Cursor& cursor =
+    const ui::Cursor& cursor =
         GetDocument().GetFrame()->GetChromeClient().LastSetCursorForTesting();
-    EXPECT_EQ(ui::mojom::blink::CursorType::kCustom, cursor.GetType());
+    EXPECT_EQ(ui::mojom::blink::CursorType::kCustom, cursor.type());
   }
 
   // Now, move the cursor so that it intersects the visual viewport. The cursor
@@ -2197,9 +2198,9 @@
     GetDocument().GetFrame()->GetEventHandler().HandleMouseMoveEvent(
         mouse_move_event, Vector<WebMouseEvent>(), Vector<WebMouseEvent>());
 
-    const Cursor& cursor =
+    const ui::Cursor& cursor =
         GetDocument().GetFrame()->GetChromeClient().LastSetCursorForTesting();
-    EXPECT_EQ(ui::mojom::blink::CursorType::kCustom, cursor.GetType());
+    EXPECT_EQ(ui::mojom::blink::CursorType::kCustom, cursor.type());
   }
 }
 
diff --git a/third_party/blink/renderer/core/inspector/inspect_tools.cc b/third_party/blink/renderer/core/inspector/inspect_tools.cc
index 746eda8..866afa0 100644
--- a/third_party/blink/renderer/core/inspector/inspect_tools.cc
+++ b/third_party/blink/renderer/core/inspector/inspect_tools.cc
@@ -26,6 +26,7 @@
 #include "third_party/blink/renderer/core/layout/layout_view.h"
 #include "third_party/blink/renderer/core/page/chrome_client.h"
 #include "third_party/blink/renderer/core/page/page.h"
+#include "third_party/blink/renderer/platform/cursors.h"
 #include "third_party/blink/renderer/platform/keyboard_codes.h"
 #include "third_party/inspector_protocol/crdtp/json.h"
 
diff --git a/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc b/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc
index 6faad0b..bca3b4f 100644
--- a/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc
@@ -295,7 +295,7 @@
     EmptyChromeClient::Trace(visitor);
   }
 
-  void SetCursor(const Cursor& cursor, LocalFrame* local_root) override {
+  void SetCursor(const ui::Cursor& cursor, LocalFrame* local_root) override {
     client_->SetCursorOverridden(false);
     client_->SetCursor(cursor, overlay_->GetFrame());
     client_->SetCursorOverridden(true);
diff --git a/third_party/blink/renderer/core/layout/layout_embedded_content.cc b/third_party/blink/renderer/core/layout/layout_embedded_content.cc
index c7b7e06..41b92ea 100644
--- a/third_party/blink/renderer/core/layout/layout_embedded_content.cc
+++ b/third_party/blink/renderer/core/layout/layout_embedded_content.cc
@@ -309,7 +309,7 @@
 }
 
 CursorDirective LayoutEmbeddedContent::GetCursor(const PhysicalOffset& point,
-                                                 Cursor& cursor) const {
+                                                 ui::Cursor& cursor) const {
   if (Plugin()) {
     // A plugin is responsible for setting the cursor when the pointer is over
     // it.
diff --git a/third_party/blink/renderer/core/layout/layout_embedded_content.h b/third_party/blink/renderer/core/layout/layout_embedded_content.h
index fe5606e..ce5d1ef 100644
--- a/third_party/blink/renderer/core/layout/layout_embedded_content.h
+++ b/third_party/blink/renderer/core/layout/layout_embedded_content.h
@@ -27,6 +27,10 @@
 #include "third_party/blink/renderer/core/html/html_frame_owner_element.h"
 #include "third_party/blink/renderer/core/layout/layout_replaced.h"
 
+namespace ui {
+class Cursor;
+}
+
 namespace blink {
 
 class EmbeddedContentView;
@@ -75,7 +79,7 @@
   void PaintReplaced(const PaintInfo&,
                      const PhysicalOffset& paint_offset) const override;
   void InvalidatePaint(const PaintInvalidatorContext&) const final;
-  CursorDirective GetCursor(const PhysicalOffset&, Cursor&) const final;
+  CursorDirective GetCursor(const PhysicalOffset&, ui::Cursor&) const final;
 
   bool CanBeSelectionLeafInternal() const final { return true; }
 
diff --git a/third_party/blink/renderer/core/layout/layout_frame_set.cc b/third_party/blink/renderer/core/layout/layout_frame_set.cc
index 8fe99fd..f8e1f4d 100644
--- a/third_party/blink/renderer/core/layout/layout_frame_set.cc
+++ b/third_party/blink/renderer/core/layout/layout_frame_set.cc
@@ -32,7 +32,7 @@
 #include "third_party/blink/renderer/core/layout/layout_frame.h"
 #include "third_party/blink/renderer/core/layout/layout_view.h"
 #include "third_party/blink/renderer/core/paint/frame_set_painter.h"
-#include "third_party/blink/renderer/platform/cursor.h"
+#include "third_party/blink/renderer/platform/cursors.h"
 #include "third_party/blink/renderer/platform/graphics/graphics_context.h"
 
 namespace blink {
@@ -577,7 +577,7 @@
 }
 
 CursorDirective LayoutFrameSet::GetCursor(const PhysicalOffset& point,
-                                          Cursor& cursor) const {
+                                          ui::Cursor& cursor) const {
   IntPoint rounded_point = RoundedIntPoint(point);
   if (CanResizeRow(rounded_point)) {
     cursor = RowResizeCursor();
diff --git a/third_party/blink/renderer/core/layout/layout_frame_set.h b/third_party/blink/renderer/core/layout/layout_frame_set.h
index ddbba07..2fc5276 100644
--- a/third_party/blink/renderer/core/layout/layout_frame_set.h
+++ b/third_party/blink/renderer/core/layout/layout_frame_set.h
@@ -134,7 +134,7 @@
   void Paint(const PaintInfo&) const override;
   void ComputePreferredLogicalWidths() override;
   bool IsChildAllowed(LayoutObject*, const ComputedStyle&) const override;
-  CursorDirective GetCursor(const PhysicalOffset&, Cursor&) const override;
+  CursorDirective GetCursor(const PhysicalOffset&, ui::Cursor&) const override;
 
   void SetIsResizing(bool);
 
diff --git a/third_party/blink/renderer/core/layout/layout_object.cc b/third_party/blink/renderer/core/layout/layout_object.cc
index a1fc9d1..803311a 100644
--- a/third_party/blink/renderer/core/layout/layout_object.cc
+++ b/third_party/blink/renderer/core/layout/layout_object.cc
@@ -3799,7 +3799,8 @@
   return CreatePositionWithAffinity(0);
 }
 
-CursorDirective LayoutObject::GetCursor(const PhysicalOffset&, Cursor&) const {
+CursorDirective LayoutObject::GetCursor(const PhysicalOffset&,
+                                        ui::Cursor&) const {
   return kSetCursorBasedOnStyle;
 }
 
diff --git a/third_party/blink/renderer/core/layout/layout_object.h b/third_party/blink/renderer/core/layout/layout_object.h
index 888d1f1..2d15b5d 100644
--- a/third_party/blink/renderer/core/layout/layout_object.h
+++ b/third_party/blink/renderer/core/layout/layout_object.h
@@ -65,10 +65,12 @@
 #include "third_party/blink/renderer/platform/transforms/transformation_matrix.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
 
-namespace blink {
-
-class AffineTransform;
+namespace ui {
 class Cursor;
+}
+
+namespace blink {
+class AffineTransform;
 class HitTestLocation;
 class HitTestRequest;
 class InlineBox;
@@ -1819,7 +1821,7 @@
     return StyleRef().VisitedDependentColor(color_property);
   }
 
-  virtual CursorDirective GetCursor(const PhysicalOffset&, Cursor&) const;
+  virtual CursorDirective GetCursor(const PhysicalOffset&, ui::Cursor&) const;
 
   // Return the LayoutBoxModelObject in the container chain which is responsible
   // for painting this object. The function crosses frames boundaries so the
diff --git a/third_party/blink/renderer/core/layout/scrollbars_test.cc b/third_party/blink/renderer/core/layout/scrollbars_test.cc
index 496cb71f..bc31ea9 100644
--- a/third_party/blink/renderer/core/layout/scrollbars_test.cc
+++ b/third_party/blink/renderer/core/layout/scrollbars_test.cc
@@ -30,6 +30,7 @@
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
+#include "ui/base/cursor/cursor.h"
 #include "ui/base/mojom/cursor_type.mojom-blink.h"
 
 namespace blink {
@@ -210,7 +211,7 @@
         .GetFrame()
         ->GetChromeClient()
         .LastSetCursorForTesting()
-        .GetType();
+        .type();
   }
 
   ScrollbarTheme& GetScrollbarTheme() {
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 6560c45..b412f0c 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -47,6 +47,7 @@
 #include "third_party/blink/renderer/core/frame/remote_frame_client.h"
 #include "third_party/blink/renderer/core/page/chrome_client.h"
 #include "third_party/blink/renderer/core/page/page.h"
+#include "third_party/blink/renderer/platform/cursors.h"
 #include "third_party/blink/renderer/platform/exported/wrapped_resource_request.h"
 #include "third_party/blink/renderer/platform/geometry/float_point.h"
 #include "third_party/blink/renderer/platform/geometry/float_rect.h"
@@ -55,6 +56,7 @@
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_error.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
+#include "ui/base/cursor/cursor.h"
 #include "v8/include/v8.h"
 
 /*
@@ -73,6 +75,10 @@
  Brittle, yes. Unfortunate, yes. Hopefully temporary.
 */
 
+namespace ui {
+class Cursor;
+}
+
 namespace blink {
 
 enum class GlobalObjectReusePolicy;
@@ -196,9 +202,11 @@
 
   void OpenFileChooser(LocalFrame*, scoped_refptr<FileChooser>) override;
 
-  void SetCursor(const Cursor&, LocalFrame* local_root) override {}
+  void SetCursor(const ui::Cursor&, LocalFrame* local_root) override {}
   void SetCursorOverridden(bool) override {}
-  Cursor LastSetCursorForTesting() const override { return PointerCursor(); }
+  ui::Cursor LastSetCursorForTesting() const override {
+    return PointerCursor();
+  }
 
   void AttachRootLayer(scoped_refptr<cc::Layer>,
                        LocalFrame* local_root) override;
diff --git a/third_party/blink/renderer/core/page/BUILD.gn b/third_party/blink/renderer/core/page/BUILD.gn
index cc0e14e..06f4333 100644
--- a/third_party/blink/renderer/core/page/BUILD.gn
+++ b/third_party/blink/renderer/core/page/BUILD.gn
@@ -114,5 +114,5 @@
     "viewport_description.h",
   ]
 
-  deps = [ "//ui/base/cursor" ]
+  public_deps = [ "//ui/base/cursor" ]
 }
diff --git a/third_party/blink/renderer/core/page/autoscroll_controller.cc b/third_party/blink/renderer/core/page/autoscroll_controller.cc
index 96a16f4..8ff730d 100644
--- a/third_party/blink/renderer/core/page/autoscroll_controller.cc
+++ b/third_party/blink/renderer/core/page/autoscroll_controller.cc
@@ -37,6 +37,8 @@
 #include "third_party/blink/renderer/core/layout/layout_box.h"
 #include "third_party/blink/renderer/core/page/chrome_client.h"
 #include "third_party/blink/renderer/core/page/page.h"
+#include "third_party/blink/renderer/platform/cursors.h"
+#include "ui/base/cursor/cursor.h"
 
 namespace blink {
 
@@ -46,9 +48,10 @@
 
 static const int kNoMiddleClickAutoscrollRadius = 15;
 
-static const Cursor& MiddleClickAutoscrollCursor(const gfx::Vector2dF& velocity,
-                                                 bool scroll_vert,
-                                                 bool scroll_horiz) {
+static const ui::Cursor& MiddleClickAutoscrollCursor(
+    const gfx::Vector2dF& velocity,
+    bool scroll_vert,
+    bool scroll_horiz) {
   // At the original click location we draw a 4 arrowed icon. Over this icon
   // there won't be any scroll, So don't change the cursor over this area.
   bool east = velocity.x() < 0;
diff --git a/third_party/blink/renderer/core/page/chrome_client.h b/third_party/blink/renderer/core/page/chrome_client.h
index e8aff571..fb48a87 100644
--- a/third_party/blink/renderer/core/page/chrome_client.h
+++ b/third_party/blink/renderer/core/page/chrome_client.h
@@ -30,6 +30,7 @@
 #include "cc/input/event_listener_properties.h"
 #include "cc/input/layer_selection_bound.h"
 #include "cc/input/overscroll_behavior.h"
+#include "cc/paint/paint_image.h"
 #include "cc/trees/paint_holding_commit_trigger.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
 #include "third_party/blink/public/common/dom_storage/session_storage_namespace_id.h"
@@ -51,7 +52,6 @@
 #include "third_party/blink/renderer/core/loader/navigation_policy.h"
 #include "third_party/blink/renderer/core/scroll/scroll_types.h"
 #include "third_party/blink/renderer/core/style/computed_style_constants.h"
-#include "third_party/blink/renderer/platform/cursor.h"
 #include "third_party/blink/renderer/platform/graphics/touch_action.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/text/text_direction.h"
@@ -266,7 +266,7 @@
   virtual WebViewImpl* GetWebView() const = 0;
 
   virtual WebScreenInfo GetScreenInfo(LocalFrame& frame) const = 0;
-  virtual void SetCursor(const Cursor&, LocalFrame* local_root) = 0;
+  virtual void SetCursor(const ui::Cursor&, LocalFrame* local_root) = 0;
 
   virtual void SetCursorOverridden(bool) = 0;
 
@@ -274,7 +274,7 @@
   virtual void AutoscrollFling(const gfx::Vector2dF& velocity, LocalFrame*) {}
   virtual void AutoscrollEnd(LocalFrame*) {}
 
-  virtual Cursor LastSetCursorForTesting() const = 0;
+  virtual ui::Cursor LastSetCursorForTesting() const = 0;
   Node* LastSetTooltipNodeForTesting() const {
     return last_mouse_over_node_.Get();
   }
@@ -472,7 +472,7 @@
   }
 
   virtual void RequestDecode(LocalFrame*,
-                             const PaintImage& image,
+                             const cc::PaintImage& image,
                              base::OnceCallback<void(bool)> callback) {
     std::move(callback).Run(false);
   }
diff --git a/third_party/blink/renderer/core/page/chrome_client_impl.cc b/third_party/blink/renderer/core/page/chrome_client_impl.cc
index a847aee..13305fa 100644
--- a/third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ b/third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -94,7 +94,6 @@
 #include "third_party/blink/renderer/core/page/popup_opening_observer.h"
 #include "third_party/blink/renderer/core/page/validation_message_client.h"
 #include "third_party/blink/renderer/platform/animation/compositor_animation_timeline.h"
-#include "third_party/blink/renderer/platform/cursor.h"
 #include "third_party/blink/renderer/platform/exported/wrapped_resource_request.h"
 #include "third_party/blink/renderer/platform/geometry/int_rect.h"
 #include "third_party/blink/renderer/platform/graphics/compositor_element_id.h"
@@ -111,7 +110,6 @@
 #include "third_party/blink/renderer/platform/wtf/text/character_names.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_concatenate.h"
-#include "ui/base/cursor/cursor.h"
 
 namespace blink {
 
@@ -706,18 +704,18 @@
   DidCompleteFileChooser(*next_chooser);
 }
 
-Cursor ChromeClientImpl::LastSetCursorForTesting() const {
+ui::Cursor ChromeClientImpl::LastSetCursorForTesting() const {
   return last_set_mouse_cursor_for_testing_;
 }
 
-void ChromeClientImpl::SetCursor(const Cursor& cursor,
-                                 LocalFrame* local_frame) {
-  last_set_mouse_cursor_for_testing_ = cursor;
-  SetCursor(cursor.GetCursor(), local_frame);
-}
-
 void ChromeClientImpl::SetCursor(const ui::Cursor& cursor,
                                  LocalFrame* local_frame) {
+  last_set_mouse_cursor_for_testing_ = cursor;
+  SetCursorInternal(cursor, local_frame);
+}
+
+void ChromeClientImpl::SetCursorInternal(const ui::Cursor& cursor,
+                                         LocalFrame* local_frame) {
   if (cursor_overridden_)
     return;
 
@@ -736,7 +734,7 @@
 
 void ChromeClientImpl::SetCursorForPlugin(const ui::Cursor& cursor,
                                           LocalFrame* local_frame) {
-  SetCursor(cursor, local_frame);
+  SetCursorInternal(cursor, local_frame);
 }
 
 void ChromeClientImpl::SetCursorOverridden(bool overridden) {
diff --git a/third_party/blink/renderer/core/page/chrome_client_impl.h b/third_party/blink/renderer/core/page/chrome_client_impl.h
index be46231..e7953c1f 100644
--- a/third_party/blink/renderer/core/page/chrome_client_impl.h
+++ b/third_party/blink/renderer/core/page/chrome_client_impl.h
@@ -42,6 +42,7 @@
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/page/chrome_client.h"
 #include "third_party/blink/renderer/platform/graphics/touch_action.h"
+#include "ui/base/cursor/cursor.h"
 
 namespace ui {
 class Cursor;
@@ -158,9 +159,9 @@
       const DateTimeChooserParameters&) override;
   ExternalDateTimeChooser* GetExternalDateTimeChooserForTesting() override;
   void OpenFileChooser(LocalFrame*, scoped_refptr<FileChooser>) override;
-  void SetCursor(const Cursor&, LocalFrame*) override;
+  void SetCursor(const ui::Cursor&, LocalFrame*) override;
   void SetCursorOverridden(bool) override;
-  Cursor LastSetCursorForTesting() const override;
+  ui::Cursor LastSetCursorForTesting() const override;
   void SetEventListenerProperties(LocalFrame*,
                                   cc::EventListenerClass,
                                   cc::EventListenerProperties) override;
@@ -265,7 +266,7 @@
   viz::FrameSinkId GetFrameSinkId(LocalFrame*) override;
 
   void RequestDecode(LocalFrame*,
-                     const PaintImage&,
+                     const cc::PaintImage&,
                      base::OnceCallback<void(bool)>) override;
 
   void NotifySwapTime(LocalFrame& frame, ReportTimeCallback callback) override;
@@ -291,7 +292,7 @@
  private:
   bool IsChromeClientImpl() const override { return true; }
 
-  void SetCursor(const ui::Cursor&, LocalFrame*);
+  void SetCursorInternal(const ui::Cursor&, LocalFrame*);
 
   // Returns WebAutofillClient associated with the WebLocalFrame. This takes and
   // returns nullable.
@@ -300,7 +301,7 @@
   WebViewImpl* web_view_;  // Weak pointer.
   HeapHashSet<WeakMember<PopupOpeningObserver>> popup_opening_observers_;
   Vector<scoped_refptr<FileChooser>> file_chooser_queue_;
-  Cursor last_set_mouse_cursor_for_testing_;
+  ui::Cursor last_set_mouse_cursor_for_testing_;
   bool cursor_overridden_;
   Member<ExternalDateTimeChooser> external_date_time_chooser_;
   bool did_request_non_empty_tool_tip_;
diff --git a/third_party/blink/renderer/core/testing/internals.cc b/third_party/blink/renderer/core/testing/internals.cc
index 06a6cb9..11bc10d4 100644
--- a/third_party/blink/renderer/core/testing/internals.cc
+++ b/third_party/blink/renderer/core/testing/internals.cc
@@ -163,7 +163,6 @@
 #include "third_party/blink/renderer/platform/bindings/exception_messages.h"
 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
 #include "third_party/blink/renderer/platform/bindings/v8_throw_exception.h"
-#include "third_party/blink/renderer/platform/cursor.h"
 #include "third_party/blink/renderer/platform/geometry/int_rect.h"
 #include "third_party/blink/renderer/platform/geometry/layout_rect.h"
 #include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h"
@@ -186,6 +185,7 @@
 #include "third_party/blink/renderer/platform/wtf/dtoa.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_buffer.h"
 #include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h"
+#include "ui/base/cursor/cursor.h"
 #include "ui/base/mojom/cursor_type.mojom-blink.h"
 #include "ui/base/ui_base_features.h"
 #include "v8/include/v8.h"
@@ -2783,28 +2783,28 @@
   if (!GetFrame())
     return String();
 
-  Cursor cursor =
+  ui::Cursor cursor =
       GetFrame()->GetPage()->GetChromeClient().LastSetCursorForTesting();
 
   StringBuilder result;
   result.Append("type=");
-  result.Append(CursorTypeToString(cursor.GetType()));
-  if (cursor.GetType() == ui::mojom::blink::CursorType::kCustom) {
+  result.Append(CursorTypeToString(cursor.type()));
+  if (cursor.type() == ui::mojom::blink::CursorType::kCustom) {
     result.Append(" hotSpot=");
-    result.AppendNumber(cursor.HotSpot().X());
+    result.AppendNumber(cursor.custom_hotspot().x());
     result.Append(',');
-    result.AppendNumber(cursor.HotSpot().Y());
+    result.AppendNumber(cursor.custom_hotspot().y());
 
-    DCHECK(cursor.GetImage());
-    IntSize size = cursor.GetImage()->Size();
+    SkBitmap bitmap = cursor.custom_bitmap();
+    DCHECK(!bitmap.isNull());
     result.Append(" image=");
-    result.AppendNumber(size.Width());
+    result.AppendNumber(bitmap.width());
     result.Append('x');
-    result.AppendNumber(size.Height());
+    result.AppendNumber(bitmap.height());
   }
-  if (cursor.ImageScaleFactor() != 1) {
+  if (cursor.image_scale_factor() != 1) {
     result.Append(" scale=");
-    result.AppendNumber(cursor.ImageScaleFactor(), 8);
+    result.AppendNumber(cursor.image_scale_factor(), 8);
   }
 
   return result.ToString();
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index b136fb2..e0ad228 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -479,8 +479,8 @@
     "crypto.cc",
     "crypto.h",
     "crypto_result.h",
-    "cursor.cc",
-    "cursor.h",
+    "cursors.cc",
+    "cursors.h",
     "data_resource_helper.cc",
     "data_resource_helper.h",
     "exported/file_path_conversion.cc",
@@ -1493,17 +1493,16 @@
 
   public_deps = [
     ":blink_platform_public_deps",
+    ":platform_export",
     "//third_party/blink/renderer/platform/blob",
     "//third_party/blink/renderer/platform/heap",
     "//third_party/blink/renderer/platform/instrumentation",
     "//third_party/blink/renderer/platform/loader",
     "//third_party/blink/renderer/platform/network",
     "//third_party/blink/renderer/platform/scheduler",
-    "//ui/base/mojom:cursor_type_blink",
     "//ui/gfx",
   ]
   deps = [
-    ":platform_export",
     "//base/allocator:buildflags",
     "//cc/ipc",
     "//components/paint_preview/common",
@@ -1529,6 +1528,7 @@
     "//third_party/blink/public/common",
     "//third_party/blink/public/mojom:embedded_frame_sink_mojo_bindings_blink",
     "//third_party/blink/public/strings",
+    "//third_party/blink/renderer/platform/wtf",
     "//third_party/ced",
     "//third_party/emoji-segmenter",
     "//third_party/harfbuzz-ng:hb_scoped_util",
@@ -1537,6 +1537,7 @@
     "//third_party/webrtc_overrides:webrtc_component",
     "//third_party/zlib/google:compression_utils",
     "//ui/base/cursor",
+    "//ui/base/mojom:cursor_type_blink",
     "//ui/events/ipc",
     "//ui/gfx/geometry",
     "//ui/gfx/mojom",
diff --git a/third_party/blink/renderer/platform/cursor.cc b/third_party/blink/renderer/platform/cursor.cc
deleted file mode 100644
index b2c9487..0000000
--- a/third_party/blink/renderer/platform/cursor.cc
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "third_party/blink/renderer/platform/cursor.h"
-
-#include "third_party/blink/renderer/platform/graphics/image_orientation.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/base/cursor/cursor.h"
-
-namespace blink {
-
-IntPoint DetermineHotSpot(Image* image,
-                          bool hot_spot_specified,
-                          const IntPoint& specified_hot_spot) {
-  if (image->IsNull())
-    return IntPoint();
-
-  IntRect image_rect = image->Rect();
-
-  // Hot spot must be inside cursor rectangle.
-  if (hot_spot_specified) {
-    if (image_rect.Contains(specified_hot_spot)) {
-      return specified_hot_spot;
-    }
-
-    return IntPoint(clampTo<int>(specified_hot_spot.X(), image_rect.X(),
-                                 image_rect.MaxX() - 1),
-                    clampTo<int>(specified_hot_spot.Y(), image_rect.Y(),
-                                 image_rect.MaxY() - 1));
-  }
-
-  // If hot spot is not specified externally, it can be extracted from some
-  // image formats (e.g. .cur).
-  IntPoint intrinsic_hot_spot;
-  bool image_has_intrinsic_hot_spot = image->GetHotSpot(intrinsic_hot_spot);
-  if (image_has_intrinsic_hot_spot && image_rect.Contains(intrinsic_hot_spot))
-    return intrinsic_hot_spot;
-
-  // If neither is provided, use a default value of (0, 0).
-  return IntPoint();
-}
-
-Cursor::Cursor(Image* image, bool hot_spot_specified, const IntPoint& hot_spot)
-    : type_(ui::mojom::blink::CursorType::kCustom),
-      image_(image),
-      hot_spot_(DetermineHotSpot(image, hot_spot_specified, hot_spot)),
-      image_scale_factor_(1) {}
-
-Cursor::Cursor(Image* image,
-               bool hot_spot_specified,
-               const IntPoint& hot_spot,
-               float scale)
-    : type_(ui::mojom::blink::CursorType::kCustom),
-      image_(image),
-      hot_spot_(DetermineHotSpot(image, hot_spot_specified, hot_spot)),
-      image_scale_factor_(scale) {}
-
-Cursor::Cursor(ui::mojom::blink::CursorType type)
-    : type_(type), image_scale_factor_(1) {}
-
-Cursor::Cursor(const Cursor& other) {
-  *this = other;
-}
-
-Cursor& Cursor::operator=(const Cursor& other) {
-  type_ = other.type_;
-  image_scale_factor_ = other.image_scale_factor_;
-  if (type_ == ui::mojom::blink::CursorType::kCustom) {
-    image_ = other.image_;
-    hot_spot_ = other.hot_spot_;
-  }
-  return *this;
-}
-
-Cursor::~Cursor() = default;
-
-ui::Cursor Cursor::GetCursor() const {
-  ui::Cursor cursor(type_);
-  cursor.set_image_scale_factor(image_scale_factor_);
-  if (type_ == ui::mojom::blink::CursorType::kCustom) {
-    cursor.set_custom_bitmap(
-        image_ ? image_->AsSkBitmapForCurrentFrame(kRespectImageOrientation)
-               : SkBitmap());
-    cursor.set_custom_hotspot(hot_spot_);
-  }
-  return cursor;
-}
-
-const Cursor& PointerCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kPointer));
-  return c;
-}
-
-const Cursor& CrossCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kCross));
-  return c;
-}
-
-const Cursor& HandCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kHand));
-  return c;
-}
-
-const Cursor& MoveCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kMove));
-  return c;
-}
-
-const Cursor& VerticalTextCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kVerticalText));
-  return c;
-}
-
-const Cursor& CellCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kCell));
-  return c;
-}
-
-const Cursor& ContextMenuCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kContextMenu));
-  return c;
-}
-
-const Cursor& AliasCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kAlias));
-  return c;
-}
-
-const Cursor& ZoomInCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kZoomIn));
-  return c;
-}
-
-const Cursor& ZoomOutCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kZoomOut));
-  return c;
-}
-
-const Cursor& CopyCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kCopy));
-  return c;
-}
-
-const Cursor& NoneCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kNone));
-  return c;
-}
-
-const Cursor& ProgressCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kProgress));
-  return c;
-}
-
-const Cursor& NoDropCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kNoDrop));
-  return c;
-}
-
-const Cursor& NotAllowedCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kNotAllowed));
-  return c;
-}
-
-const Cursor& IBeamCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kIBeam));
-  return c;
-}
-
-const Cursor& WaitCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kWait));
-  return c;
-}
-
-const Cursor& HelpCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kHelp));
-  return c;
-}
-
-const Cursor& EastResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kEastResize));
-  return c;
-}
-
-const Cursor& NorthResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kNorthResize));
-  return c;
-}
-
-const Cursor& NorthEastResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kNorthEastResize));
-  return c;
-}
-
-const Cursor& NorthWestResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kNorthWestResize));
-  return c;
-}
-
-const Cursor& SouthResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kSouthResize));
-  return c;
-}
-
-const Cursor& SouthEastResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kSouthEastResize));
-  return c;
-}
-
-const Cursor& SouthWestResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kSouthWestResize));
-  return c;
-}
-
-const Cursor& WestResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kWestResize));
-  return c;
-}
-
-const Cursor& NorthSouthResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kNorthSouthResize));
-  return c;
-}
-
-const Cursor& EastWestResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kEastWestResize));
-  return c;
-}
-
-const Cursor& NorthEastSouthWestResizeCursor() {
-  DEFINE_STATIC_LOCAL(
-      Cursor, c, (ui::mojom::blink::CursorType::kNorthEastSouthWestResize));
-  return c;
-}
-
-const Cursor& NorthWestSouthEastResizeCursor() {
-  DEFINE_STATIC_LOCAL(
-      Cursor, c, (ui::mojom::blink::CursorType::kNorthWestSouthEastResize));
-  return c;
-}
-
-const Cursor& ColumnResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kColumnResize));
-  return c;
-}
-
-const Cursor& RowResizeCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kRowResize));
-  return c;
-}
-
-const Cursor& MiddlePanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kMiddlePanning));
-  return c;
-}
-
-const Cursor& MiddlePanningVerticalCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kMiddlePanningVertical));
-  return c;
-}
-
-const Cursor& MiddlePanningHorizontalCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kMiddlePanningHorizontal));
-  return c;
-}
-
-const Cursor& EastPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kEastPanning));
-  return c;
-}
-
-const Cursor& NorthPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kNorthPanning));
-  return c;
-}
-
-const Cursor& NorthEastPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kNorthEastPanning));
-  return c;
-}
-
-const Cursor& NorthWestPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kNorthWestPanning));
-  return c;
-}
-
-const Cursor& SouthPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kSouthPanning));
-  return c;
-}
-
-const Cursor& SouthEastPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kSouthEastPanning));
-  return c;
-}
-
-const Cursor& SouthWestPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c,
-                      (ui::mojom::blink::CursorType::kSouthWestPanning));
-  return c;
-}
-
-const Cursor& WestPanningCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kWestPanning));
-  return c;
-}
-
-const Cursor& GrabCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kGrab));
-  return c;
-}
-
-const Cursor& GrabbingCursor() {
-  DEFINE_STATIC_LOCAL(Cursor, c, (ui::mojom::blink::CursorType::kGrabbing));
-  return c;
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/platform/cursor.h b/third_party/blink/renderer/platform/cursor.h
deleted file mode 100644
index 1927bbb5..0000000
--- a/third_party/blink/renderer/platform/cursor.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_CURSOR_H_
-#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_CURSOR_H_
-
-#include "base/memory/scoped_refptr.h"
-#include "third_party/blink/renderer/platform/geometry/int_point.h"
-#include "third_party/blink/renderer/platform/graphics/image.h"
-#include "third_party/blink/renderer/platform/platform_export.h"
-#include "third_party/blink/renderer/platform/wtf/assertions.h"
-#include "ui/base/mojom/cursor_type.mojom-blink.h"
-
-// To avoid conflicts with the CreateWindow macro from the Windows SDK...
-#undef CopyCursor
-
-namespace ui {
-class Cursor;
-}
-
-namespace blink {
-
-class PLATFORM_EXPORT Cursor {
-  USING_FAST_MALLOC(Cursor);
-
- public:
-  Cursor()
-      // This is an invalid Cursor and should never actually get used.
-      : type_(ui::mojom::blink::CursorType::kNull) {}
-
-  Cursor(Image*, bool hot_spot_specified, const IntPoint& hot_spot);
-
-  // Hot spot is in image pixels.
-  Cursor(Image*,
-         bool hot_spot_specified,
-         const IntPoint& hot_spot,
-         float image_scale_factor);
-
-  Cursor(const Cursor&);
-  ~Cursor();
-  Cursor& operator=(const Cursor&);
-
-  explicit Cursor(ui::mojom::blink::CursorType);
-  ui::Cursor GetCursor() const;
-  ui::mojom::blink::CursorType GetType() const {
-    DCHECK_GE(type_, static_cast<ui::mojom::blink::CursorType>(0));
-    DCHECK_LE(type_, ui::mojom::blink::CursorType::kCustom);
-    return type_;
-  }
-  Image* GetImage() const { return image_.get(); }
-  const IntPoint& HotSpot() const { return hot_spot_; }
-  // Image scale in image pixels per logical (UI) pixel.
-  float ImageScaleFactor() const { return image_scale_factor_; }
-
- private:
-  ui::mojom::blink::CursorType type_;
-  scoped_refptr<Image> image_;
-  IntPoint hot_spot_;
-  float image_scale_factor_;
-};
-
-PLATFORM_EXPORT IntPoint DetermineHotSpot(Image*,
-                                          bool hot_spot_specified,
-                                          const IntPoint& specified_hot_spot);
-
-PLATFORM_EXPORT const Cursor& PointerCursor();
-PLATFORM_EXPORT const Cursor& CrossCursor();
-PLATFORM_EXPORT const Cursor& HandCursor();
-PLATFORM_EXPORT const Cursor& MoveCursor();
-PLATFORM_EXPORT const Cursor& IBeamCursor();
-PLATFORM_EXPORT const Cursor& WaitCursor();
-PLATFORM_EXPORT const Cursor& HelpCursor();
-PLATFORM_EXPORT const Cursor& EastResizeCursor();
-PLATFORM_EXPORT const Cursor& NorthResizeCursor();
-PLATFORM_EXPORT const Cursor& NorthEastResizeCursor();
-PLATFORM_EXPORT const Cursor& NorthWestResizeCursor();
-PLATFORM_EXPORT const Cursor& SouthResizeCursor();
-PLATFORM_EXPORT const Cursor& SouthEastResizeCursor();
-PLATFORM_EXPORT const Cursor& SouthWestResizeCursor();
-PLATFORM_EXPORT const Cursor& WestResizeCursor();
-PLATFORM_EXPORT const Cursor& NorthSouthResizeCursor();
-PLATFORM_EXPORT const Cursor& EastWestResizeCursor();
-PLATFORM_EXPORT const Cursor& NorthEastSouthWestResizeCursor();
-PLATFORM_EXPORT const Cursor& NorthWestSouthEastResizeCursor();
-PLATFORM_EXPORT const Cursor& ColumnResizeCursor();
-PLATFORM_EXPORT const Cursor& RowResizeCursor();
-PLATFORM_EXPORT const Cursor& MiddlePanningCursor();
-PLATFORM_EXPORT const Cursor& MiddlePanningVerticalCursor();
-PLATFORM_EXPORT const Cursor& MiddlePanningHorizontalCursor();
-PLATFORM_EXPORT const Cursor& EastPanningCursor();
-PLATFORM_EXPORT const Cursor& NorthPanningCursor();
-PLATFORM_EXPORT const Cursor& NorthEastPanningCursor();
-PLATFORM_EXPORT const Cursor& NorthWestPanningCursor();
-PLATFORM_EXPORT const Cursor& SouthPanningCursor();
-PLATFORM_EXPORT const Cursor& SouthEastPanningCursor();
-PLATFORM_EXPORT const Cursor& SouthWestPanningCursor();
-PLATFORM_EXPORT const Cursor& WestPanningCursor();
-PLATFORM_EXPORT const Cursor& VerticalTextCursor();
-PLATFORM_EXPORT const Cursor& CellCursor();
-PLATFORM_EXPORT const Cursor& ContextMenuCursor();
-PLATFORM_EXPORT const Cursor& NoDropCursor();
-PLATFORM_EXPORT const Cursor& NotAllowedCursor();
-PLATFORM_EXPORT const Cursor& ProgressCursor();
-PLATFORM_EXPORT const Cursor& AliasCursor();
-PLATFORM_EXPORT const Cursor& ZoomInCursor();
-PLATFORM_EXPORT const Cursor& ZoomOutCursor();
-PLATFORM_EXPORT const Cursor& CopyCursor();
-PLATFORM_EXPORT const Cursor& NoneCursor();
-PLATFORM_EXPORT const Cursor& GrabCursor();
-PLATFORM_EXPORT const Cursor& GrabbingCursor();
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_CURSOR_H_
diff --git a/third_party/blink/renderer/platform/cursors.cc b/third_party/blink/renderer/platform/cursors.cc
new file mode 100644
index 0000000..a3a9c9f
--- /dev/null
+++ b/third_party/blink/renderer/platform/cursors.cc
@@ -0,0 +1,290 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "third_party/blink/renderer/platform/cursors.h"
+
+#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
+#include "ui/base/cursor/cursor.h"
+#include "ui/base/mojom/cursor_type.mojom-blink.h"
+
+// To avoid conflicts with the CreateWindow macro from the Windows SDK...
+#undef CopyCursor
+
+namespace blink {
+
+const ui::Cursor& PointerCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kPointer));
+  return c;
+}
+
+const ui::Cursor& CrossCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kCross));
+  return c;
+}
+
+const ui::Cursor& HandCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kHand));
+  return c;
+}
+
+const ui::Cursor& MoveCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kMove));
+  return c;
+}
+
+const ui::Cursor& VerticalTextCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kVerticalText));
+  return c;
+}
+
+const ui::Cursor& CellCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kCell));
+  return c;
+}
+
+const ui::Cursor& ContextMenuCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kContextMenu));
+  return c;
+}
+
+const ui::Cursor& AliasCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kAlias));
+  return c;
+}
+
+const ui::Cursor& ZoomInCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kZoomIn));
+  return c;
+}
+
+const ui::Cursor& ZoomOutCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kZoomOut));
+  return c;
+}
+
+const ui::Cursor& CopyCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kCopy));
+  return c;
+}
+
+const ui::Cursor& NoneCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kNone));
+  return c;
+}
+
+const ui::Cursor& ProgressCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kProgress));
+  return c;
+}
+
+const ui::Cursor& NoDropCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kNoDrop));
+  return c;
+}
+
+const ui::Cursor& NotAllowedCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNotAllowed));
+  return c;
+}
+
+const ui::Cursor& IBeamCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kIBeam));
+  return c;
+}
+
+const ui::Cursor& WaitCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kWait));
+  return c;
+}
+
+const ui::Cursor& HelpCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kHelp));
+  return c;
+}
+
+const ui::Cursor& EastResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kEastResize));
+  return c;
+}
+
+const ui::Cursor& NorthResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNorthResize));
+  return c;
+}
+
+const ui::Cursor& NorthEastResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNorthEastResize));
+  return c;
+}
+
+const ui::Cursor& NorthWestResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNorthWestResize));
+  return c;
+}
+
+const ui::Cursor& SouthResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kSouthResize));
+  return c;
+}
+
+const ui::Cursor& SouthEastResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kSouthEastResize));
+  return c;
+}
+
+const ui::Cursor& SouthWestResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kSouthWestResize));
+  return c;
+}
+
+const ui::Cursor& WestResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kWestResize));
+  return c;
+}
+
+const ui::Cursor& NorthSouthResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNorthSouthResize));
+  return c;
+}
+
+const ui::Cursor& EastWestResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kEastWestResize));
+  return c;
+}
+
+const ui::Cursor& NorthEastSouthWestResizeCursor() {
+  DEFINE_STATIC_LOCAL(
+      ui::Cursor, c, (ui::mojom::blink::CursorType::kNorthEastSouthWestResize));
+  return c;
+}
+
+const ui::Cursor& NorthWestSouthEastResizeCursor() {
+  DEFINE_STATIC_LOCAL(
+      ui::Cursor, c, (ui::mojom::blink::CursorType::kNorthWestSouthEastResize));
+  return c;
+}
+
+const ui::Cursor& ColumnResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kColumnResize));
+  return c;
+}
+
+const ui::Cursor& RowResizeCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kRowResize));
+  return c;
+}
+
+const ui::Cursor& MiddlePanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kMiddlePanning));
+  return c;
+}
+
+const ui::Cursor& MiddlePanningVerticalCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kMiddlePanningVertical));
+  return c;
+}
+
+const ui::Cursor& MiddlePanningHorizontalCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kMiddlePanningHorizontal));
+  return c;
+}
+
+const ui::Cursor& EastPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kEastPanning));
+  return c;
+}
+
+const ui::Cursor& NorthPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNorthPanning));
+  return c;
+}
+
+const ui::Cursor& NorthEastPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNorthEastPanning));
+  return c;
+}
+
+const ui::Cursor& NorthWestPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kNorthWestPanning));
+  return c;
+}
+
+const ui::Cursor& SouthPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kSouthPanning));
+  return c;
+}
+
+const ui::Cursor& SouthEastPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kSouthEastPanning));
+  return c;
+}
+
+const ui::Cursor& SouthWestPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kSouthWestPanning));
+  return c;
+}
+
+const ui::Cursor& WestPanningCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c,
+                      (ui::mojom::blink::CursorType::kWestPanning));
+  return c;
+}
+
+const ui::Cursor& GrabCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kGrab));
+  return c;
+}
+
+const ui::Cursor& GrabbingCursor() {
+  DEFINE_STATIC_LOCAL(ui::Cursor, c, (ui::mojom::blink::CursorType::kGrabbing));
+  return c;
+}
+
+}  // namespace blink
diff --git a/third_party/blink/renderer/platform/cursors.h b/third_party/blink/renderer/platform/cursors.h
new file mode 100644
index 0000000..8cfba61
--- /dev/null
+++ b/third_party/blink/renderer/platform/cursors.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_CURSORS_H_
+#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_CURSORS_H_
+
+#include "third_party/blink/renderer/platform/platform_export.h"
+
+// To avoid conflicts with the CreateWindow macro from the Windows SDK...
+#undef CopyCursor
+
+namespace ui {
+class Cursor;
+}
+
+namespace blink {
+
+PLATFORM_EXPORT const ui::Cursor& PointerCursor();
+PLATFORM_EXPORT const ui::Cursor& CrossCursor();
+PLATFORM_EXPORT const ui::Cursor& HandCursor();
+PLATFORM_EXPORT const ui::Cursor& MoveCursor();
+PLATFORM_EXPORT const ui::Cursor& IBeamCursor();
+PLATFORM_EXPORT const ui::Cursor& WaitCursor();
+PLATFORM_EXPORT const ui::Cursor& HelpCursor();
+PLATFORM_EXPORT const ui::Cursor& EastResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthEastResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthWestResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& SouthResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& SouthEastResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& SouthWestResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& WestResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthSouthResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& EastWestResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthEastSouthWestResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthWestSouthEastResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& ColumnResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& RowResizeCursor();
+PLATFORM_EXPORT const ui::Cursor& MiddlePanningCursor();
+PLATFORM_EXPORT const ui::Cursor& MiddlePanningVerticalCursor();
+PLATFORM_EXPORT const ui::Cursor& MiddlePanningHorizontalCursor();
+PLATFORM_EXPORT const ui::Cursor& EastPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthEastPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& NorthWestPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& SouthPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& SouthEastPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& SouthWestPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& WestPanningCursor();
+PLATFORM_EXPORT const ui::Cursor& VerticalTextCursor();
+PLATFORM_EXPORT const ui::Cursor& CellCursor();
+PLATFORM_EXPORT const ui::Cursor& ContextMenuCursor();
+PLATFORM_EXPORT const ui::Cursor& NoDropCursor();
+PLATFORM_EXPORT const ui::Cursor& NotAllowedCursor();
+PLATFORM_EXPORT const ui::Cursor& ProgressCursor();
+PLATFORM_EXPORT const ui::Cursor& AliasCursor();
+PLATFORM_EXPORT const ui::Cursor& ZoomInCursor();
+PLATFORM_EXPORT const ui::Cursor& ZoomOutCursor();
+PLATFORM_EXPORT const ui::Cursor& CopyCursor();
+PLATFORM_EXPORT const ui::Cursor& NoneCursor();
+PLATFORM_EXPORT const ui::Cursor& GrabCursor();
+PLATFORM_EXPORT const ui::Cursor& GrabbingCursor();
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_CURSORS_H_