Skip to content

Commit

Permalink
Adopt more smart pointers in LocalFrame
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=263978

Reviewed by Ryosuke Niwa.

* Source/WebCore/animation/DocumentTimelinesController.h:
* Source/WebCore/editing/Editor.h:
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::LocalFrame):
(WebCore::LocalFrame::init):
(WebCore::LocalFrame::~LocalFrame):
(WebCore::LocalFrame::setView):
(WebCore::LocalFrame::checkedEditor):
(WebCore::LocalFrame::checkedEditor const):
(WebCore::LocalFrame::setDocument):
(WebCore::LocalFrame::frameDetached):
(WebCore::LocalFrame::preventsParentFromBeingComplete const):
(WebCore::LocalFrame::changeLocation):
(WebCore::LocalFrame::broadcastFrameRemovalToOtherProcesses):
(WebCore::LocalFrame::didFinishLoadInAnotherProcess):
(WebCore::LocalFrame::invalidateContentEventRegionsIfNeeded):
(WebCore::LocalFrame::orientation const):
(WebCore::LocalFrame::searchForLabelsAboveCell):
(WebCore::LocalFrame::searchForLabelsBeforeElement):
(WebCore::LocalFrame::setPrinting):
(WebCore::LocalFrame::injectUserScripts):
(WebCore::LocalFrame::injectUserScriptImmediately):
(WebCore::LocalFrame::clearTimers):
(WebCore::LocalFrame::willDetachPage):
(WebCore::LocalFrame::visiblePositionForPoint const):
(WebCore::LocalFrame::documentAtPoint):
(WebCore::LocalFrame::rangeForPoint):
(WebCore::LocalFrame::createView):
(WebCore::LocalFrame::trackedRepaintRectsAsText const):
(WebCore::LocalFrame::setPageAndTextZoomFactors):
(WebCore::LocalFrame::frameScaleFactor const):
(WebCore::LocalFrame::suspendActiveDOMObjectsAndAnimations):
(WebCore::LocalFrame::resumeActiveDOMObjectsAndAnimations):
(WebCore::LocalFrame::deviceOrPageScaleFactorChanged):
(WebCore::LocalFrame::dropChildren):
(WebCore::LocalFrame::screenSize const):
(WebCore::LocalFrame::setOverrideScreenSize):
(WebCore::LocalFrame::documentURLDidChange):
* Source/WebCore/page/LocalFrame.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::protectedScrollingCoordinator):
(WebCore::Page::protectedUserContentProvider):
* Source/WebCore/page/Page.h:

Canonical link: https://commits.webkit.org/270055@main
  • Loading branch information
cdumez committed Nov 1, 2023
1 parent dd53842 commit af57729
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 101 deletions.
3 changes: 2 additions & 1 deletion Source/WebCore/animation/DocumentTimelinesController.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "ReducedResolutionSeconds.h"
#include "Timer.h"
#include <wtf/CancellableTask.h>
#include <wtf/CheckedRef.h>
#include <wtf/Markable.h>
#include <wtf/Seconds.h>
#include <wtf/WeakHashSet.h>
Expand All @@ -41,7 +42,7 @@ class DocumentTimeline;
class WebAnimation;

DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(DocumentTimelinesController);
class DocumentTimelinesController {
class DocumentTimelinesController : public CanMakeCheckedPtr {
WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(DocumentTimelinesController);
public:
explicit DocumentTimelinesController(Document&);
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/editing/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "VisibleSelection.h"
#include "WritingDirection.h"
#include <memory>
#include <wtf/CheckedRef.h>

#if PLATFORM(COCOA)
OBJC_CLASS NSAttributedString;
Expand Down Expand Up @@ -170,7 +171,7 @@ class IgnoreSelectionChangeForScope {
TemporarySelectionChange m_selectionChange;
};

class Editor {
class Editor : public CanMakeCheckedPtr {
WTF_MAKE_FAST_ALLOCATED;
public:
explicit Editor(Document&);
Expand Down
Loading

0 comments on commit af57729

Please sign in to comment.