⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249093 in webkit


Ignore:
Timestamp:
Aug 25, 2019, 11:16:50 PM (7 years ago)
Author:
Simon Fraser
Message:

[iOS WK2] Make a strongly-typed TransactionID to replace uint64_t transactionIDs
https://bugs.webkit.org/show_bug.cgi?id=199983

Reviewed by Dean Jackson.

Add TransactionID which is a MonotonicObjectIdentifier<TransactionIDType>. This is modeled
after ObjectIdentifier<>, but we can't use that because it doesn't have a guarantee of
values always increasing by 1 (all derived classes share the same value source). Also, we
need a per-RemoteLayerTreeDrawingArea set of values, but a static seed would cause values to
be incremented by all RemoteLayerTreeDrawingAreas in a WebProcess.

Replace all the bare uint64_t with TransactionID, fixing message generation codegen.

  • Scripts/webkit/messages.py:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::transactionID const):
(WebKit::RemoteLayerTreeTransaction::setTransactionID):

  • Shared/TransactionID.h: Added.

(WebKit::MonotonicObjectIdentifier::MonotonicObjectIdentifier):
(WebKit::MonotonicObjectIdentifier::isHashTableDeletedValue const):
(WebKit::MonotonicObjectIdentifier::encode const):
(WebKit::MonotonicObjectIdentifier::decode):
(WebKit::MonotonicObjectIdentifier::operator== const):
(WebKit::MonotonicObjectIdentifier::operator> const):
(WebKit::MonotonicObjectIdentifier::operator>= const):
(WebKit::MonotonicObjectIdentifier::operator< const):
(WebKit::MonotonicObjectIdentifier::operator<= const):
(WebKit::MonotonicObjectIdentifier::operator!= const):
(WebKit::MonotonicObjectIdentifier::increment):
(WebKit::MonotonicObjectIdentifier::next const):
(WebKit::MonotonicObjectIdentifier::toUInt64 const):
(WebKit::MonotonicObjectIdentifier::operator bool const):
(WebKit::MonotonicObjectIdentifier::loggingString const):
(WebKit::MonotonicObjectIdentifier::hashTableDeletedValue):
(WebKit::MonotonicObjectIdentifier::isValidIdentifier):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::lastLayerTreeTransactionID const):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _processWillSwapOrDidExit]):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetState):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanupInteraction]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::commitPotentialTap):
(WebKit::WebPageProxy::handleTap):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:

(WebKit::RemoteLayerTreeDrawingArea::nextTransactionID const):
(WebKit::RemoteLayerTreeDrawingArea::lastCommittedTransactionID const):
(WebKit::RemoteLayerTreeDrawingArea::takeNextTransactionID):

  • WebProcess/WebPage/WebFrame.h:

(WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad const):
(WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleTap):
(WebKit::WebPage::handlePotentialDoubleTapForDoubleClickAtPoint):
(WebKit::WebPage::commitPotentialTap):

Location:
trunk/Source/WebKit
Files:
1 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r249087 r249093  
     12019-08-25  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [iOS WK2] Make a strongly-typed TransactionID to replace uint64_t transactionIDs
     4        https://bugs.webkit.org/show_bug.cgi?id=199983
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Add TransactionID which is a MonotonicObjectIdentifier<TransactionIDType>. This is modeled
     9        after ObjectIdentifier<>, but we can't use that because it doesn't have a guarantee of
     10        values always increasing by 1 (all derived classes share the same value source). Also, we
     11        need a per-RemoteLayerTreeDrawingArea set of values, but a static seed would cause values to
     12        be incremented by all RemoteLayerTreeDrawingAreas in a WebProcess.
     13
     14        Replace all the bare uint64_t with TransactionID, fixing message generation codegen.
     15
     16        * Scripts/webkit/messages.py:
     17        * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
     18        (WebKit::RemoteLayerTreeTransaction::transactionID const):
     19        (WebKit::RemoteLayerTreeTransaction::setTransactionID):
     20        * Shared/TransactionID.h: Added.
     21        (WebKit::MonotonicObjectIdentifier::MonotonicObjectIdentifier):
     22        (WebKit::MonotonicObjectIdentifier::isHashTableDeletedValue const):
     23        (WebKit::MonotonicObjectIdentifier::encode const):
     24        (WebKit::MonotonicObjectIdentifier::decode):
     25        (WebKit::MonotonicObjectIdentifier::operator== const):
     26        (WebKit::MonotonicObjectIdentifier::operator> const):
     27        (WebKit::MonotonicObjectIdentifier::operator>= const):
     28        (WebKit::MonotonicObjectIdentifier::operator< const):
     29        (WebKit::MonotonicObjectIdentifier::operator<= const):
     30        (WebKit::MonotonicObjectIdentifier::operator!= const):
     31        (WebKit::MonotonicObjectIdentifier::increment):
     32        (WebKit::MonotonicObjectIdentifier::next const):
     33        (WebKit::MonotonicObjectIdentifier::toUInt64 const):
     34        (WebKit::MonotonicObjectIdentifier::operator bool const):
     35        (WebKit::MonotonicObjectIdentifier::loggingString const):
     36        (WebKit::MonotonicObjectIdentifier::hashTableDeletedValue):
     37        (WebKit::MonotonicObjectIdentifier::isValidIdentifier):
     38        (WebKit::operator<<):
     39        * Shared/VisibleContentRectUpdateInfo.h:
     40        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
     41        (WebKit::VisibleContentRectUpdateInfo::lastLayerTreeTransactionID const):
     42        * UIProcess/API/Cocoa/WKWebView.mm:
     43        (-[WKWebView _processWillSwapOrDidExit]):
     44        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
     45        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
     46        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
     47        (WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
     48        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
     49        * UIProcess/WebPageProxy.cpp:
     50        (WebKit::WebPageProxy::resetState):
     51        * UIProcess/WebPageProxy.h:
     52        * UIProcess/ios/WKContentViewInteraction.h:
     53        * UIProcess/ios/WKContentViewInteraction.mm:
     54        (-[WKContentView cleanupInteraction]):
     55        * UIProcess/ios/WebPageProxyIOS.mm:
     56        (WebKit::WebPageProxy::commitPotentialTap):
     57        (WebKit::WebPageProxy::handleTap):
     58        * WebKit.xcodeproj/project.pbxproj:
     59        * WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
     60        (WebKit::RemoteLayerTreeDrawingArea::nextTransactionID const):
     61        (WebKit::RemoteLayerTreeDrawingArea::lastCommittedTransactionID const):
     62        (WebKit::RemoteLayerTreeDrawingArea::takeNextTransactionID):
     63        * WebProcess/WebPage/WebFrame.h:
     64        (WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad const):
     65        (WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
     66        * WebProcess/WebPage/WebPage.h:
     67        * WebProcess/WebPage/WebPage.messages.in:
     68        * WebProcess/WebPage/ios/WebPageIOS.mm:
     69        (WebKit::WebPage::handleTap):
     70        (WebKit::WebPage::handlePotentialDoubleTapForDoubleClickAtPoint):
     71        (WebKit::WebPage::commitPotentialTap):
     72
    1732019-08-24  Chris Dumez  <cdumez@apple.com>
    274
  • trunk/Source/WebKit/Scripts/webkit/messages.py

    r248901 r249093  
    218218        'WebKit::ActivityStateChangeID',
    219219        'WebKit::LayerHostingContextID',
     220        'WebKit::TransactionID',
    220221        'WebKit::StorageAreaIdentifier',
    221222        'WebKit::StorageAreaImplIdentifier',
  • trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h

    r248762 r249093  
    3232#include "PlatformCAAnimationRemote.h"
    3333#include "RemoteLayerBackingStore.h"
     34#include "TransactionID.h"
    3435#include <WebCore/Color.h>
    3536#include <WebCore/FilterOperations.h>
     
    265266    void setAvoidsUnsafeArea(bool avoidsUnsafeArea) { m_avoidsUnsafeArea = avoidsUnsafeArea; }
    266267
    267     uint64_t transactionID() const { return m_transactionID; }
    268     void setTransactionID(uint64_t transactionID) { m_transactionID = transactionID; }
     268    TransactionID transactionID() const { return m_transactionID; }
     269    void setTransactionID(TransactionID transactionID) { m_transactionID = transactionID; }
    269270
    270271    ActivityStateChangeID activityStateChangeID() const { return m_activityStateChangeID; }
     
    310311    double m_viewportMetaTagWidth { -1 };
    311312    uint64_t m_renderTreeSize { 0 };
    312     uint64_t m_transactionID { 0 };
     313    TransactionID m_transactionID;
    313314    ActivityStateChangeID m_activityStateChangeID { ActivityStateChangeAsynchronous };
    314315    OptionSet<WebCore::LayoutMilestone> m_newlyReachedPaintingMilestones;
  • trunk/Source/WebKit/Shared/VisibleContentRectUpdateInfo.h

    r245787 r249093  
    2626#pragma once
    2727
     28#include "TransactionID.h"
    2829#include <WebCore/FloatRect.h>
    2930#include <WebCore/LengthBox.h>
     
    4748    VisibleContentRectUpdateInfo() = default;
    4849
    49     VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedContentRect, const WebCore::FloatRect& unobscuredContentRect, const WebCore::FloatBoxExtent& contentInsets, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& unobscuredContentRectRespectingInputViewBounds, const WebCore::FloatRect& customFixedPositionRect, const WebCore::FloatBoxExtent& obscuredInsets, const WebCore::FloatBoxExtent& unobscuredSafeAreaInsets, double scale, bool inStableState, bool isFirstUpdateForNewViewSize, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScrollableAncestorView, const WebCore::VelocityData& scrollVelocity, uint64_t lastLayerTreeTransactionId)
     50    VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedContentRect, const WebCore::FloatRect& unobscuredContentRect, const WebCore::FloatBoxExtent& contentInsets, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& unobscuredContentRectRespectingInputViewBounds, const WebCore::FloatRect& customFixedPositionRect, const WebCore::FloatBoxExtent& obscuredInsets, const WebCore::FloatBoxExtent& unobscuredSafeAreaInsets, double scale, bool inStableState, bool isFirstUpdateForNewViewSize, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScrollableAncestorView, const WebCore::VelocityData& scrollVelocity, TransactionID lastLayerTreeTransactionId)
    5051        : m_exposedContentRect(exposedContentRect)
    5152        , m_unobscuredContentRect(unobscuredContentRect)
     
    8384    bool allowShrinkToFit() const { return m_allowShrinkToFit; }
    8485    bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; }
    85     uint64_t lastLayerTreeTransactionID() const { return m_lastLayerTreeTransactionID; }
     86    TransactionID lastLayerTreeTransactionID() const { return m_lastLayerTreeTransactionID; }
    8687
    8788    MonotonicTime timestamp() const { return m_scrollVelocity.lastUpdateTime; }
     
    102103    WebCore::FloatBoxExtent m_unobscuredSafeAreaInsets;
    103104    WebCore::VelocityData m_scrollVelocity;
    104     uint64_t m_lastLayerTreeTransactionID { 0 };
     105    TransactionID m_lastLayerTreeTransactionID;
    105106    double m_scale { -1 };
    106107    bool m_inStableState { false };
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r248846 r249093  
    317317    BOOL _hasCommittedLoadForMainFrame;
    318318    BOOL _needsResetViewStateAfterCommitLoadForMainFrame;
    319     uint64_t _firstPaintAfterCommitLoadTransactionID;
     319    WebKit::TransactionID _firstPaintAfterCommitLoadTransactionID;
    320320    WebKit::DynamicViewportUpdateMode _dynamicViewportUpdateMode;
    321321    WebKit::DynamicViewportSizeUpdateID _currentDynamicViewportSizeUpdateID;
     
    332332
    333333    Optional<WebCore::FloatPoint> _unobscuredCenterToRestore;
    334     Optional<uint64_t> _firstTransactionIDAfterPageRestore;
     334    Optional<WebKit::TransactionID> _firstTransactionIDAfterPageRestore;
    335335    double _scaleToRestore;
    336336
     
    18841884    _frozenUnobscuredContentRect = WTF::nullopt;
    18851885
    1886     _firstPaintAfterCommitLoadTransactionID = 0;
     1886    _firstPaintAfterCommitLoadTransactionID = { };
    18871887    _firstTransactionIDAfterPageRestore = WTF::nullopt;
    18881888
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h

    r240046 r249093  
    2828#include "DrawingAreaProxy.h"
    2929#include "RemoteLayerTreeHost.h"
     30#include "TransactionID.h"
    3031#include <WebCore/FloatPoint.h>
    3132#include <WebCore/IntPoint.h>
     
    5051    void acceleratedAnimationDidEnd(uint64_t layerID, const String& key);
    5152
    52     uint64_t nextLayerTreeTransactionID() const { return m_pendingLayerTreeTransactionID + 1; }
    53     uint64_t lastCommittedLayerTreeTransactionID() const { return m_transactionIDForPendingCACommit; }
     53    TransactionID nextLayerTreeTransactionID() const { return m_pendingLayerTreeTransactionID.next(); }
     54    TransactionID lastCommittedLayerTreeTransactionID() const { return m_transactionIDForPendingCACommit; }
    5455
    5556    void didRefreshDisplay();
     
    9798
    9899    // Message handlers
    99     void willCommitLayerTree(uint64_t transactionID);
     100    void willCommitLayerTree(TransactionID);
    100101    void commitLayerTree(const RemoteLayerTreeTransaction&, const RemoteScrollingCoordinatorTransaction&);
    101102   
     
    113114    RetainPtr<CALayer> m_exposedRectIndicatorLayer;
    114115
    115     uint64_t m_pendingLayerTreeTransactionID { 0 };
    116     uint64_t m_lastVisibleTransactionID { 0 };
    117     uint64_t m_transactionIDForPendingCACommit { 0 };
    118     uint64_t m_transactionIDForUnhidingContent { 0 };
     116    TransactionID m_pendingLayerTreeTransactionID;
     117    TransactionID m_lastVisibleTransactionID;
     118    TransactionID m_transactionIDForPendingCACommit;
     119    TransactionID m_transactionIDForUnhidingContent;
    119120    ActivityStateChangeID m_activityStateChangeID { ActivityStateChangeAsynchronous };
    120121
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in

    r221541 r249093  
    2222
    2323messages -> RemoteLayerTreeDrawingAreaProxy : DrawingAreaProxy {
    24     void WillCommitLayerTree(uint64_t transactionID)
     24    void WillCommitLayerTree(WebKit::TransactionID transactionID)
    2525    void CommitLayerTree(WebKit::RemoteLayerTreeTransaction layerTreeTransaction, WebKit::RemoteScrollingCoordinatorTransaction scrollingTreeTransaction)
    2626}
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm

    r248846 r249093  
    184184}
    185185
    186 void RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree(uint64_t transactionID)
     186void RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree(TransactionID transactionID)
    187187{
    188188    m_pendingLayerTreeTransactionID = transactionID;
     
    196196    LOG(RemoteLayerTree, "%s", scrollingTreeTransaction.description().data());
    197197
    198     ASSERT(layerTreeTransaction.transactionID() == m_lastVisibleTransactionID + 1);
     198    ASSERT(layerTreeTransaction.transactionID() == m_lastVisibleTransactionID.next());
    199199    m_transactionIDForPendingCACommit = layerTreeTransaction.transactionID();
    200200    m_activityStateChangeID = layerTreeTransaction.activityStateChangeID();
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r249063 r249093  
    70447044
    70457045#if PLATFORM(IOS_FAMILY)
    7046     m_firstLayerTreeTransactionIdAfterDidCommitLoad = 0;
    7047     m_lastVisibleContentRectUpdate = VisibleContentRectUpdateInfo();
     7046    m_firstLayerTreeTransactionIdAfterDidCommitLoad = { };
     7047    m_lastVisibleContentRectUpdate = { };
    70487048    m_hasNetworkRequestsOnSuspended = false;
    70497049    m_isKeyboardAnimatingIn = false;
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r249051 r249093  
    4848#include "SyntheticEditingCommandType.h"
    4949#include "SystemPreviewController.h"
     50#include "TransactionID.h"
    5051#include "UserMediaPermissionRequestManagerProxy.h"
    5152#include "VisibleContentRectUpdateInfo.h"
     
    667668    int32_t deviceOrientation() const { return m_deviceOrientation; }
    668669    void setOverrideViewportArguments(const Optional<WebCore::ViewportArguments>&);
    669     void willCommitLayerTree(uint64_t transactionID);
     670    void willCommitLayerTree(TransactionID);
    670671
    671672    void selectWithGesture(const WebCore::IntPoint, WebCore::TextGranularity, uint32_t gestureType, uint32_t gestureState, bool isInteractingWithFocusedElement, WTF::Function<void(const WebCore::IntPoint&, uint32_t, uint32_t, uint32_t, CallbackBase::Error)>&&);
     
    12221223
    12231224    void potentialTapAtPosition(const WebCore::FloatPoint&, bool shouldRequestMagnificationInformation, uint64_t& requestID);
    1224     void commitPotentialTap(OptionSet<WebKit::WebEvent::Modifier>, uint64_t layerTreeTransactionIdAtLastTouchStart, WebCore::PointerID);
     1225    void commitPotentialTap(OptionSet<WebKit::WebEvent::Modifier>, TransactionID layerTreeTransactionIdAtLastTouchStart, WebCore::PointerID);
    12251226    void cancelPotentialTap();
    12261227    void tapHighlightAtPosition(const WebCore::FloatPoint&, uint64_t& requestID);
    1227     void handleTap(const WebCore::FloatPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t layerTreeTransactionIdAtLastTouchStart);
     1228    void handleTap(const WebCore::FloatPoint&, OptionSet<WebKit::WebEvent::Modifier>, TransactionID layerTreeTransactionIdAtLastTouchStart);
    12281229    void didRecognizeLongPress();
    1229     void handleDoubleTapForDoubleClickAtPoint(const WebCore::IntPoint&, OptionSet<WebEvent::Modifier>, uint64_t layerTreeTransactionIdAtLastTouchStart);
     1230    void handleDoubleTapForDoubleClickAtPoint(const WebCore::IntPoint&, OptionSet<WebEvent::Modifier>, TransactionID layerTreeTransactionIdAtLastTouchStart);
    12301231
    12311232    void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
     
    21812182    Optional<WebCore::ViewportArguments> m_overrideViewportArguments;
    21822183    VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
    2183     uint64_t m_firstLayerTreeTransactionIdAfterDidCommitLoad { 0 };
     2184    TransactionID m_firstLayerTreeTransactionIdAfterDidCommitLoad;
    21842185    int32_t m_deviceOrientation { 0 };
    21852186    bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad { true };
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h

    r249051 r249093  
    3939#import "SyntheticEditingCommandType.h"
    4040#import "TextCheckingController.h"
     41#import "TransactionID.h"
    4142#import "UIKitSPI.h"
    4243#import "WKActionSheetAssistant.h"
     
    294295
    295296    CGPoint _lastInteractionLocation;
    296     uint64_t _layerTreeTransactionIdAtLastTouchStart;
     297    WebKit::TransactionID _layerTreeTransactionIdAtLastTouchStart;
    297298
    298299    WebKit::WKSelectionDrawingInfo _lastSelectionDrawingInfo;
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r249051 r249093  
    910910#endif
    911911
    912     _layerTreeTransactionIdAtLastTouchStart = 0;
     912    _layerTreeTransactionIdAtLastTouchStart = { };
    913913
    914914#if ENABLE(DATA_INTERACTION)
  • trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r249059 r249093  
    816816}
    817817
    818 void WebPageProxy::commitPotentialTap(OptionSet<WebEvent::Modifier> modifiers, uint64_t layerTreeTransactionIdAtLastTouchStart, WebCore::PointerID pointerId)
     818void WebPageProxy::commitPotentialTap(OptionSet<WebEvent::Modifier> modifiers, TransactionID layerTreeTransactionIdAtLastTouchStart, WebCore::PointerID pointerId)
    819819{
    820820    process().send(Messages::WebPage::CommitPotentialTap(modifiers, layerTreeTransactionIdAtLastTouchStart, pointerId), m_pageID);
     
    831831}
    832832
    833 void WebPageProxy::handleTap(const FloatPoint& location, OptionSet<WebEvent::Modifier> modifiers, uint64_t layerTreeTransactionIdAtLastTouchStart)
     833void WebPageProxy::handleTap(const FloatPoint& location, OptionSet<WebEvent::Modifier> modifiers, TransactionID layerTreeTransactionIdAtLastTouchStart)
    834834{
    835835    process().send(Messages::WebPage::HandleTap(roundedIntPoint(location), modifiers, layerTreeTransactionIdAtLastTouchStart), m_pageID);
     
    841841}
    842842
    843 void WebPageProxy::handleDoubleTapForDoubleClickAtPoint(const WebCore::IntPoint& point, OptionSet<WebEvent::Modifier> modifiers, uint64_t layerTreeTransactionIdAtLastTouchStart)
     843void WebPageProxy::handleDoubleTapForDoubleClickAtPoint(const WebCore::IntPoint& point, OptionSet<WebEvent::Modifier> modifiers, TransactionID layerTreeTransactionIdAtLastTouchStart)
    844844{
    845845    process().send(Messages::WebPage::HandleDoubleTapForDoubleClickAtPoint(point, modifiers, layerTreeTransactionIdAtLastTouchStart), m_pageID);
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r249063 r249093  
    19601960                0F0C365718C051BA00F607D7 /* RemoteLayerTreeHostIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerTreeHostIOS.mm; sourceTree = "<group>"; };
    19611961                0F0C365B18C05CA100F607D7 /* RemoteScrollingCoordinatorProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteScrollingCoordinatorProxyIOS.mm; sourceTree = "<group>"; };
     1962                0F11781422E39BE6008BD570 /* TransactionID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransactionID.h; sourceTree = "<group>"; };
    19621963                0F174AA2142A4CB60039250F /* APIGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIGeometry.h; sourceTree = "<group>"; };
    19631964                0F174AA6142AAC610039250F /* WKGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKGeometry.cpp; sourceTree = "<group>"; };
     
    53005301                                2F809DD51FBD1BC9005FE63A /* TouchBarMenuItemData.cpp */,
    53015302                                2F809DD91FBD1BF2005FE63A /* TouchBarMenuItemData.h */,
     5303                                0F11781422E39BE6008BD570 /* TransactionID.h */,
    53025304                                5C4B9D8A210A8C46008F14D1 /* UndoOrRedo.h */,
    53035305                                1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */,
  • trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h

    r246142 r249093  
    5252    virtual ~RemoteLayerTreeDrawingArea();
    5353
    54     uint64_t nextTransactionID() const { return m_currentTransactionID + 1; }
    55     uint64_t lastCommittedTransactionID() const { return m_currentTransactionID; }
     54    TransactionID nextTransactionID() const { return m_currentTransactionID.next(); }
     55    TransactionID lastCommittedTransactionID() const { return m_currentTransactionID; }
    5656
    5757private:
     
    120120    WebCore::TiledBacking* mainFrameTiledBacking() const;
    121121
    122     uint64_t takeNextTransactionID() { return ++m_currentTransactionID; }
     122    TransactionID takeNextTransactionID() { return m_currentTransactionID.increment(); }
    123123
    124124    bool markLayersVolatileImmediatelyIfPossible() override;
     
    170170    HashSet<RemoteLayerTreeDisplayRefreshMonitor*>* m_displayRefreshMonitorsToNotify { nullptr };
    171171
    172     uint64_t m_currentTransactionID { 0 };
     172    TransactionID m_currentTransactionID;
    173173    Vector<RemoteLayerTreeTransaction::TransactionCallbackID> m_pendingCallbackIDs;
    174174    ActivityStateChangeID m_activityStateChangeID { ActivityStateChangeAsynchronous };
  • trunk/Source/WebKit/WebProcess/WebPage/WebFrame.h

    r248713 r249093  
    2929#include "DownloadID.h"
    3030#include "ShareableBitmap.h"
     31#include "TransactionID.h"
    3132#include "WKBase.h"
    3233#include "WebFrameLoaderClient.h"
     
    168169
    169170#if PLATFORM(IOS_FAMILY)
    170     uint64_t firstLayerTreeTransactionIDAfterDidCommitLoad() const { return m_firstLayerTreeTransactionIDAfterDidCommitLoad; }
    171     void setFirstLayerTreeTransactionIDAfterDidCommitLoad(uint64_t transactionID) { m_firstLayerTreeTransactionIDAfterDidCommitLoad = transactionID; }
     171    TransactionID firstLayerTreeTransactionIDAfterDidCommitLoad() const { return m_firstLayerTreeTransactionIDAfterDidCommitLoad; }
     172    void setFirstLayerTreeTransactionIDAfterDidCommitLoad(TransactionID transactionID) { m_firstLayerTreeTransactionIDAfterDidCommitLoad = transactionID; }
    172173#endif
    173174
     
    191192
    192193#if PLATFORM(IOS_FAMILY)
    193     uint64_t m_firstLayerTreeTransactionIDAfterDidCommitLoad { 0 };
     194    TransactionID m_firstLayerTreeTransactionIDAfterDidCommitLoad;
    194195#endif
    195196};
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r249006 r249093  
    633633    bool hasStablePageScaleFactor() const { return m_hasStablePageScaleFactor; }
    634634
    635     void handleTap(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId);
     635    void handleTap(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, TransactionID lastLayerTreeTransactionId);
    636636    void potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint&, bool shouldRequestMagnificationInformation);
    637     void commitPotentialTap(OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId, WebCore::PointerID);
     637    void commitPotentialTap(OptionSet<WebKit::WebEvent::Modifier>, TransactionID lastLayerTreeTransactionId, WebCore::PointerID);
    638638    void commitPotentialTapFailed();
    639639    void cancelPotentialTap();
     
    641641    void tapHighlightAtPosition(uint64_t requestID, const WebCore::FloatPoint&);
    642642    void didRecognizeLongPress();
    643     void handleDoubleTapForDoubleClickAtPoint(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, uint64_t lastLayerTreeTransactionId);
     643    void handleDoubleTapForDoubleClickAtPoint(const WebCore::IntPoint&, OptionSet<WebKit::WebEvent::Modifier>, TransactionID lastLayerTreeTransactionId);
    644644
    645645    void inspectorNodeSearchMovedToPosition(const WebCore::FloatPoint&);
     
    18811881    Optional<DynamicViewportSizeUpdateID> m_pendingDynamicViewportSizeUpdateID;
    18821882    double m_lastTransactionPageScaleFactor { 0 };
    1883     uint64_t m_lastTransactionIDWithScaleChange { 0 };
     1883    TransactionID m_lastTransactionIDWithScaleChange;
    18841884
    18851885    CompletionHandler<void(InteractionInformationAtPosition&&)> m_pendingSynchronousPositionInformationReply;
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in

    r248847 r249093  
    5454    DynamicViewportSizeUpdate(WebCore::FloatSize viewLayoutSize, WebCore::FloatSize maximumUnobscuredSize, WebCore::FloatRect targetExposedContentRect, WebCore::FloatRect targetUnobscuredRect, WebCore::FloatRect targetUnobscuredRectInScrollViewCoordinates, WebCore::RectEdges<float> targetUnobscuredSafeAreaInsets, double scale, int32_t deviceOrientation, uint64_t dynamicViewportSizeUpdateID)
    5555
    56     HandleTap(WebCore::IntPoint point, OptionSet<WebKit::WebEvent::Modifier> modifiers, uint64_t lastLayerTreeTransactionId)
     56    HandleTap(WebCore::IntPoint point, OptionSet<WebKit::WebEvent::Modifier> modifiers, WebKit::TransactionID lastLayerTreeTransactionId)
    5757    PotentialTapAtPosition(uint64_t requestID, WebCore::FloatPoint point, bool shouldRequestMagnificationInformation)
    58     CommitPotentialTap(OptionSet<WebKit::WebEvent::Modifier> modifiers, uint64_t lastLayerTreeTransactionId, WebCore::PointerID pointerId)
     58    CommitPotentialTap(OptionSet<WebKit::WebEvent::Modifier> modifiers, WebKit::TransactionID lastLayerTreeTransactionId, WebCore::PointerID pointerId)
    5959    CancelPotentialTap()
    6060    TapHighlightAtPosition(uint64_t requestID, WebCore::FloatPoint point)
    6161    DidRecognizeLongPress()
    62     HandleDoubleTapForDoubleClickAtPoint(WebCore::IntPoint point, OptionSet<WebKit::WebEvent::Modifier> modifiers, uint64_t lastLayerTreeTransactionId)
     62    HandleDoubleTapForDoubleClickAtPoint(WebCore::IntPoint point, OptionSet<WebKit::WebEvent::Modifier> modifiers, WebKit::TransactionID lastLayerTreeTransactionId)
    6363    InspectorNodeSearchMovedToPosition(WebCore::FloatPoint point)
    6464    InspectorNodeSearchEndedAtPosition(WebCore::FloatPoint point)
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r249074 r249093  
    816816}
    817817
    818 void WebPage::handleTap(const IntPoint& point, OptionSet<WebEvent::Modifier> modifiers, uint64_t lastLayerTreeTransactionId)
     818void WebPage::handleTap(const IntPoint& point, OptionSet<WebEvent::Modifier> modifiers, TransactionID lastLayerTreeTransactionId)
    819819{
    820820    FloatPoint adjustedPoint;
     
    836836}
    837837
    838 void WebPage::handleDoubleTapForDoubleClickAtPoint(const IntPoint& point, OptionSet<WebEvent::Modifier> modifiers, uint64_t lastLayerTreeTransactionId)
     838void WebPage::handleDoubleTapForDoubleClickAtPoint(const IntPoint& point, OptionSet<WebEvent::Modifier> modifiers, TransactionID lastLayerTreeTransactionId)
    839839{
    840840    FloatPoint adjustedPoint;
     
    10741074}
    10751075
    1076 void WebPage::commitPotentialTap(OptionSet<WebEvent::Modifier> modifiers, uint64_t lastLayerTreeTransactionId, WebCore::PointerID pointerId)
     1076void WebPage::commitPotentialTap(OptionSet<WebEvent::Modifier> modifiers, TransactionID lastLayerTreeTransactionId, WebCore::PointerID pointerId)
    10771077{
    10781078    auto invalidTargetForSingleClick = !m_potentialTapNode;
Note: See TracChangeset for help on using the changeset viewer.