Diff
Modified: trunk/Source/WTF/ChangeLog (282875 => 282876)
--- trunk/Source/WTF/ChangeLog 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WTF/ChangeLog 2021-09-22 15:03:05 UTC (rev 282876)
@@ -1,3 +1,17 @@
+2021-09-22 Simon Fraser <simon.fra...@apple.com>
+
+ Remove ENABLE(SMOOTH_SCROLLING)
+ https://bugs.webkit.org/show_bug.cgi?id=230587
+
+ Reviewed by Tim Horton.
+
+ ENABLE(SMOOTH_SCROLLING) was always enabled on macOS, so remove it. The pref defaults
+ to true on macOS, and false elsewhere.
+
+ * Scripts/Preferences/WebPreferences.yaml:
+ * wtf/PlatformEnable.h:
+ * wtf/PlatformEnableCocoa.h:
+
2021-09-21 Simon Fraser <simon.fra...@apple.com>
Change from ENABLE(RUBBER_BANDING) to HAVE(RUBBER_BANDING)
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (282875 => 282876)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2021-09-22 15:03:05 UTC (rev 282876)
@@ -1889,14 +1889,16 @@
ScrollAnimatorEnabled:
type: bool
- condition: ENABLE(SMOOTH_SCROLLING)
defaultValue:
WebKitLegacy:
- default: true
+ "PLATFORM(MAC)": true
+ default: false
WebKit:
- default: true
+ "PLATFORM(MAC)": true
+ default: false
WebCore:
- default: true
+ "PLATFORM(MAC)": true
+ default: false
# FIXME: This is handled via WebView SPI rather than WebPreferences for WebKitLegacy. We should change the SPI to lookup the WebPreferences value instead.
SelectTrailingWhitespaceEnabled:
Modified: trunk/Source/WTF/wtf/PlatformEnable.h (282875 => 282876)
--- trunk/Source/WTF/wtf/PlatformEnable.h 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WTF/wtf/PlatformEnable.h 2021-09-22 15:03:05 UTC (rev 282876)
@@ -453,10 +453,6 @@
#define ENABLE_SEPARATED_WX_HEAP 0
#endif
-#if !defined(ENABLE_SMOOTH_SCROLLING)
-#define ENABLE_SMOOTH_SCROLLING 0
-#endif
-
#if !defined(ENABLE_SPEECH_SYNTHESIS)
#define ENABLE_SPEECH_SYNTHESIS 0
#endif
Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (282875 => 282876)
--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2021-09-22 15:03:05 UTC (rev 282876)
@@ -530,10 +530,6 @@
#define ENABLE_SIGILL_CRASH_ANALYZER 1
#endif
-#if !defined(ENABLE_SMOOTH_SCROLLING) && PLATFORM(MAC)
-#define ENABLE_SMOOTH_SCROLLING 1
-#endif
-
// FIXME: Should this be enabled for watchOS and tvOS?
#if !defined(ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION) && !PLATFORM(MAC) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
#define ENABLE_TAKE_UNBOUNDED_NETWORKING_ASSERTION 1
Modified: trunk/Source/WebCore/ChangeLog (282875 => 282876)
--- trunk/Source/WebCore/ChangeLog 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/ChangeLog 2021-09-22 15:03:05 UTC (rev 282876)
@@ -1,3 +1,23 @@
+2021-09-22 Simon Fraser <simon.fra...@apple.com>
+
+ Remove ENABLE(SMOOTH_SCROLLING)
+ https://bugs.webkit.org/show_bug.cgi?id=230587
+
+ Reviewed by Tim Horton.
+
+ ENABLE(SMOOTH_SCROLLING) was always enabled on macOS, so remove it. The pref defaults
+ to true on macOS, and false elsewhere.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollAnimatorEnabled const):
+ * page/scrolling/AsyncScrollingCoordinator.cpp:
+ (WebCore::AsyncScrollingCoordinator::scrollAnimatorEnabled const):
+ * page/scrolling/AsyncScrollingCoordinator.h:
+ * page/scrolling/ThreadedScrollingTree.cpp:
+ (WebCore::ThreadedScrollingTree::ThreadedScrollingTree):
+ * platform/mac/ScrollAnimatorMac.h:
+ * platform/mac/ScrollAnimatorMac.mm:
+
2021-09-22 Alan Bujtas <za...@apple.com>
[LFC][Integration] FlowHasTextSecurity FlowHasJustifiedNonBreakingSpace are unused
Modified: trunk/Source/WebCore/page/FrameView.cpp (282875 => 282876)
--- trunk/Source/WebCore/page/FrameView.cpp 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/page/FrameView.cpp 2021-09-22 15:03:05 UTC (rev 282876)
@@ -3997,10 +3997,8 @@
bool FrameView::scrollAnimatorEnabled() const
{
-#if ENABLE(SMOOTH_SCROLLING)
- if (Page* page = frame().page())
+ if (auto* page = frame().page())
return page->settings().scrollAnimatorEnabled();
-#endif
return false;
}
Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (282875 => 282876)
--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2021-09-22 15:03:05 UTC (rev 282876)
@@ -915,7 +915,6 @@
m_page->performanceLoggingClient()->logScrollingEvent(PerformanceLoggingClient::ScrollingEvent::SwitchedScrollingMode, timestamp, reasons.toRaw());
}
-#if ENABLE(SMOOTH_SCROLLING)
bool AsyncScrollingCoordinator::scrollAnimatorEnabled() const
{
ASSERT(isMainThread());
@@ -922,7 +921,6 @@
auto& settings = m_page->mainFrame().settings();
return settings.scrollAnimatorEnabled();
}
-#endif
} // namespace WebCore
Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h (282875 => 282876)
--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h 2021-09-22 15:03:05 UTC (rev 282876)
@@ -69,9 +69,7 @@
void reportExposedUnfilledArea(MonotonicTime, unsigned unfilledArea);
void reportSynchronousScrollingReasonsChanged(MonotonicTime, OptionSet<SynchronousScrollingReason>);
-#if ENABLE(SMOOTH_SCROLLING)
bool scrollAnimatorEnabled() const;
-#endif
protected:
WEBCORE_EXPORT AsyncScrollingCoordinator(Page*);
Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (282875 => 282876)
--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp 2021-09-22 15:03:05 UTC (rev 282876)
@@ -46,9 +46,7 @@
ThreadedScrollingTree::ThreadedScrollingTree(AsyncScrollingCoordinator& scrollingCoordinator)
: m_scrollingCoordinator(&scrollingCoordinator)
-#if ENABLE(SMOOTH_SCROLLING)
, m_scrollAnimatorEnabled(scrollingCoordinator.scrollAnimatorEnabled())
-#endif
{
}
Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (282875 => 282876)
--- trunk/Source/WebCore/platform/ScrollAnimator.cpp 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp 2021-09-22 15:03:05 UTC (rev 282876)
@@ -86,7 +86,6 @@
return scroll(VerticalScrollbar, granularity, newDelta.height(), 1.0, behavior);
}
-#if ENABLE(SMOOTH_SCROLLING) && !PLATFORM(IOS_FAMILY)
if (m_scrollableArea.scrollAnimatorEnabled() && platformAllowsScrollAnimation() && !behavior.contains(ScrollBehavior::NeverAnimate)) {
auto startOffset = offsetFromPosition(m_currentPosition);
auto extents = scrollExtents();
@@ -93,7 +92,6 @@
auto destinationOffset = (startOffset + delta).constrainedBetween(extents.minimumScrollOffset(), extents.maximumScrollOffset());
return m_scrollAnimation->startAnimatedScrollToDestination(startOffset, destinationOffset);
}
-#endif
return scrollToPositionWithoutAnimation(currentPosition() + delta);
}
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h (282875 => 282876)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h 2021-09-22 15:03:05 UTC (rev 282876)
@@ -26,7 +26,7 @@
#pragma once
-#if ENABLE(SMOOTH_SCROLLING)
+#if PLATFORM(MAC)
#include "FloatPoint.h"
#include "FloatSize.h"
@@ -78,5 +78,4 @@
} // namespace WebCore
-#endif // ENABLE(SMOOTH_SCROLLING)
-
+#endif // PLATFORM(MAC)
Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (282875 => 282876)
--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2021-09-22 15:03:05 UTC (rev 282876)
@@ -26,7 +26,7 @@
#import "config.h"
#import "ScrollAnimatorMac.h"
-#if ENABLE(SMOOTH_SCROLLING)
+#if PLATFORM(MAC)
#import "Gradient.h"
#import "GraphicsLayer.h"
@@ -288,4 +288,4 @@
} // namespace WebCore
-#endif // ENABLE(SMOOTH_SCROLLING)
+#endif // PLATFORM(MAC)
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (282875 => 282876)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2021-09-22 14:52:57 UTC (rev 282875)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2021-09-22 15:03:05 UTC (rev 282876)
@@ -34,7 +34,6 @@
#import "LocalCurrentGraphicsContext.h"
#import "NSScrollerImpDetails.h"
#import "PlatformMouseEvent.h"
-#import "ScrollAnimatorMac.h"
#import "ScrollView.h"
#import <Carbon/Carbon.h>
#import <pal/spi/cg/CoreGraphicsSPI.h>