Title: [288782] trunk/Source/WebKit
- Revision
- 288782
- Author
- [email protected]
- Date
- 2022-01-28 20:22:39 -0800 (Fri, 28 Jan 2022)
Log Message
Implement CSS overscroll-behavior for iOS
https://bugs.webkit.org/show_bug.cgi?id=233788
Reviewed by Simon Fraser.
Add setting of ScrollView parameters based on overscroll-behavior values.
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (288781 => 288782)
--- trunk/Source/WebKit/ChangeLog 2022-01-29 03:29:55 UTC (rev 288781)
+++ trunk/Source/WebKit/ChangeLog 2022-01-29 04:22:39 UTC (rev 288782)
@@ -1,3 +1,15 @@
+2022-01-28 Nikolaos Mouchtaris <[email protected]>
+
+ Implement CSS overscroll-behavior for iOS
+ https://bugs.webkit.org/show_bug.cgi?id=233788
+
+ Reviewed by Simon Fraser.
+
+ Add setting of ScrollView parameters based on overscroll-behavior values.
+
+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
+ (WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):
+
2022-01-28 Per Arne Vollan <[email protected]>
[macOS][WP] Temporarily add syscall to sandbox
Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (288781 => 288782)
--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm 2022-01-29 03:29:55 UTC (rev 288781)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm 2022-01-29 04:22:39 UTC (rev 288782)
@@ -230,7 +230,8 @@
|| scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::TotalContentsSize)
|| scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ReachableContentsSize)
|| scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrollPosition)
- || scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrollOrigin)) {
+ || scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrollOrigin)
+ || scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrollableAreaParams)) {
BEGIN_BLOCK_OBJC_EXCEPTIONS
UIScrollView *scrollView = this->scrollView();
if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrollContainerLayer)) {
@@ -251,7 +252,15 @@
scrollView.contentSize = scrollingStateNode.reachableContentsSize();
recomputeInsets = true;
}
-
+#if HAVE(UIKIT_OVERSCROLL_BEHAVIOR_SUPPORT)
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrollableAreaParams)) {
+ auto params = scrollingStateNode.scrollableAreaParameters();
+ scrollView.bouncesHorizontally = params.horizontalOverscrollBehavior != OverscrollBehavior::None;
+ scrollView.bouncesVertically = params.verticalOverscrollBehavior != OverscrollBehavior::None;
+ scrollView._allowsParentToBeginHorizontally = params.horizontalOverscrollBehavior == OverscrollBehavior::Auto;
+ scrollView._allowsParentToBeginVertically = params.verticalOverscrollBehavior == OverscrollBehavior::Auto;
+ }
+#endif
if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrollOrigin))
recomputeInsets = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes