Return a valid NSScroller preferredScrollerStyle

The unimplemented method returned whatever was left in a register.
Chromium forwards the style to its renderer, which rejected the
out-of-range value (VALIDATION_ERROR_DESERIALIZATION_FAILED) and left
the Riot Client window black. Report NSScrollerStyleLegacy, as macOS
does without a trackpad.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ztancrellandClaude Opus 5.5 committed 2026-10-17 08:20:34 -04:00
1 parent e490e2e353
commit e4fd017e1f
1 file changed
+16
+16
View File
@@ -1127,6 +1127,22 @@ index 5ca58772..54b60ef5 100644
}
@end
diff --git a/AppKit/NSScroller.m b/AppKit/NSScroller.m
index 6c361fa3..55027e7e 100644
--- a/AppKit/NSScroller.m
+++ b/AppKit/NSScroller.m
@@ -34,8 +34,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
return [[NSDisplay currentDisplay] scrollerWidth];
}
+// Chromium forwards this to its renderer, which rejects an out-of-range value and leaves
+// the Riot Client black; macOS reports legacy scrollers when no trackpad is attached.
+ (NSScrollerStyle) preferredScrollerStyle {
- NSUnimplementedMethod();
+ return NSScrollerStyleLegacy;
}
/* OS X has a global default "AppleScrollBarVariant" with the values: Single,
DoubleMin, DoubleMax, and DoubleBoth This controls the default position of the
diff --git a/AppKit/NSScrubberItemView.m b/AppKit/NSScrubberItemView.m
index dea5e1d3..7b3a877b 100644
--- a/AppKit/NSScrubberItemView.m