Title: [246818] trunk/Source/WebCore
- Revision
- 246818
- Author
- [email protected]
- Date
- 2019-06-25 16:42:03 -0700 (Tue, 25 Jun 2019)
Log Message
Clicking the up/down spin buttons for a number input increments/decrements by 2.
https://bugs.webkit.org/show_bug.cgi?id=198809
Reviewed by Tim Horton.
AppKit no longer registers NSScrollerButtonDelay and NSScrollerButtonPeriod in the base
NSUserDefaults for an app. This caused our use to always get 0s when setting the click
and hold timer, causing the value to increment quickly for a single press.
* platform/mac/ScrollbarThemeMac.h:
(WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Added. Hardcode 500ms.
(WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Added. Hardcode 50ms.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::preferencesChanged): Removed use of old user defaults.
(WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Deleted.
(WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246817 => 246818)
--- trunk/Source/WebCore/ChangeLog 2019-06-25 23:41:31 UTC (rev 246817)
+++ trunk/Source/WebCore/ChangeLog 2019-06-25 23:42:03 UTC (rev 246818)
@@ -1,3 +1,22 @@
+2019-06-25 Timothy Hatcher <[email protected]>
+
+ Clicking the up/down spin buttons for a number input increments/decrements by 2.
+ https://bugs.webkit.org/show_bug.cgi?id=198809
+
+ Reviewed by Tim Horton.
+
+ AppKit no longer registers NSScrollerButtonDelay and NSScrollerButtonPeriod in the base
+ NSUserDefaults for an app. This caused our use to always get 0s when setting the click
+ and hold timer, causing the value to increment quickly for a single press.
+
+ * platform/mac/ScrollbarThemeMac.h:
+ (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Added. Hardcode 500ms.
+ (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Added. Hardcode 50ms.
+ * platform/mac/ScrollbarThemeMac.mm:
+ (WebCore::ScrollbarThemeMac::preferencesChanged): Removed use of old user defaults.
+ (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Deleted.
+ (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Deleted.
+
2019-06-25 Keith Miller <[email protected]>
Unreviewed, windows build fix.
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h (246817 => 246818)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h 2019-06-25 23:41:31 UTC (rev 246817)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h 2019-06-25 23:42:03 UTC (rev 246818)
@@ -52,8 +52,8 @@
void usesOverlayScrollbarsChanged() override;
void updateScrollbarOverlayStyle(Scrollbar&) override;
- Seconds initialAutoscrollTimerDelay() override;
- Seconds autoscrollTimerDelay() override;
+ Seconds initialAutoscrollTimerDelay() override { return 500_ms; }
+ Seconds autoscrollTimerDelay() override { return 50_ms; }
ScrollbarButtonsPlacement buttonsPlacement() const override;
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (246817 => 246818)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2019-06-25 23:41:31 UTC (rev 246817)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2019-06-25 23:42:03 UTC (rev 246818)
@@ -136,8 +136,6 @@
static const int cOuterButtonLength[] = { 16, 14 }; // The outer button in a double button pair is a bit bigger.
static const int cOuterButtonOverlap = 2;
-static Seconds gInitialButtonDelay { 500_ms };
-static Seconds gAutoscrollButtonDelay { 50_ms };
static bool gJumpOnTrackClick = false;
static bool gUsesOverlayScrollbars = false;
@@ -240,8 +238,6 @@
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults synchronize];
- gInitialButtonDelay = Seconds { [defaults floatForKey:@"NSScrollerButtonDelay"] };
- gAutoscrollButtonDelay = Seconds { [defaults floatForKey:@"NSScrollerButtonPeriod"] };
gJumpOnTrackClick = [defaults boolForKey:@"AppleScrollerPagingBehavior"];
usesOverlayScrollbarsChanged();
}
@@ -283,16 +279,6 @@
END_BLOCK_OBJC_EXCEPTIONS;
}
-Seconds ScrollbarThemeMac::initialAutoscrollTimerDelay()
-{
- return gInitialButtonDelay;
-}
-
-Seconds ScrollbarThemeMac::autoscrollTimerDelay()
-{
- return gAutoscrollButtonDelay;
-}
-
ScrollbarButtonsPlacement ScrollbarThemeMac::buttonsPlacement() const
{
return gButtonPlacement;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes