Reject unusable cursor density and oversized raster requests

This commit is contained in:
fufesou
2026-09-13 23:17:40 +08:00
parent fbfa37c8fd
commit c02f17212a
4 changed files with 256 additions and 14 deletions

View File

@@ -109,6 +109,7 @@ MouseCursor buildCursorOfCache(
// A short-edge minimum can enlarge thin artwork beyond CSS cursor limits.
// Keep unzoomed images unchanged and use the long edge when resizing.
final key = cache.updateGetKey(scale, useLegacyMinimum: scale == 1.0);
if (key == null) return MouseCursor.defer;
if (!cursor.cachedKeys.contains(key)) {
// data should be checked here, because it may be changed after `updateGetKey()`
final data = cache.data;