<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[286716] branches/safari-612.4.2.1-branch/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/286716">286716</a></dd>
<dt>Author</dt> <dd>alancoon@apple.com</dd>
<dt>Date</dt> <dd>2021-12-08 13:25:30 -0800 (Wed, 08 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/283353">r283353</a>. rdar://problem/85928816

    Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
    https://bugs.webkit.org/show_bug.cgi?id=231037

    Reviewed by Tim Horton.

    Source/WebCore:

    Export edgePinnedState().

    * platform/ScrollableArea.h:

    Source/WebKit:

    Use RectEdges<bool> in code that tracks rubber banding state, and edge pinned state.

    * Shared/WebCoreArgumentCoders.cpp:
    (IPC::ArgumentCoder<RectEdges<bool>>::encode):
    (IPC::ArgumentCoder<RectEdges<bool>>::decode):
    * Shared/WebCoreArgumentCoders.h:
    * UIProcess/API/C/WKPage.cpp:
    (WKPageIsPinnedToLeftSide):
    (WKPageIsPinnedToRightSide):
    (WKPageIsPinnedToTopSide):
    (WKPageIsPinnedToBottomSide):
    (WKPageRubberBandsAtLeft):
    (WKPageRubberBandsAtRight):
    (WKPageRubberBandsAtTop):
    (WKPageRubberBandsAtBottom):
    * UIProcess/Cocoa/WebViewImpl.mm:
    (WebKit::toWKRectEdge):
    (WebKit::toRectEdges):
    (WebKit::WebViewImpl::pinnedState):
    (WebKit::WebViewImpl::rubberBandingEnabled):
    (WebKit::WebViewImpl::setRubberBandingEnabled):
    * UIProcess/ViewGestureController.cpp:
    (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::sendWheelEvent):
    (WebKit::WebPageProxy::setRubberBandsAtLeft):
    (WebKit::WebPageProxy::setRubberBandsAtRight):
    (WebKit::WebPageProxy::setRubberBandsAtTop):
    (WebKit::WebPageProxy::setRubberBandsAtBottom):
    (WebKit::WebPageProxy::didCommitLoadForFrame):
    (WebKit::WebPageProxy::resetState):
    (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
    (WebKit::WebPageProxy::rubberBandsAtLeft const): Deleted.
    (WebKit::WebPageProxy::rubberBandsAtRight const): Deleted.
    (WebKit::WebPageProxy::rubberBandsAtTop const): Deleted.
    (WebKit::WebPageProxy::rubberBandsAtBottom const): Deleted.
    * UIProcess/WebPageProxy.h:
    * UIProcess/WebPageProxy.messages.in:
    * WebProcess/WebPage/EventDispatcher.cpp:
    (WebKit::EventDispatcher::wheelEvent):
    * WebProcess/WebPage/EventDispatcher.h:
    * WebProcess/WebPage/EventDispatcher.messages.in:
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
    * WebProcess/WebPage/WebPage.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283353 268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari612421branchSourceWebCoreChangeLog">branches/safari-612.4.2.1-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari612421branchSourceWebCoreplatformScrollableAreah">branches/safari-612.4.2.1-branch/Source/WebCore/platform/ScrollableArea.h</a></li>
<li><a href="#branchessafari612421branchSourceWebKitChangeLog">branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog</a></li>
<li><a href="#branchessafari612421branchSourceWebKitSharedWebCoreArgumentCoderscpp">branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#branchessafari612421branchSourceWebKitSharedWebCoreArgumentCodersh">branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#branchessafari612421branchSourceWebKitUIProcessAPICWKPagecpp">branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#branchessafari612421branchSourceWebKitUIProcessCocoaWebViewImplmm">branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#branchessafari612421branchSourceWebKitUIProcessViewGestureControllercpp">branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/ViewGestureController.cpp</a></li>
<li><a href="#branchessafari612421branchSourceWebKitUIProcessWebPageProxycpp">branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#branchessafari612421branchSourceWebKitUIProcessWebPageProxyh">branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari612421branchSourceWebKitUIProcessWebPageProxymessagesin">branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari612421branchSourceWebKitWebProcessWebPageEventDispatchercpp">branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp</a></li>
<li><a href="#branchessafari612421branchSourceWebKitWebProcessWebPageEventDispatcherh">branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.h</a></li>
<li><a href="#branchessafari612421branchSourceWebKitWebProcessWebPageEventDispatchermessagesin">branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in</a></li>
<li><a href="#branchessafari612421branchSourceWebKitWebProcessWebPageWebPagecpp">branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#branchessafari612421branchSourceWebKitWebProcessWebPageWebPageh">branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari612421branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebCore/ChangeLog (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebCore/ChangeLog        2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebCore/ChangeLog   2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -1,5 +1,81 @@
</span><span class="cx"> 2021-12-01  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><ins>+        Cherry-pick r283353. rdar://problem/85928816
+
+    Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
+    https://bugs.webkit.org/show_bug.cgi?id=231037
+    
+    Reviewed by Tim Horton.
+    
+    Source/WebCore:
+    
+    Export edgePinnedState().
+    
+    * platform/ScrollableArea.h:
+    
+    Source/WebKit:
+    
+    Use RectEdges<bool> in code that tracks rubber banding state, and edge pinned state.
+    
+    * Shared/WebCoreArgumentCoders.cpp:
+    (IPC::ArgumentCoder<RectEdges<bool>>::encode):
+    (IPC::ArgumentCoder<RectEdges<bool>>::decode):
+    * Shared/WebCoreArgumentCoders.h:
+    * UIProcess/API/C/WKPage.cpp:
+    (WKPageIsPinnedToLeftSide):
+    (WKPageIsPinnedToRightSide):
+    (WKPageIsPinnedToTopSide):
+    (WKPageIsPinnedToBottomSide):
+    (WKPageRubberBandsAtLeft):
+    (WKPageRubberBandsAtRight):
+    (WKPageRubberBandsAtTop):
+    (WKPageRubberBandsAtBottom):
+    * UIProcess/Cocoa/WebViewImpl.mm:
+    (WebKit::toWKRectEdge):
+    (WebKit::toRectEdges):
+    (WebKit::WebViewImpl::pinnedState):
+    (WebKit::WebViewImpl::rubberBandingEnabled):
+    (WebKit::WebViewImpl::setRubberBandingEnabled):
+    * UIProcess/ViewGestureController.cpp:
+    (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
+    * UIProcess/WebPageProxy.cpp:
+    (WebKit::WebPageProxy::sendWheelEvent):
+    (WebKit::WebPageProxy::setRubberBandsAtLeft):
+    (WebKit::WebPageProxy::setRubberBandsAtRight):
+    (WebKit::WebPageProxy::setRubberBandsAtTop):
+    (WebKit::WebPageProxy::setRubberBandsAtBottom):
+    (WebKit::WebPageProxy::didCommitLoadForFrame):
+    (WebKit::WebPageProxy::resetState):
+    (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
+    (WebKit::WebPageProxy::rubberBandsAtLeft const): Deleted.
+    (WebKit::WebPageProxy::rubberBandsAtRight const): Deleted.
+    (WebKit::WebPageProxy::rubberBandsAtTop const): Deleted.
+    (WebKit::WebPageProxy::rubberBandsAtBottom const): Deleted.
+    * UIProcess/WebPageProxy.h:
+    * UIProcess/WebPageProxy.messages.in:
+    * WebProcess/WebPage/EventDispatcher.cpp:
+    (WebKit::EventDispatcher::wheelEvent):
+    * WebProcess/WebPage/EventDispatcher.h:
+    * WebProcess/WebPage/EventDispatcher.messages.in:
+    * WebProcess/WebPage/WebPage.cpp:
+    (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
+    * WebProcess/WebPage/WebPage.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-30  Simon Fraser  <simon.fraser@apple.com>
+
+            Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
+            https://bugs.webkit.org/show_bug.cgi?id=231037
+
+            Reviewed by Tim Horton.
+
+            Export edgePinnedState().
+
+            * platform/ScrollableArea.h:
+
+2021-12-01  Alan Coon  <alancoon@apple.com>
+
</ins><span class="cx">         Cherry-pick r286270. rdar://problem/85928816
</span><span class="cx"> 
</span><span class="cx">     Plumb raw platform scrolling deltas along in wheel events
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebCore/platform/ScrollableArea.h (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebCore/platform/ScrollableArea.h        2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebCore/platform/ScrollableArea.h   2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -318,7 +318,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool isPinnedForScrollDeltaOnAxis(float scrollDelta, ScrollEventAxis) const;
</span><span class="cx">     bool isPinnedForScrollDelta(const FloatSize&) const;
</span><del>-    RectEdges<bool> edgePinnedState() const;
</del><ins>+    WEBCORE_EXPORT RectEdges<bool> edgePinnedState() const;
</ins><span class="cx"> 
</span><span class="cx">     // True if scrolling happens by moving compositing layers.
</span><span class="cx">     virtual bool usesCompositedScrolling() const { return false; }
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog 2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog    2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -1,5 +1,123 @@
</span><span class="cx"> 2021-12-01  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><ins>+        Cherry-pick r283353. rdar://problem/85928816
+
+    Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
+    https://bugs.webkit.org/show_bug.cgi?id=231037
+    
+    Reviewed by Tim Horton.
+    
+    Source/WebCore:
+    
+    Export edgePinnedState().
+    
+    * platform/ScrollableArea.h:
+    
+    Source/WebKit:
+    
+    Use RectEdges<bool> in code that tracks rubber banding state, and edge pinned state.
+    
+    * Shared/WebCoreArgumentCoders.cpp:
+    (IPC::ArgumentCoder<RectEdges<bool>>::encode):
+    (IPC::ArgumentCoder<RectEdges<bool>>::decode):
+    * Shared/WebCoreArgumentCoders.h:
+    * UIProcess/API/C/WKPage.cpp:
+    (WKPageIsPinnedToLeftSide):
+    (WKPageIsPinnedToRightSide):
+    (WKPageIsPinnedToTopSide):
+    (WKPageIsPinnedToBottomSide):
+    (WKPageRubberBandsAtLeft):
+    (WKPageRubberBandsAtRight):
+    (WKPageRubberBandsAtTop):
+    (WKPageRubberBandsAtBottom):
+    * UIProcess/Cocoa/WebViewImpl.mm:
+    (WebKit::toWKRectEdge):
+    (WebKit::toRectEdges):
+    (WebKit::WebViewImpl::pinnedState):
+    (WebKit::WebViewImpl::rubberBandingEnabled):
+    (WebKit::WebViewImpl::setRubberBandingEnabled):
+    * UIProcess/ViewGestureController.cpp:
+    (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
+    * UIProcess/WebPageProxy.cpp:
+    (WebKit::WebPageProxy::sendWheelEvent):
+    (WebKit::WebPageProxy::setRubberBandsAtLeft):
+    (WebKit::WebPageProxy::setRubberBandsAtRight):
+    (WebKit::WebPageProxy::setRubberBandsAtTop):
+    (WebKit::WebPageProxy::setRubberBandsAtBottom):
+    (WebKit::WebPageProxy::didCommitLoadForFrame):
+    (WebKit::WebPageProxy::resetState):
+    (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
+    (WebKit::WebPageProxy::rubberBandsAtLeft const): Deleted.
+    (WebKit::WebPageProxy::rubberBandsAtRight const): Deleted.
+    (WebKit::WebPageProxy::rubberBandsAtTop const): Deleted.
+    (WebKit::WebPageProxy::rubberBandsAtBottom const): Deleted.
+    * UIProcess/WebPageProxy.h:
+    * UIProcess/WebPageProxy.messages.in:
+    * WebProcess/WebPage/EventDispatcher.cpp:
+    (WebKit::EventDispatcher::wheelEvent):
+    * WebProcess/WebPage/EventDispatcher.h:
+    * WebProcess/WebPage/EventDispatcher.messages.in:
+    * WebProcess/WebPage/WebPage.cpp:
+    (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
+    * WebProcess/WebPage/WebPage.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-30  Simon Fraser  <simon.fraser@apple.com>
+
+            Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
+            https://bugs.webkit.org/show_bug.cgi?id=231037
+
+            Reviewed by Tim Horton.
+
+            Use RectEdges<bool> in code that tracks rubber banding state, and edge pinned state.
+
+            * Shared/WebCoreArgumentCoders.cpp:
+            (IPC::ArgumentCoder<RectEdges<bool>>::encode):
+            (IPC::ArgumentCoder<RectEdges<bool>>::decode):
+            * Shared/WebCoreArgumentCoders.h:
+            * UIProcess/API/C/WKPage.cpp:
+            (WKPageIsPinnedToLeftSide):
+            (WKPageIsPinnedToRightSide):
+            (WKPageIsPinnedToTopSide):
+            (WKPageIsPinnedToBottomSide):
+            (WKPageRubberBandsAtLeft):
+            (WKPageRubberBandsAtRight):
+            (WKPageRubberBandsAtTop):
+            (WKPageRubberBandsAtBottom):
+            * UIProcess/Cocoa/WebViewImpl.mm:
+            (WebKit::toWKRectEdge):
+            (WebKit::toRectEdges):
+            (WebKit::WebViewImpl::pinnedState):
+            (WebKit::WebViewImpl::rubberBandingEnabled):
+            (WebKit::WebViewImpl::setRubberBandingEnabled):
+            * UIProcess/ViewGestureController.cpp:
+            (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::WebPageProxy::sendWheelEvent):
+            (WebKit::WebPageProxy::setRubberBandsAtLeft):
+            (WebKit::WebPageProxy::setRubberBandsAtRight):
+            (WebKit::WebPageProxy::setRubberBandsAtTop):
+            (WebKit::WebPageProxy::setRubberBandsAtBottom):
+            (WebKit::WebPageProxy::didCommitLoadForFrame):
+            (WebKit::WebPageProxy::resetState):
+            (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
+            (WebKit::WebPageProxy::rubberBandsAtLeft const): Deleted.
+            (WebKit::WebPageProxy::rubberBandsAtRight const): Deleted.
+            (WebKit::WebPageProxy::rubberBandsAtTop const): Deleted.
+            (WebKit::WebPageProxy::rubberBandsAtBottom const): Deleted.
+            * UIProcess/WebPageProxy.h:
+            * UIProcess/WebPageProxy.messages.in:
+            * WebProcess/WebPage/EventDispatcher.cpp:
+            (WebKit::EventDispatcher::wheelEvent):
+            * WebProcess/WebPage/EventDispatcher.h:
+            * WebProcess/WebPage/EventDispatcher.messages.in:
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
+            * WebProcess/WebPage/WebPage.h:
+
+2021-12-01  Alan Coon  <alancoon@apple.com>
+
</ins><span class="cx">         Cherry-pick r286277. rdar://problem/85928816
</span><span class="cx"> 
</span><span class="cx">     Fix the build
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitSharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.cpp (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.cpp  2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.cpp     2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -675,8 +675,19 @@
</span><span class="cx"> {
</span><span class="cx">     return SimpleArgumentCoder<FloatBoxExtent>::decode(decoder, floatBoxExtent);
</span><span class="cx"> }
</span><ins>+
+
+void ArgumentCoder<RectEdges<bool>>::encode(Encoder& encoder, const RectEdges<bool>& boxEdges)
+{
+    SimpleArgumentCoder<RectEdges<bool>>::encode(encoder, boxEdges);
+}
</ins><span class="cx">     
</span><ins>+bool ArgumentCoder<RectEdges<bool>>::decode(Decoder& decoder, RectEdges<bool>& boxEdges)
+{
+    return SimpleArgumentCoder<RectEdges<bool>>::decode(decoder, boxEdges);
+}
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> void ArgumentCoder<FloatSize>::encode(Encoder& encoder, const FloatSize& floatSize)
</span><span class="cx"> {
</span><span class="cx">     SimpleArgumentCoder<FloatSize>::encode(encoder, floatSize);
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitSharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.h (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.h    2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebCoreArgumentCoders.h       2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -319,6 +319,11 @@
</span><span class="cx">     static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::FloatBoxExtent&);
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+template<> struct ArgumentCoder<WebCore::RectEdges<bool>> {
+    static void encode(Encoder&, const WebCore::RectEdges<bool>&);
+    static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::RectEdges<bool>&);
+};
+
</ins><span class="cx"> template<> struct ArgumentCoder<WebCore::FloatSize> {
</span><span class="cx">     static void encode(Encoder&, const WebCore::FloatSize&);
</span><span class="cx">     static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::FloatSize&);
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitUIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/API/C/WKPage.cpp (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/API/C/WKPage.cpp        2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/API/C/WKPage.cpp   2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -678,27 +678,27 @@
</span><span class="cx"> 
</span><span class="cx"> bool WKPageIsPinnedToLeftSide(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->isPinnedToLeftSide();
</del><ins>+    return toImpl(pageRef)->pinnedState().left();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageIsPinnedToRightSide(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->isPinnedToRightSide();
</del><ins>+    return toImpl(pageRef)->pinnedState().right();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageIsPinnedToTopSide(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->isPinnedToTopSide();
</del><ins>+    return toImpl(pageRef)->pinnedState().top();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageIsPinnedToBottomSide(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->isPinnedToBottomSide();
</del><ins>+    return toImpl(pageRef)->pinnedState().bottom();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageRubberBandsAtLeft(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->rubberBandsAtLeft();
</del><ins>+    return toImpl(pageRef)->rubberBandableEdges().left();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtLeft(WKPageRef pageRef, bool rubberBandsAtLeft)
</span><span class="lines">@@ -709,7 +709,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WKPageRubberBandsAtRight(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->rubberBandsAtRight();
</del><ins>+    return toImpl(pageRef)->rubberBandableEdges().right();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtRight(WKPageRef pageRef, bool rubberBandsAtRight)
</span><span class="lines">@@ -720,7 +720,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WKPageRubberBandsAtTop(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->rubberBandsAtTop();
</del><ins>+    return toImpl(pageRef)->rubberBandableEdges().top();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtTop(WKPageRef pageRef, bool rubberBandsAtTop)
</span><span class="lines">@@ -731,7 +731,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WKPageRubberBandsAtBottom(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    return toImpl(pageRef)->rubberBandsAtBottom();
</del><ins>+    return toImpl(pageRef)->rubberBandableEdges().bottom();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtBottom(WKPageRef pageRef, bool rubberBandsAtBottom)
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitUIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm    2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm       2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -5609,40 +5609,48 @@
</span><span class="cx">     mouseMovedInternal(event);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static _WKRectEdge toWKRectEdge(RectEdges<bool> edges)
+{
+    _WKRectEdge result = _WKRectEdgeNone;
+
+    if (edges.left())
+        result |= _WKRectEdgeLeft;
+
+    if (edges.right())
+        result |= _WKRectEdgeRight;
+
+    if (edges.top())
+        result |= _WKRectEdgeTop;
+
+    if (edges.bottom())
+        result |= _WKRectEdgeBottom;
+
+    return result;
+}
+
+static RectEdges<bool> toRectEdges(_WKRectEdge edges)
+{
+    return {
+        edges & _WKRectEdgeTop,
+        edges & _WKRectEdgeRight,
+        edges & _WKRectEdgeBottom,
+        edges & _WKRectEdgeLeft
+    };
+}
+
</ins><span class="cx"> _WKRectEdge WebViewImpl::pinnedState()
</span><span class="cx"> {
</span><del>-    _WKRectEdge state = _WKRectEdgeNone;
-    if (m_page->isPinnedToLeftSide())
-        state |= _WKRectEdgeLeft;
-    if (m_page->isPinnedToRightSide())
-        state |= _WKRectEdgeRight;
-    if (m_page->isPinnedToTopSide())
-        state |= _WKRectEdgeTop;
-    if (m_page->isPinnedToBottomSide())
-        state |= _WKRectEdgeBottom;
-    return state;
</del><ins>+    return toWKRectEdge(m_page->pinnedState());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> _WKRectEdge WebViewImpl::rubberBandingEnabled()
</span><span class="cx"> {
</span><del>-    _WKRectEdge state = _WKRectEdgeNone;
-    if (m_page->rubberBandsAtLeft())
-        state |= _WKRectEdgeLeft;
-    if (m_page->rubberBandsAtRight())
-        state |= _WKRectEdgeRight;
-    if (m_page->rubberBandsAtTop())
-        state |= _WKRectEdgeTop;
-    if (m_page->rubberBandsAtBottom())
-        state |= _WKRectEdgeBottom;
-    return state;
</del><ins>+    return toWKRectEdge(m_page->rubberBandableEdges());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebViewImpl::setRubberBandingEnabled(_WKRectEdge state)
</span><span class="cx"> {
</span><del>-    m_page->setRubberBandsAtLeft(state & _WKRectEdgeLeft);
-    m_page->setRubberBandsAtRight(state & _WKRectEdgeRight);
-    m_page->setRubberBandsAtTop(state & _WKRectEdgeTop);
-    m_page->setRubberBandsAtBottom(state & _WKRectEdgeBottom);
</del><ins>+    m_page->setRubberBandableEdges(toRectEdges(state));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebViewImpl::mouseDown(NSEvent *event)
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitUIProcessViewGestureControllercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/ViewGestureController.cpp (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/ViewGestureController.cpp       2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/ViewGestureController.cpp  2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -421,8 +421,8 @@
</span><span class="cx">     if (deltaShouldCancelSwipe(size))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    bool isPinnedToLeft = m_shouldIgnorePinnedState || m_webPageProxy.isPinnedToLeftSide();
-    bool isPinnedToRight = m_shouldIgnorePinnedState || m_webPageProxy.isPinnedToRightSide();
</del><ins>+    bool isPinnedToLeft = m_shouldIgnorePinnedState || m_webPageProxy.pinnedState().left();
+    bool isPinnedToRight = m_shouldIgnorePinnedState || m_webPageProxy.pinnedState().right();
</ins><span class="cx"> 
</span><span class="cx">     bool tryingToSwipeBack = size.width() > 0 && isPinnedToLeft;
</span><span class="cx">     bool tryingToSwipeForward = size.width() < 0 && isPinnedToRight;
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp        2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp   2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -2925,17 +2925,14 @@
</span><span class="cx">     auto* connection = messageSenderConnection();
</span><span class="cx">     if (!connection)
</span><span class="cx">         return;
</span><ins>+    
+    auto rubberBandableEdges = this->rubberBandableEdges();
+    if (shouldUseImplicitRubberBandControl()) {
+        rubberBandableEdges.setLeft(!m_backForwardList->backItem());
+        rubberBandableEdges.setRight(!m_backForwardList->forwardItem());
+    }
+    connection -> send(Messages::EventDispatcher::WheelEvent(m_webPageID, event, rubberBandableEdges), 0);
</ins><span class="cx"> 
</span><del>-    connection->send(
-        Messages::EventDispatcher::WheelEvent(
-            m_webPageID,
-            event,
-            shouldUseImplicitRubberBandControl() ? !m_backForwardList->backItem() : rubberBandsAtLeft(),
-            shouldUseImplicitRubberBandControl() ? !m_backForwardList->forwardItem() : rubberBandsAtRight(),
-            rubberBandsAtTop(),
-            rubberBandsAtBottom()
-    ), 0, { }, Thread::QOS::UserInteractive);
-
</del><span class="cx">     // Manually ping the web process to check for responsiveness since our wheel
</span><span class="cx">     // event will dispatch to a non-main thread, which always responds.
</span><span class="cx">     m_process->isResponsiveWithLazyStop();
</span><span class="lines">@@ -4129,44 +4126,24 @@
</span><span class="cx">     send(Messages::WebPage::SetSuppressScrollbarAnimations(suppressAnimations));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPageProxy::rubberBandsAtLeft() const
-{
-    return m_rubberBandsAtLeft;
-}
-
</del><span class="cx"> void WebPageProxy::setRubberBandsAtLeft(bool rubberBandsAtLeft)
</span><span class="cx"> {
</span><del>-    m_rubberBandsAtLeft = rubberBandsAtLeft;
</del><ins>+    m_rubberBandableEdges.setLeft(rubberBandsAtLeft);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPageProxy::rubberBandsAtRight() const
-{
-    return m_rubberBandsAtRight;
-}
-
</del><span class="cx"> void WebPageProxy::setRubberBandsAtRight(bool rubberBandsAtRight)
</span><span class="cx"> {
</span><del>-    m_rubberBandsAtRight = rubberBandsAtRight;
</del><ins>+    m_rubberBandableEdges.setRight(rubberBandsAtRight);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPageProxy::rubberBandsAtTop() const
-{
-    return m_rubberBandsAtTop;
-}
-
</del><span class="cx"> void WebPageProxy::setRubberBandsAtTop(bool rubberBandsAtTop)
</span><span class="cx"> {
</span><del>-    m_rubberBandsAtTop = rubberBandsAtTop;
</del><ins>+    m_rubberBandableEdges.setTop(rubberBandsAtTop);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebPageProxy::rubberBandsAtBottom() const
-{
-    return m_rubberBandsAtBottom;
-}
-
</del><span class="cx"> void WebPageProxy::setRubberBandsAtBottom(bool rubberBandsAtBottom)
</span><span class="cx"> {
</span><del>-    m_rubberBandsAtBottom = rubberBandsAtBottom;
</del><ins>+    m_rubberBandableEdges.setBottom(rubberBandsAtBottom);
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void WebPageProxy::setEnableVerticalRubberBanding(bool enableVerticalRubberBanding)
</span><span class="lines">@@ -4938,11 +4915,7 @@
</span><span class="cx">         if (m_mainFrameHasCustomContentProvider) {
</span><span class="cx">             // Always assume that the main frame is pinned here, since the custom representation view will handle
</span><span class="cx">             // any wheel events and dispatch them to the WKView when necessary.
</span><del>-            m_mainFrameIsPinnedToLeftSide = true;
-            m_mainFrameIsPinnedToRightSide = true;
-            m_mainFrameIsPinnedToTopSide = true;
-            m_mainFrameIsPinnedToBottomSide = true;
-
</del><ins>+            m_mainFramePinnedState = { true, true, true, true };
</ins><span class="cx">             m_uiClient->pinnedStateDidChange(*this);
</span><span class="cx">         }
</span><span class="cx">         pageClient().didCommitLoadForMainFrame(mimeType, frameHasCustomContentProvider);
</span><span class="lines">@@ -7854,10 +7827,7 @@
</span><span class="cx">     m_mainFrameHasHorizontalScrollbar = false;
</span><span class="cx">     m_mainFrameHasVerticalScrollbar = false;
</span><span class="cx"> 
</span><del>-    m_mainFrameIsPinnedToLeftSide = true;
-    m_mainFrameIsPinnedToRightSide = true;
-    m_mainFrameIsPinnedToTopSide = true;
-    m_mainFrameIsPinnedToBottomSide = true;
</del><ins>+    m_mainFramePinnedState = { true, true, true, true };
</ins><span class="cx"> 
</span><span class="cx">     m_visibleScrollerThumbRect = IntRect();
</span><span class="cx"> 
</span><span class="lines">@@ -8764,13 +8734,10 @@
</span><span class="cx">     m_mainFrameHasVerticalScrollbar = hasVerticalScrollbar;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide)
</del><ins>+void WebPageProxy::didChangeScrollOffsetPinningForMainFrame(RectEdges<bool> pinnedState)
</ins><span class="cx"> {
</span><span class="cx">     pageClient().pinnedStateWillChange();
</span><del>-    m_mainFrameIsPinnedToLeftSide = pinnedToLeftSide;
-    m_mainFrameIsPinnedToRightSide = pinnedToRightSide;
-    m_mainFrameIsPinnedToTopSide = pinnedToTopSide;
-    m_mainFrameIsPinnedToBottomSide = pinnedToBottomSide;
</del><ins>+    m_mainFramePinnedState = pinnedState;
</ins><span class="cx">     pageClient().pinnedStateDidChange();
</span><span class="cx"> 
</span><span class="cx">     m_uiClient->pinnedStateDidChange(*this);
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h  2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h     2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx"> #include <WebCore/PlatformSpeechSynthesisUtterance.h>
</span><span class="cx"> #include <WebCore/PlatformSpeechSynthesizer.h>
</span><span class="cx"> #include <WebCore/PointerID.h>
</span><ins>+#include <WebCore/RectEdges.h>
</ins><span class="cx"> #include <WebCore/RegistrableDomain.h>
</span><span class="cx"> #include <WebCore/RunJavaScriptParameters.h>
</span><span class="cx"> #include <WebCore/ScrollTypes.h>
</span><span class="lines">@@ -1085,18 +1086,13 @@
</span><span class="cx">     void setSuppressScrollbarAnimations(bool);
</span><span class="cx">     bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; }
</span><span class="cx"> 
</span><del>-    bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
-    bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
-    bool isPinnedToTopSide() const { return m_mainFrameIsPinnedToTopSide; }
-    bool isPinnedToBottomSide() const { return m_mainFrameIsPinnedToBottomSide; }
</del><ins>+    WebCore::RectEdges<bool> pinnedState() const { return m_mainFramePinnedState; }
</ins><span class="cx"> 
</span><del>-    bool rubberBandsAtLeft() const;
</del><ins>+    WebCore::RectEdges<bool> rubberBandableEdges() const { return m_rubberBandableEdges; }
+    void setRubberBandableEdges(WebCore::RectEdges<bool> edges) { m_rubberBandableEdges = edges; }
</ins><span class="cx">     void setRubberBandsAtLeft(bool);
</span><del>-    bool rubberBandsAtRight() const;
</del><span class="cx">     void setRubberBandsAtRight(bool);
</span><del>-    bool rubberBandsAtTop() const;
</del><span class="cx">     void setRubberBandsAtTop(bool);
</span><del>-    bool rubberBandsAtBottom() const;
</del><span class="cx">     void setRubberBandsAtBottom(bool);
</span><span class="cx"> 
</span><span class="cx">     void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; }
</span><span class="lines">@@ -2148,7 +2144,7 @@
</span><span class="cx">     void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&);
</span><span class="cx">     void recommendedScrollbarStyleDidChange(int32_t newStyle);
</span><span class="cx">     void didChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar);
</span><del>-    void didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide);
</del><ins>+    void didChangeScrollOffsetPinningForMainFrame(WebCore::RectEdges<bool>);
</ins><span class="cx">     void didChangePageCount(unsigned);
</span><span class="cx">     void themeColorChanged(const WebCore::Color&);
</span><span class="cx">     void pageExtendedBackgroundColorDidChange(const WebCore::Color&);
</span><span class="lines">@@ -2851,7 +2847,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     PageLoadState m_pageLoadState;
</span><del>-    
</del><ins>+
+    WebCore::RectEdges<bool> m_mainFramePinnedState { true, true, true, true };
+    WebCore::RectEdges<bool> m_rubberBandableEdges { true, true, true, true };
+
</ins><span class="cx">     bool m_delegatesScrolling { false };
</span><span class="cx"> 
</span><span class="cx">     bool m_mainFrameHasHorizontalScrollbar { false };
</span><span class="lines">@@ -2860,16 +2859,7 @@
</span><span class="cx">     // Whether horizontal wheel events can be handled directly for swiping purposes.
</span><span class="cx">     bool m_canShortCircuitHorizontalWheelEvents { true };
</span><span class="cx"> 
</span><del>-    bool m_mainFrameIsPinnedToLeftSide { true };
-    bool m_mainFrameIsPinnedToRightSide { true };
-    bool m_mainFrameIsPinnedToTopSide { true };
-    bool m_mainFrameIsPinnedToBottomSide { true };
-
</del><span class="cx">     bool m_shouldUseImplicitRubberBandControl { false };
</span><del>-    bool m_rubberBandsAtLeft { true };
-    bool m_rubberBandsAtRight { true };
-    bool m_rubberBandsAtTop { true };
-    bool m_rubberBandsAtBottom { true };
</del><span class="cx">         
</span><span class="cx">     bool m_enableVerticalRubberBanding { true };
</span><span class="cx">     bool m_enableHorizontalRubberBanding { true };
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitUIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in        2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in   2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb)
</span><span class="cx">     RecommendedScrollbarStyleDidChange(int32_t newStyle)
</span><span class="cx">     DidChangeScrollbarsForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
</span><del>-    DidChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide)
</del><ins>+    DidChangeScrollOffsetPinningForMainFrame(WebCore::RectEdges<bool> pinnedState)
</ins><span class="cx">     DidChangePageCount(unsigned pageCount)
</span><span class="cx">     ThemeColorChanged(WebCore::Color themeColor)
</span><span class="cx">     PageExtendedBackgroundColorDidChange(WebCore::Color backgroundColor)
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitWebProcessWebPageEventDispatchercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp    2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp       2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     connection->addWorkQueueMessageReceiver(Messages::EventDispatcher::messageReceiverName(), m_queue.get(), this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void EventDispatcher::wheelEvent(PageIdentifier pageID, const WebWheelEvent& wheelEvent, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom)
</del><ins>+void EventDispatcher::wheelEvent(PageIdentifier pageID, const WebWheelEvent& wheelEvent, RectEdges<bool> rubberBandableEdges)
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(COCOA) || ENABLE(SCROLLING_THREAD)
</span><span class="cx">     PlatformWheelEvent platformWheelEvent = platform(wheelEvent);
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx">         // scrolling tree can be notified.
</span><span class="cx">         // We only need to do this at the beginning of the gesture.
</span><span class="cx">         if (platformWheelEvent.phase() == PlatformWheelEventPhase::Began)
</span><del>-            scrollingTree->setMainFrameCanRubberBand({ canRubberBandAtTop, canRubberBandAtRight, canRubberBandAtBottom, canRubberBandAtLeft });
</del><ins>+            scrollingTree->setMainFrameCanRubberBand(rubberBandableEdges);
</ins><span class="cx"> 
</span><span class="cx">         auto processingSteps = scrollingTree->determineWheelEventProcessing(platformWheelEvent);
</span><span class="cx"> 
</span><span class="lines">@@ -165,10 +165,7 @@
</span><span class="cx">         });
</span><span class="cx">     } while (false);
</span><span class="cx"> #else
</span><del>-    UNUSED_PARAM(canRubberBandAtLeft);
-    UNUSED_PARAM(canRubberBandAtRight);
-    UNUSED_PARAM(canRubberBandAtTop);
-    UNUSED_PARAM(canRubberBandAtBottom);
</del><ins>+    UNUSED_PARAM(rubberBandableEdges);
</ins><span class="cx"> 
</span><span class="cx">     dispatchWheelEventViaMainThread(pageID, wheelEvent, processingSteps);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitWebProcessWebPageEventDispatcherh"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.h (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.h      2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.h 2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "WebEvent.h"
</span><span class="cx"> #include <WebCore/PageIdentifier.h>
</span><span class="cx"> #include <WebCore/PlatformWheelEvent.h>
</span><ins>+#include <WebCore/RectEdges.h>
</ins><span class="cx"> #include <WebCore/WheelEventDeltaFilter.h>
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="lines">@@ -83,7 +84,7 @@
</span><span class="cx">     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
</span><span class="cx"> 
</span><span class="cx">     // Message handlers
</span><del>-    void wheelEvent(WebCore::PageIdentifier, const WebWheelEvent&, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom);
</del><ins>+    void wheelEvent(WebCore::PageIdentifier, const WebWheelEvent&, WebCore::RectEdges<bool> rubberBandableEdges);
</ins><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx">     void touchEvent(WebCore::PageIdentifier, const WebTouchEvent&, CompletionHandler<void(bool)>&&);
</span><span class="cx">     void touchEventWithoutCallback(WebCore::PageIdentifier, const WebTouchEvent&);
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitWebProcessWebPageEventDispatchermessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in    2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in       2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> 
</span><span class="cx"> messages -> EventDispatcher {
</span><del>-    WheelEvent(WebCore::PageIdentifier pageID, WebKit::WebWheelEvent event, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom)
</del><ins>+    WheelEvent(WebCore::PageIdentifier pageID, WebKit::WebWheelEvent event, WebCore::RectEdges<bool> rubberBandableEdges)
</ins><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx">     TouchEvent(WebCore::PageIdentifier pageID, WebKit::WebTouchEvent event) -> (bool handled) Async MainThreadCallback
</span><span class="cx">     TouchEventWithoutCallback(WebCore::PageIdentifier pageID, WebKit::WebTouchEvent event)
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitWebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp    2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp       2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -4942,23 +4942,14 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::updateMainFrameScrollOffsetPinning()
</span><span class="cx"> {
</span><del>-    Frame& frame = m_page->mainFrame();
-    ScrollPosition scrollPosition = frame.view()->scrollPosition();
-    ScrollPosition maximumScrollPosition = frame.view()->maximumScrollPosition();
-    ScrollPosition minimumScrollPosition = frame.view()->minimumScrollPosition();
</del><ins>+    auto* frameView = mainFrameView();
+    if (!frameView)
+        return;
</ins><span class="cx"> 
</span><del>-    bool isPinnedToLeftSide = (scrollPosition.x() <= minimumScrollPosition.x());
-    bool isPinnedToRightSide = (scrollPosition.x() >= maximumScrollPosition.x());
-    bool isPinnedToTopSide = (scrollPosition.y() <= minimumScrollPosition.y());
-    bool isPinnedToBottomSide = (scrollPosition.y() >= maximumScrollPosition.y());
-
-    if (isPinnedToLeftSide != m_cachedMainFrameIsPinnedToLeftSide || isPinnedToRightSide != m_cachedMainFrameIsPinnedToRightSide || isPinnedToTopSide != m_cachedMainFrameIsPinnedToTopSide || isPinnedToBottomSide != m_cachedMainFrameIsPinnedToBottomSide) {
-        send(Messages::WebPageProxy::DidChangeScrollOffsetPinningForMainFrame(isPinnedToLeftSide, isPinnedToRightSide, isPinnedToTopSide, isPinnedToBottomSide));
-        
-        m_cachedMainFrameIsPinnedToLeftSide = isPinnedToLeftSide;
-        m_cachedMainFrameIsPinnedToRightSide = isPinnedToRightSide;
-        m_cachedMainFrameIsPinnedToTopSide = isPinnedToTopSide;
-        m_cachedMainFrameIsPinnedToBottomSide = isPinnedToBottomSide;
</del><ins>+    auto pinnedState = frameView->edgePinnedState();
+    if (pinnedState != m_cachedMainFramePinnedState) {
+        send(Messages::WebPageProxy::DidChangeScrollOffsetPinningForMainFrame(pinnedState));
+        m_cachedMainFramePinnedState = pinnedState;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612421branchSourceWebKitWebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (286715 => 286716)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h      2021-12-08 21:25:24 UTC (rev 286715)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-12-08 21:25:30 UTC (rev 286716)
</span><span class="lines">@@ -81,6 +81,7 @@
</span><span class="cx"> #include <WebCore/PluginData.h>
</span><span class="cx"> #include <WebCore/PointerCharacteristics.h>
</span><span class="cx"> #include <WebCore/PointerID.h>
</span><ins>+#include <WebCore/RectEdges.h>
</ins><span class="cx"> #include <WebCore/SecurityPolicyViolationEvent.h>
</span><span class="cx"> #include <WebCore/ShareData.h>
</span><span class="cx"> #include <WebCore/SimpleRange.h>
</span><span class="lines">@@ -2156,10 +2157,7 @@
</span><span class="cx">     std::optional<WebCore::SimpleRange> m_rangeForDropSnapshot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool m_cachedMainFrameIsPinnedToLeftSide { true };
-    bool m_cachedMainFrameIsPinnedToRightSide { true };
-    bool m_cachedMainFrameIsPinnedToTopSide { true };
-    bool m_cachedMainFrameIsPinnedToBottomSide { true };
</del><ins>+    WebCore::RectEdges<bool> m_cachedMainFramePinnedState { true, true, true, true };
</ins><span class="cx">     bool m_canShortCircuitHorizontalWheelEvents { false };
</span><span class="cx">     bool m_hasWheelEventHandlers { false };
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>