summaryrefslogtreecommitdiff
path: root/chromium/content
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content')
-rw-r--r--chromium/content/common/cursors/webcursor.cc11
-rw-r--r--chromium/content/common/cursors/webcursor_mac.mm1
2 files changed, 7 insertions, 5 deletions
diff --git a/chromium/content/common/cursors/webcursor.cc b/chromium/content/common/cursors/webcursor.cc
index c8b6b9d3f75..b6e0d02879c 100644
--- a/chromium/content/common/cursors/webcursor.cc
+++ b/chromium/content/common/cursors/webcursor.cc
@@ -22,16 +22,17 @@ WebCursor::WebCursor(const ui::Cursor& cursor) {
WebCursor::WebCursor(const WebCursor& other) = default;
bool WebCursor::SetCursor(const ui::Cursor& cursor) {
- static constexpr int kMaxSize = 1024;
+ // This value matches kMaximumCursorSize from Blink's EventHandler.
+ static constexpr int kMaximumCursorSize = 128;
if (cursor.image_scale_factor() < 0.01f ||
cursor.image_scale_factor() > 100.f ||
(cursor.type() == ui::mojom::CursorType::kCustom &&
- (cursor.custom_bitmap().width() > kMaxSize ||
- cursor.custom_bitmap().height() > kMaxSize ||
+ (cursor.custom_bitmap().width() > kMaximumCursorSize ||
+ cursor.custom_bitmap().height() > kMaximumCursorSize ||
cursor.custom_bitmap().width() / cursor.image_scale_factor() >
- kMaxSize ||
+ kMaximumCursorSize ||
cursor.custom_bitmap().height() / cursor.image_scale_factor() >
- kMaxSize))) {
+ kMaximumCursorSize))) {
return false;
}
diff --git a/chromium/content/common/cursors/webcursor_mac.mm b/chromium/content/common/cursors/webcursor_mac.mm
index f85c421f858..fdc70bdff2d 100644
--- a/chromium/content/common/cursors/webcursor_mac.mm
+++ b/chromium/content/common/cursors/webcursor_mac.mm
@@ -265,6 +265,7 @@ gfx::NativeCursor WebCursor::GetNativeCursor() {
case ui::mojom::CursorType::kCustom:
return CreateCustomCursor(cursor_);
case ui::mojom::CursorType::kNull:
+ return [NSCursor arrowCursor];
case ui::mojom::CursorType::kDndNone:
case ui::mojom::CursorType::kDndMove:
case ui::mojom::CursorType::kDndCopy: