Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a5b860e05c652460c5caa88c10512b427dbb1151
      
https://github.com/WebKit/WebKit/commit/a5b860e05c652460c5caa88c10512b427dbb1151
  Author: Simon Fraser <[email protected]>
  Date:   2026-05-13 (Wed, 13 May 2026)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations
    M Source/WebCore/page/scrolling/ScrollingStateNode.h
    M Source/WebCore/page/scrolling/ScrollingStateStickyNode.h
    M Source/WebCore/page/scrolling/cocoa/ScrollingStateNode.mm
    M 
Source/WebCore/page/scrolling/coordinated/ScrollingStateNodeCoordinated.cpp

  Log Message:
  -----------
  Convert LayerRepresentation to use a variant
rdar://176512851
https://bugs.webkit.org/show_bug.cgi?id=314363

Reviewed by Abrar Rahman Protyasha and Sam Weinig.

LayerRepresentation is basically a variant<> in disguise, so make it use one
internally (hiding clients from dealing with the ugliness of variant<> 
directly).
This removes the error-prone manual ref-counting.

* Source/WebCore/SaferCPPExpectations/ForwardDeclCheckerExpectations:
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
(WebCore::LayerRepresentation::LayerRepresentation):
(WebCore::LayerRepresentation::operator GraphicsLayer* const):
(WebCore::LayerRepresentation::operator ScrollingPlatformLayer* const):
(WebCore::LayerRepresentation::layerID const):
(WebCore::LayerRepresentation::operator bool const):
(WebCore::LayerRepresentation::toRepresentation const):
(WebCore::LayerRepresentation::representsGraphicsLayer const):
(WebCore::LayerRepresentation::representsPlatformLayerID const):
(WebCore::LayerRepresentation::m_representation): Deleted.
(WebCore::LayerRepresentation::~LayerRepresentation): Deleted.
(WebCore::LayerRepresentation::operator=): Deleted.
(WebCore::LayerRepresentation::operator== const):
* Source/WebCore/page/scrolling/ScrollingStateStickyNode.h:
* Source/WebCore/page/scrolling/cocoa/ScrollingStateNode.mm:
(WebCore::LayerRepresentation::retainPlatformLayer): Deleted.
(WebCore::LayerRepresentation::releasePlatformLayer): Deleted.
(WebCore::LayerRepresentation::makePlatformLayerTyped): Deleted.
(WebCore::LayerRepresentation::makePlatformLayerTypeless): Deleted.
* Source/WebCore/page/scrolling/coordinated/ScrollingStateNodeCoordinated.cpp:
(WebCore::LayerRepresentation::retainPlatformLayer): Deleted.
(WebCore::LayerRepresentation::releasePlatformLayer): Deleted.
(WebCore::LayerRepresentation::makePlatformLayerTyped): Deleted.
(WebCore::LayerRepresentation::makePlatformLayerTypeless): Deleted.

Canonical link: https://commits.webkit.org/313219@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to