Use Ref instead of PassRefPtr in WebCore/page
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 May 2015 05:53:20 +0000 (05:53 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 May 2015 05:53:20 +0000 (05:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144841

Reviewed by Darin Adler.

To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
in WebCore/page.

Source/WebCore:

No new tests, no behavior changes.

* page/DebugPageOverlays.cpp:
* page/EventSource.cpp:
(WebCore::EventSource::create):
* page/EventSource.h:
* page/History.h:
(WebCore::History::create):
* page/Location.h:
(WebCore::Location::create):
* page/MainFrame.cpp:
(WebCore::MainFrame::create):
* page/MainFrame.h:
* page/Navigator.h:
(WebCore::Navigator::create):
* page/PageOverlay.cpp:
(WebCore::PageOverlay::create):
* page/PageOverlay.h:
* page/Performance.h:
* page/PerformanceEntryList.h:
(WebCore::PerformanceEntryList::create):
* page/PerformanceMark.h:
(WebCore::PerformanceMark::create):
* page/PerformanceMeasure.h:
(WebCore::PerformanceMeasure::create):
* page/PerformanceNavigation.h:
(WebCore::PerformanceNavigation::create):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::create):
* page/PerformanceTiming.h:
(WebCore::PerformanceTiming::create):
* page/PerformanceUserTiming.h:
(WebCore::UserTiming::create):
* page/Screen.h:
* page/Settings.cpp:
(WebCore::Settings::create):
* page/Settings.h:
* page/TextIndicator.cpp:
(WebCore::TextIndicator::create):
* page/TextIndicator.h:
* page/UserContentController.cpp:
(WebCore::UserContentController::create):
* page/UserContentController.h:
* page/UserMessageHandlerDescriptor.h:
(WebCore::UserMessageHandlerDescriptor::create):
* page/UserMessageHandlersNamespace.h:
* page/VisitedLinkStore.h:
* page/WebKitNamespace.h:
(WebCore::WebKitNamespace::create):
* page/WebKitPoint.h:
(WebCore::WebKitPoint::create):
* page/WorkerNavigator.h:
(WebCore::WorkerNavigator::create):
* page/animation/ImplicitAnimation.h:
(WebCore::ImplicitAnimation::create):
* page/animation/KeyframeAnimation.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::createForSelection):
(WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::create):
(WebCore::ScrollingStateFixedNode::clone):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::create):
(WebCore::ScrollingStateFrameScrollingNode::clone):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::create):
(WebCore::ScrollingStateOverflowScrollingNode::clone):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::create):
(WebCore::ScrollingStateStickyNode::clone):
* page/scrolling/ScrollingStateStickyNode.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::create):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::create):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::create):
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::create):
* page/scrolling/mac/ScrollingTreeMac.h:
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::create):

Source/WebKit2:

(WebKit::WebUserContentController::WebUserContentController):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::WebUserContentController):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

66 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/DebugPageOverlays.cpp
Source/WebCore/page/EventSource.cpp
Source/WebCore/page/EventSource.h
Source/WebCore/page/History.h
Source/WebCore/page/Location.h
Source/WebCore/page/MainFrame.cpp
Source/WebCore/page/MainFrame.h
Source/WebCore/page/Navigator.h
Source/WebCore/page/PageOverlay.cpp
Source/WebCore/page/PageOverlay.h
Source/WebCore/page/Performance.h
Source/WebCore/page/PerformanceEntryList.h
Source/WebCore/page/PerformanceMark.h
Source/WebCore/page/PerformanceMeasure.h
Source/WebCore/page/PerformanceNavigation.h
Source/WebCore/page/PerformanceResourceTiming.h
Source/WebCore/page/PerformanceTiming.h
Source/WebCore/page/PerformanceUserTiming.h
Source/WebCore/page/Screen.h
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/TextIndicator.cpp
Source/WebCore/page/TextIndicator.h
Source/WebCore/page/UserContentController.cpp
Source/WebCore/page/UserContentController.h
Source/WebCore/page/UserMessageHandlerDescriptor.h
Source/WebCore/page/UserMessageHandlersNamespace.h
Source/WebCore/page/VisitedLinkStore.h
Source/WebCore/page/WebKitNamespace.h
Source/WebCore/page/WebKitPoint.h
Source/WebCore/page/WorkerNavigator.h
Source/WebCore/page/animation/ImplicitAnimation.h
Source/WebCore/page/animation/KeyframeAnimation.h
Source/WebCore/page/mac/ServicesOverlayController.h
Source/WebCore/page/mac/ServicesOverlayController.mm
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp
Source/WebCore/page/scrolling/ScrollingStateFixedNode.h
Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h
Source/WebCore/page/scrolling/ScrollingStateNode.h
Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h
Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp
Source/WebCore/page/scrolling/ScrollingStateStickyNode.h
Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm
Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h
Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm
Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp
Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp
Source/WebCore/page/scrolling/mac/ScrollingTreeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm
Source/WebKit/mac/WebCoreSupport/WebViewGroup.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp

index d5e6273..2a5dfa9 100644 (file)
@@ -1,3 +1,115 @@
+2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Use Ref instead of PassRefPtr in WebCore/page
+        https://bugs.webkit.org/show_bug.cgi?id=144841
+
+        Reviewed by Darin Adler.
+
+        To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
+        in WebCore/page.
+
+        No new tests, no behavior changes.
+
+        * page/DebugPageOverlays.cpp:
+        * page/EventSource.cpp:
+        (WebCore::EventSource::create):
+        * page/EventSource.h:
+        * page/History.h:
+        (WebCore::History::create):
+        * page/Location.h:
+        (WebCore::Location::create):
+        * page/MainFrame.cpp:
+        (WebCore::MainFrame::create):
+        * page/MainFrame.h:
+        * page/Navigator.h:
+        (WebCore::Navigator::create):
+        * page/PageOverlay.cpp:
+        (WebCore::PageOverlay::create):
+        * page/PageOverlay.h:
+        * page/Performance.h:
+        * page/PerformanceEntryList.h:
+        (WebCore::PerformanceEntryList::create):
+        * page/PerformanceMark.h:
+        (WebCore::PerformanceMark::create):
+        * page/PerformanceMeasure.h:
+        (WebCore::PerformanceMeasure::create):
+        * page/PerformanceNavigation.h:
+        (WebCore::PerformanceNavigation::create):
+        * page/PerformanceResourceTiming.h:
+        (WebCore::PerformanceResourceTiming::create):
+        * page/PerformanceTiming.h:
+        (WebCore::PerformanceTiming::create):
+        * page/PerformanceUserTiming.h:
+        (WebCore::UserTiming::create):
+        * page/Screen.h:
+        * page/Settings.cpp:
+        (WebCore::Settings::create):
+        * page/Settings.h:
+        * page/TextIndicator.cpp:
+        (WebCore::TextIndicator::create):
+        * page/TextIndicator.h:
+        * page/UserContentController.cpp:
+        (WebCore::UserContentController::create):
+        * page/UserContentController.h:
+        * page/UserMessageHandlerDescriptor.h:
+        (WebCore::UserMessageHandlerDescriptor::create):
+        * page/UserMessageHandlersNamespace.h:
+        * page/VisitedLinkStore.h:
+        * page/WebKitNamespace.h:
+        (WebCore::WebKitNamespace::create):
+        * page/WebKitPoint.h:
+        (WebCore::WebKitPoint::create):
+        * page/WorkerNavigator.h:
+        (WebCore::WorkerNavigator::create):
+        * page/animation/ImplicitAnimation.h:
+        (WebCore::ImplicitAnimation::create):
+        * page/animation/KeyframeAnimation.h:
+        * page/mac/ServicesOverlayController.h:
+        * page/mac/ServicesOverlayController.mm:
+        (WebCore::ServicesOverlayController::Highlight::createForSelection):
+        (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::create):
+        * page/scrolling/ScrollingCoordinator.h:
+        * page/scrolling/ScrollingStateFixedNode.cpp:
+        (WebCore::ScrollingStateFixedNode::create):
+        (WebCore::ScrollingStateFixedNode::clone):
+        * page/scrolling/ScrollingStateFixedNode.h:
+        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
+        (WebCore::ScrollingStateFrameScrollingNode::create):
+        (WebCore::ScrollingStateFrameScrollingNode::clone):
+        * page/scrolling/ScrollingStateFrameScrollingNode.h:
+        * page/scrolling/ScrollingStateNode.h:
+        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
+        (WebCore::ScrollingStateOverflowScrollingNode::create):
+        (WebCore::ScrollingStateOverflowScrollingNode::clone):
+        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
+        * page/scrolling/ScrollingStateStickyNode.cpp:
+        (WebCore::ScrollingStateStickyNode::create):
+        (WebCore::ScrollingStateStickyNode::clone):
+        * page/scrolling/ScrollingStateStickyNode.h:
+        * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
+        (WebCore::ScrollingCoordinator::create):
+        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
+        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
+        * page/scrolling/ios/ScrollingTreeIOS.cpp:
+        (WebCore::ScrollingTreeIOS::create):
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinator::create):
+        * page/scrolling/mac/ScrollingTreeFixedNode.h:
+        * page/scrolling/mac/ScrollingTreeFixedNode.mm:
+        (WebCore::ScrollingTreeFixedNode::create):
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
+        * page/scrolling/mac/ScrollingTreeMac.cpp:
+        (ScrollingTreeMac::create):
+        * page/scrolling/mac/ScrollingTreeMac.h:
+        * page/scrolling/mac/ScrollingTreeStickyNode.h:
+        * page/scrolling/mac/ScrollingTreeStickyNode.mm:
+        (WebCore::ScrollingTreeStickyNode::create):
+
 2015-05-10  Simon Fraser  <simon.fraser@apple.com>
 
         background-position sometimes doesn't work properly with background-attachment: fixed
index c317653..cae43da 100644 (file)
@@ -74,9 +74,9 @@ protected:
 
 class MouseWheelRegionOverlay final : public RegionOverlay {
 public:
-    static PassRefPtr<MouseWheelRegionOverlay> create(MainFrame& frame)
+    static Ref<MouseWheelRegionOverlay> create(MainFrame& frame)
     {
-        return adoptRef(new MouseWheelRegionOverlay(frame));
+        return adoptRef(*new MouseWheelRegionOverlay(frame));
     }
 
 private:
@@ -113,9 +113,9 @@ bool MouseWheelRegionOverlay::updateRegion()
 
 class NonFastScrollableRegionOverlay final : public RegionOverlay {
 public:
-    static PassRefPtr<NonFastScrollableRegionOverlay> create(MainFrame& frame)
+    static Ref<NonFastScrollableRegionOverlay> create(MainFrame& frame)
     {
-        return adoptRef(new NonFastScrollableRegionOverlay(frame));
+        return adoptRef(*new NonFastScrollableRegionOverlay(frame));
     }
 
 private:
index 854a5a8..3d70de9 100644 (file)
@@ -72,7 +72,7 @@ inline EventSource::EventSource(ScriptExecutionContext& context, const URL& url,
     eventSourceInit.get("withCredentials", m_withCredentials);
 }
 
-PassRefPtr<EventSource> EventSource::create(ScriptExecutionContext& context, const String& url, const Dictionary& eventSourceInit, ExceptionCode& ec)
+RefPtr<EventSource> EventSource::create(ScriptExecutionContext& context, const String& url, const Dictionary& eventSourceInit, ExceptionCode& ec)
 {
     if (url.isEmpty()) {
         ec = SYNTAX_ERR;
index 50c0e57..7cdb136 100644 (file)
@@ -51,7 +51,7 @@ class ThreadableLoader;
 class EventSource final : public RefCounted<EventSource>, public EventTargetWithInlineData, private ThreadableLoaderClient, public ActiveDOMObject {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassRefPtr<EventSource> create(ScriptExecutionContext&, const String& url, const Dictionary&, ExceptionCode&);
+    static RefPtr<EventSource> create(ScriptExecutionContext&, const String& url, const Dictionary&, ExceptionCode&);
     virtual ~EventSource();
 
     static const unsigned long long defaultReconnectDelay;
index f8e1fd1..1454c44 100644 (file)
@@ -42,7 +42,7 @@ typedef int ExceptionCode;
 
 class History : public ScriptWrappable, public RefCounted<History>, public DOMWindowProperty {
 public:
-    static PassRefPtr<History> create(Frame* frame) { return adoptRef(new History(frame)); }
+    static Ref<History> create(Frame* frame) { return adoptRef(*new History(frame)); }
 
     unsigned length() const;
     PassRefPtr<SerializedScriptValue> state();
index 3338879..9566da4 100644 (file)
@@ -46,7 +46,7 @@ typedef int ExceptionCode;
 
 class Location : public ScriptWrappable, public RefCounted<Location>, public DOMWindowProperty {
 public:
-    static PassRefPtr<Location> create(Frame* frame) { return adoptRef(new Location(frame)); }
+    static Ref<Location> create(Frame* frame) { return adoptRef(*new Location(frame)); }
 
     void setHref(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
     String href() const;
index 7b7e003..bfd1eac 100644 (file)
@@ -61,9 +61,9 @@ MainFrame::~MainFrame()
         m_diagnosticLoggingClient->mainFrameDestroyed();
 }
 
-RefPtr<MainFrame> MainFrame::create(Page& page, PageConfiguration& configuration)
+Ref<MainFrame> MainFrame::create(Page& page, PageConfiguration& configuration)
 {
-    return adoptRef(new MainFrame(page, configuration));
+    return adoptRef(*new MainFrame(page, configuration));
 }
 
 void MainFrame::selfOnlyRef()
index 9cf8ca5..2841253 100644 (file)
@@ -40,7 +40,7 @@ class WheelEventDeltaTracker;
 
 class MainFrame final : public Frame {
 public:
-    static RefPtr<MainFrame> create(Page&, PageConfiguration&);
+    static Ref<MainFrame> create(Page&, PageConfiguration&);
 
     virtual ~MainFrame();
 
index c6d38aa..16abdd8 100644 (file)
@@ -41,7 +41,7 @@ typedef int ExceptionCode;
 
 class Navigator : public NavigatorBase, public ScriptWrappable, public RefCounted<Navigator>, public DOMWindowProperty, public Supplementable<Navigator> {
 public:
-    static PassRefPtr<Navigator> create(Frame* frame) { return adoptRef(new Navigator(frame)); }
+    static Ref<Navigator> create(Frame* frame) { return adoptRef(*new Navigator(frame)); }
     virtual ~Navigator();
 
     String appVersion() const;
index 6fc3247..a9b91cd 100644 (file)
@@ -46,9 +46,9 @@ static PageOverlay::PageOverlayID generatePageOverlayID()
     return ++pageOverlayID;
 }
 
-PassRefPtr<PageOverlay> PageOverlay::create(Client& client, OverlayType overlayType)
+Ref<PageOverlay> PageOverlay::create(Client& client, OverlayType overlayType)
 {
-    return adoptRef(new PageOverlay(client, overlayType));
+    return adoptRef(*new PageOverlay(client, overlayType));
 }
 
 PageOverlay::PageOverlay(Client& client, OverlayType overlayType)
index 8ab6c45..f723650 100644 (file)
@@ -69,7 +69,7 @@ public:
         Document, // Scales and scrolls with the document.
     };
 
-    WEBCORE_EXPORT static PassRefPtr<PageOverlay> create(Client&, OverlayType = OverlayType::View);
+    WEBCORE_EXPORT static Ref<PageOverlay> create(Client&, OverlayType = OverlayType::View);
     WEBCORE_EXPORT virtual ~PageOverlay();
 
     WEBCORE_EXPORT PageOverlayController* controller() const;
index 76e49b4..d268018 100644 (file)
@@ -54,7 +54,7 @@ class UserTiming;
 
 class Performance final : public ScriptWrappable, public RefCounted<Performance>, public DOMWindowProperty, public EventTargetWithInlineData {
 public:
-    static PassRefPtr<Performance> create(Frame* frame) { return adoptRef(new Performance(frame)); }
+    static Ref<Performance> create(Frame* frame) { return adoptRef(*new Performance(frame)); }
     ~Performance();
 
     virtual EventTargetInterface eventTargetInterface() const override { return PerformanceEventTargetInterfaceType; }
index d900287..97a212d 100644 (file)
@@ -45,7 +45,7 @@ class PerformanceEntry;
 
 class PerformanceEntryList : public RefCounted<PerformanceEntryList> {
 public:
-    static PassRefPtr<PerformanceEntryList> create() { return adoptRef(new PerformanceEntryList); }
+    static Ref<PerformanceEntryList> create() { return adoptRef(*new PerformanceEntryList); }
     ~PerformanceEntryList();
 
     unsigned length() const;
index 64b39ab..cd71a02 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
 
 class PerformanceMark : public PerformanceEntry {
 public:
-    static PassRefPtr<PerformanceMark> create(const String& name, double startTime) { return adoptRef(new PerformanceMark(name, startTime)); }
+    static Ref<PerformanceMark> create(const String& name, double startTime) { return adoptRef(*new PerformanceMark(name, startTime)); }
 
     virtual bool isMark() { return true; }
     
index 6556495..af3e36e 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
 
 class PerformanceMeasure : public PerformanceEntry {
 public:
-    static PassRefPtr<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(new PerformanceMeasure(name, startTime, duration)); }
+    static Ref<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(*new PerformanceMeasure(name, startTime, duration)); }
 
     virtual bool isMeasure() { return true; }
 
index f397923..2acc60b 100644 (file)
@@ -43,7 +43,7 @@ class Frame;
 
 class PerformanceNavigation : public RefCounted<PerformanceNavigation>, public DOMWindowProperty {
 public:
-    static PassRefPtr<PerformanceNavigation> create(Frame* frame) { return adoptRef(new PerformanceNavigation(frame)); }
+    static Ref<PerformanceNavigation> create(Frame* frame) { return adoptRef(*new PerformanceNavigation(frame)); }
 
     enum PerformanceNavigationType {
         TYPE_NAVIGATE,
index e785a46..99dfc5b 100644 (file)
@@ -50,9 +50,9 @@ class ResourceResponse;
 
 class PerformanceResourceTiming : public PerformanceEntry {
 public:
-    static PassRefPtr<PerformanceResourceTiming> create(const AtomicString& initiatorType, const ResourceRequest& request, const ResourceResponse& response, double initiationTime, double finishTime, Document* requestingDocument)
+    static Ref<PerformanceResourceTiming> create(const AtomicString& initiatorType, const ResourceRequest& request, const ResourceResponse& response, double initiationTime, double finishTime, Document* requestingDocument)
     {
-        return adoptRef(new PerformanceResourceTiming(initiatorType, request, response, initiationTime, finishTime, requestingDocument));
+        return adoptRef(*new PerformanceResourceTiming(initiatorType, request, response, initiationTime, finishTime, requestingDocument));
     }
 
     AtomicString initiatorType() const;
index b614f13..e54188a 100644 (file)
@@ -47,7 +47,7 @@ class ResourceLoadTiming;
 
 class PerformanceTiming : public RefCounted<PerformanceTiming>, public DOMWindowProperty {
 public:
-    static PassRefPtr<PerformanceTiming> create(Frame* frame) { return adoptRef(new PerformanceTiming(frame)); }
+    static Ref<PerformanceTiming> create(Frame* frame) { return adoptRef(*new PerformanceTiming(frame)); }
 
     unsigned long long navigationStart() const;
     unsigned long long unloadEventStart() const;
index 14c8c3f..aa23fde 100644 (file)
@@ -48,7 +48,7 @@ typedef HashMap<String, Vector<RefPtr<PerformanceEntry> > > PerformanceEntryMap;
 
 class UserTiming : public RefCounted<UserTiming> {
 public:
-    static PassRefPtr<UserTiming> create(Performance* performance) { return adoptRef(new UserTiming(performance)); }
+    static Ref<UserTiming> create(Performance* performance) { return adoptRef(*new UserTiming(performance)); }
 
     void mark(const String& markName, ExceptionCode&);
     void clearMarks(const String& markName);
index 9472e11..0edcd1a 100644 (file)
@@ -41,7 +41,7 @@ class Frame;
 
 class Screen final : public ScriptWrappable, public RefCounted<Screen>, public DOMWindowProperty {
 public:
-    static PassRefPtr<Screen> create(Frame* frame) { return adoptRef(new Screen(frame)); }
+    static Ref<Screen> create(Frame* frame) { return adoptRef(*new Screen(frame)); }
 
     unsigned height() const;
     unsigned width() const;
index 1f0d71b..781589a 100644 (file)
@@ -213,9 +213,9 @@ Settings::~Settings()
 {
 }
 
-PassRefPtr<Settings> Settings::create(Page* page)
+Ref<Settings> Settings::create(Page* page)
 {
-    return adoptRef(new Settings(page));
+    return adoptRef(*new Settings(page));
 }
 
 SETTINGS_SETTER_BODIES
index 54115f9..8e0b529 100644 (file)
@@ -71,7 +71,7 @@ typedef unsigned DebugOverlayRegions;
 class Settings : public RefCounted<Settings> {
     WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassRefPtr<Settings> create(Page*);
+    static Ref<Settings> create(Page*);
     ~Settings();
 
     void pageDestroyed() { m_page = nullptr; }
index 9f1364d..4862e47 100644 (file)
@@ -85,12 +85,12 @@ static bool textIndicatorsForTextRectsOverlap(const Vector<FloatRect>& textRects
     return false;
 }
 
-PassRefPtr<TextIndicator> TextIndicator::create(const TextIndicatorData& data)
+Ref<TextIndicator> TextIndicator::create(const TextIndicatorData& data)
 {
-    return adoptRef(new TextIndicator(data));
+    return adoptRef(*new TextIndicator(data));
 }
 
-PassRefPtr<TextIndicator> TextIndicator::createWithRange(const Range& range, TextIndicatorPresentationTransition presentationTransition)
+RefPtr<TextIndicator> TextIndicator::createWithRange(const Range& range, TextIndicatorPresentationTransition presentationTransition)
 {
     Frame* frame = range.startContainer()->document().frame();
 
@@ -109,7 +109,7 @@ PassRefPtr<TextIndicator> TextIndicator::createWithRange(const Range& range, Tex
 
 // FIXME (138889): Ideally the FrameSnapshotting functions would be more flexible
 // and we wouldn't have to implement this here.
-static PassRefPtr<Image> snapshotSelectionWithHighlight(Frame& frame)
+static RefPtr<Image> snapshotSelectionWithHighlight(Frame& frame)
 {
     auto& selection = frame.selection();
 
@@ -130,7 +130,7 @@ static PassRefPtr<Image> snapshotSelectionWithHighlight(Frame& frame)
     return snapshot->copyImage(CopyBackingStore, Unscaled);
 }
 
-PassRefPtr<TextIndicator> TextIndicator::createWithSelectionInFrame(Frame& frame, TextIndicatorPresentationTransition presentationTransition)
+RefPtr<TextIndicator> TextIndicator::createWithSelectionInFrame(Frame& frame, TextIndicatorPresentationTransition presentationTransition)
 {
     IntRect selectionRect = enclosingIntRect(frame.selection().selectionBounds());
     std::unique_ptr<ImageBuffer> indicatorBuffer = snapshotSelection(frame, SnapshotOptionsForceBlackText);
index c664fb6..c6c9ffb 100644 (file)
@@ -81,9 +81,9 @@ struct TextIndicatorData {
 
 class TextIndicator : public RefCounted<TextIndicator> {
 public:
-    WEBCORE_EXPORT static PassRefPtr<TextIndicator> create(const TextIndicatorData&);
-    WEBCORE_EXPORT static PassRefPtr<TextIndicator> createWithSelectionInFrame(Frame&, TextIndicatorPresentationTransition);
-    WEBCORE_EXPORT static PassRefPtr<TextIndicator> createWithRange(const Range&, TextIndicatorPresentationTransition);
+    WEBCORE_EXPORT static Ref<TextIndicator> create(const TextIndicatorData&);
+    WEBCORE_EXPORT static RefPtr<TextIndicator> createWithSelectionInFrame(Frame&, TextIndicatorPresentationTransition);
+    WEBCORE_EXPORT static RefPtr<TextIndicator> createWithRange(const Range&, TextIndicatorPresentationTransition);
 
     WEBCORE_EXPORT ~TextIndicator();
 
index 3d6494c..eea951a 100644 (file)
@@ -45,9 +45,9 @@
 
 namespace WebCore {
 
-RefPtr<UserContentController> UserContentController::create()
+Ref<UserContentController> UserContentController::create()
 {
-    return adoptRef(new UserContentController);
+    return adoptRef(*new UserContentController);
 }
 
 UserContentController::UserContentController()
index 663014e..d9797ea 100644 (file)
@@ -60,7 +60,7 @@ struct Action;
 
 class UserContentController : public RefCounted<UserContentController> {
 public:
-    WEBCORE_EXPORT static RefPtr<UserContentController> create();
+    WEBCORE_EXPORT static Ref<UserContentController> create();
     WEBCORE_EXPORT ~UserContentController();
 
     void addPage(Page&);
index 644bae7..44db3af 100644 (file)
@@ -48,9 +48,9 @@ public:
         virtual void didPostMessage(UserMessageHandler&, SerializedScriptValue*) = 0;
     };
 
-    static PassRefPtr<UserMessageHandlerDescriptor> create(const AtomicString& name, DOMWrapperWorld& world, Client& client)
+    static Ref<UserMessageHandlerDescriptor> create(const AtomicString& name, DOMWrapperWorld& world, Client& client)
     {
-        return adoptRef(new UserMessageHandlerDescriptor(name, world, client));
+        return adoptRef(*new UserMessageHandlerDescriptor(name, world, client));
     }
     WEBCORE_EXPORT ~UserMessageHandlerDescriptor();
 
index 36f9b2d..4eecb50 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "FrameDestructionObserver.h"
 #include "UserMessageHandler.h"
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
index 3e4703c..4594a59 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
index 658d0e1..f85f419 100644 (file)
@@ -29,7 +29,6 @@
 #if ENABLE(USER_MESSAGE_HANDLERS)
 
 #include "DOMWindowProperty.h"
-#include <wtf/PassRefPtr.h>
 #include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 
@@ -40,9 +39,9 @@ class UserMessageHandlersNamespace;
 
 class WebKitNamespace : public DOMWindowProperty, public RefCounted<WebKitNamespace> {
 public:
-    static PassRefPtr<WebKitNamespace> create(Frame& frame)
+    static Ref<WebKitNamespace> create(Frame& frame)
     {
-        return adoptRef(new WebKitNamespace(frame));
+        return adoptRef(*new WebKitNamespace(frame));
     }
 
     virtual ~WebKitNamespace();
index 4004724..64ffaed 100644 (file)
@@ -34,13 +34,13 @@ namespace WebCore {
     class WebKitPoint : public RefCounted<WebKitPoint> {
     public:
 
-        static PassRefPtr<WebKitPoint> create()
+        static Ref<WebKitPoint> create()
         {
-            return adoptRef(new WebKitPoint());
+            return adoptRef(*new WebKitPoint);
         }
-        static PassRefPtr<WebKitPoint> create(float x, float y)
+        static Ref<WebKitPoint> create(float x, float y)
         {
-            return adoptRef(new WebKitPoint(x, y));
+            return adoptRef(*new WebKitPoint(x, y));
         }
 
         float x() const { return m_x; }
index cff07ae..3aeeaab 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 class WorkerNavigator : public NavigatorBase, public RefCounted<WorkerNavigator>, public Supplementable<WorkerNavigator> {
 public:
-    static PassRefPtr<WorkerNavigator> create(const String& userAgent) { return adoptRef(new WorkerNavigator(userAgent)); }
+    static Ref<WorkerNavigator> create(const String& userAgent) { return adoptRef(*new WorkerNavigator(userAgent)); }
     virtual ~WorkerNavigator();
 
     virtual String userAgent() const;
index 16d6702..c342597 100644 (file)
@@ -41,9 +41,9 @@ class RenderElement;
 // for a single RenderElement.
 class ImplicitAnimation : public AnimationBase {
 public:
-    static PassRefPtr<ImplicitAnimation> create(Animation& animation, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compositeAnimation, RenderStyle* fromStyle)
+    static Ref<ImplicitAnimation> create(Animation& animation, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compositeAnimation, RenderStyle* fromStyle)
     {
-        return adoptRef(new ImplicitAnimation(animation, animatingProperty, renderer, compositeAnimation, fromStyle));
+        return adoptRef(*new ImplicitAnimation(animation, animatingProperty, renderer, compositeAnimation, fromStyle));
     };
     
     CSSPropertyID transitionProperty() const { return m_transitionProperty; }
index e43243c..328404b 100644 (file)
@@ -40,9 +40,9 @@ class RenderStyle;
 // A KeyframeAnimation tracks the state of an explicit animation for a single RenderElement.
 class KeyframeAnimation final : public AnimationBase {
 public:
-    static RefPtr<KeyframeAnimation> create(Animation& animation, RenderElement* renderer, int index, CompositeAnimation* compositeAnimation, RenderStyle* unanimatedStyle)
+    static Ref<KeyframeAnimation> create(Animation& animation, RenderElement* renderer, int index, CompositeAnimation* compositeAnimation, RenderStyle* unanimatedStyle)
     {
-        return adoptRef(new KeyframeAnimation(animation, renderer, index, compositeAnimation, unanimatedStyle));
+        return adoptRef(*new KeyframeAnimation(animation, renderer, index, compositeAnimation, unanimatedStyle));
     }
 
     virtual bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, RenderStyle* targetStyle, RefPtr<RenderStyle>& animatedStyle) override;
index 3ce8f01..07e362f 100644 (file)
@@ -57,8 +57,8 @@ private:
     class Highlight : public RefCounted<Highlight>, private GraphicsLayerClient {
         WTF_MAKE_NONCOPYABLE(Highlight);
     public:
-        static PassRefPtr<Highlight> createForSelection(ServicesOverlayController&, RetainPtr<DDHighlightRef>, PassRefPtr<Range>);
-        static PassRefPtr<Highlight> createForTelephoneNumber(ServicesOverlayController&, RetainPtr<DDHighlightRef>, PassRefPtr<Range>);
+        static Ref<Highlight> createForSelection(ServicesOverlayController&, RetainPtr<DDHighlightRef>, PassRefPtr<Range>);
+        static Ref<Highlight> createForTelephoneNumber(ServicesOverlayController&, RetainPtr<DDHighlightRef>, PassRefPtr<Range>);
         ~Highlight();
 
         void invalidate();
index ef939d5..9398230 100644 (file)
@@ -55,14 +55,14 @@ const float highlightFadeAnimationDuration = 0.3;
 
 namespace WebCore {
 
-PassRefPtr<ServicesOverlayController::Highlight> ServicesOverlayController::Highlight::createForSelection(ServicesOverlayController& controller, RetainPtr<DDHighlightRef> ddHighlight, PassRefPtr<Range> range)
+Ref<ServicesOverlayController::Highlight> ServicesOverlayController::Highlight::createForSelection(ServicesOverlayController& controller, RetainPtr<DDHighlightRef> ddHighlight, PassRefPtr<Range> range)
 {
-    return adoptRef(new Highlight(controller, Type::Selection, ddHighlight, range));
+    return adoptRef(*new Highlight(controller, Type::Selection, ddHighlight, range));
 }
 
-PassRefPtr<ServicesOverlayController::Highlight> ServicesOverlayController::Highlight::createForTelephoneNumber(ServicesOverlayController& controller, RetainPtr<DDHighlightRef> ddHighlight, PassRefPtr<Range> range)
+Ref<ServicesOverlayController::Highlight> ServicesOverlayController::Highlight::createForTelephoneNumber(ServicesOverlayController& controller, RetainPtr<DDHighlightRef> ddHighlight, PassRefPtr<Range> range)
 {
-    return adoptRef(new Highlight(controller, Type::TelephoneNumber, ddHighlight, range));
+    return adoptRef(*new Highlight(controller, Type::TelephoneNumber, ddHighlight, range));
 }
 
 ServicesOverlayController::Highlight::Highlight(ServicesOverlayController& controller, Type type, RetainPtr<DDHighlightRef> ddHighlight, PassRefPtr<WebCore::Range> range)
index e367bf2..333afc8 100644 (file)
 namespace WebCore {
 
 #if !PLATFORM(COCOA)
-PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
+Ref<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
 {
 #if USE(COORDINATED_GRAPHICS)
-    return adoptRef(new ScrollingCoordinatorCoordinatedGraphics(page));
+    return adoptRef(*new ScrollingCoordinatorCoordinatedGraphics(page));
 #endif
 
-    return adoptRef(new ScrollingCoordinator(page));
+    return adoptRef(*new ScrollingCoordinator(page));
 }
 #endif
 
index 7be0a3d..07c607a 100644 (file)
@@ -106,7 +106,7 @@ struct ScrollableAreaParameters {
 
 class ScrollingCoordinator : public ThreadSafeRefCounted<ScrollingCoordinator> {
 public:
-    static PassRefPtr<ScrollingCoordinator> create(Page*);
+    static Ref<ScrollingCoordinator> create(Page*);
     virtual ~ScrollingCoordinator();
 
     WEBCORE_EXPORT virtual void pageDestroyed();
index e3ade52..ccdc832 100644 (file)
@@ -34,9 +34,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingStateFixedNode> ScrollingStateFixedNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
+Ref<ScrollingStateFixedNode> ScrollingStateFixedNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingStateFixedNode(stateTree, nodeID));
+    return adoptRef(*new ScrollingStateFixedNode(stateTree, nodeID));
 }
 
 ScrollingStateFixedNode::ScrollingStateFixedNode(ScrollingStateTree& tree, ScrollingNodeID nodeID)
@@ -54,9 +54,9 @@ ScrollingStateFixedNode::~ScrollingStateFixedNode()
 {
 }
 
-PassRefPtr<ScrollingStateNode> ScrollingStateFixedNode::clone(ScrollingStateTree& adoptiveTree)
+Ref<ScrollingStateNode> ScrollingStateFixedNode::clone(ScrollingStateTree& adoptiveTree)
 {
-    return adoptRef(new ScrollingStateFixedNode(*this, adoptiveTree));
+    return adoptRef(*new ScrollingStateFixedNode(*this, adoptiveTree));
 }
 
 void ScrollingStateFixedNode::updateConstraints(const FixedPositionViewportConstraints& constraints)
index 6d9d654..98cb0ca 100644 (file)
@@ -39,9 +39,9 @@ class FixedPositionViewportConstraints;
 
 class ScrollingStateFixedNode final : public ScrollingStateNode {
 public:
-    static PassRefPtr<ScrollingStateFixedNode> create(ScrollingStateTree&, ScrollingNodeID);
+    static Ref<ScrollingStateFixedNode> create(ScrollingStateTree&, ScrollingNodeID);
 
-    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&) override;
+    virtual Ref<ScrollingStateNode> clone(ScrollingStateTree&) override;
 
     virtual ~ScrollingStateFixedNode();
 
index 326d9e8..8503936 100644 (file)
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingStateFrameScrollingNode> ScrollingStateFrameScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
+Ref<ScrollingStateFrameScrollingNode> ScrollingStateFrameScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingStateFrameScrollingNode(stateTree, nodeID));
+    return adoptRef(*new ScrollingStateFrameScrollingNode(stateTree, nodeID));
 }
 
 ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
@@ -83,9 +83,9 @@ ScrollingStateFrameScrollingNode::~ScrollingStateFrameScrollingNode()
 {
 }
 
-PassRefPtr<ScrollingStateNode> ScrollingStateFrameScrollingNode::clone(ScrollingStateTree& adoptiveTree)
+Ref<ScrollingStateNode> ScrollingStateFrameScrollingNode::clone(ScrollingStateTree& adoptiveTree)
 {
-    return adoptRef(new ScrollingStateFrameScrollingNode(*this, adoptiveTree));
+    return adoptRef(*new ScrollingStateFrameScrollingNode(*this, adoptiveTree));
 }
 
 void ScrollingStateFrameScrollingNode::setFrameScaleFactor(float scaleFactor)
index 2aaa8b0..d57d1fd 100644 (file)
@@ -40,9 +40,9 @@ class Scrollbar;
 
 class ScrollingStateFrameScrollingNode final : public ScrollingStateScrollingNode {
 public:
-    static PassRefPtr<ScrollingStateFrameScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
+    static Ref<ScrollingStateFrameScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
 
-    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&) override;
+    virtual Ref<ScrollingStateNode> clone(ScrollingStateTree&) override;
 
     virtual ~ScrollingStateFrameScrollingNode();
 
index 8cb6ed8..acb601c 100644 (file)
@@ -197,7 +197,7 @@ public:
     bool isFrameScrollingNode() const { return m_nodeType == FrameScrollingNode; }
     bool isOverflowScrollingNode() const { return m_nodeType == OverflowScrollingNode; }
 
-    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree& adoptiveTree) = 0;
+    virtual Ref<ScrollingStateNode> clone(ScrollingStateTree& adoptiveTree) = 0;
     PassRefPtr<ScrollingStateNode> cloneAndReset(ScrollingStateTree& adoptiveTree);
     void cloneAndResetChildren(ScrollingStateNode&, ScrollingStateTree& adoptiveTree);
 
index e34ccac..84d25ef 100644 (file)
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
+Ref<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingStateOverflowScrollingNode(stateTree, nodeID));
+    return adoptRef(*new ScrollingStateOverflowScrollingNode(stateTree, nodeID));
 }
 
 ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
@@ -54,9 +54,9 @@ ScrollingStateOverflowScrollingNode::~ScrollingStateOverflowScrollingNode()
 {
 }
 
-PassRefPtr<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree)
+Ref<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree)
 {
-    return adoptRef(new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
+    return adoptRef(*new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
 }
     
 void ScrollingStateOverflowScrollingNode::setScrolledContentsLayer(const LayerRepresentation& layerRepresentation)
index 26096a2..73aaa39 100644 (file)
@@ -34,9 +34,9 @@ namespace WebCore {
 
 class ScrollingStateOverflowScrollingNode : public ScrollingStateScrollingNode {
 public:
-    static PassRefPtr<ScrollingStateOverflowScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
+    static Ref<ScrollingStateOverflowScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
 
-    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&) override;
+    virtual Ref<ScrollingStateNode> clone(ScrollingStateTree&) override;
 
     virtual ~ScrollingStateOverflowScrollingNode();
 
index 5e52e62..cee476e 100644 (file)
@@ -34,9 +34,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingStateStickyNode> ScrollingStateStickyNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
+Ref<ScrollingStateStickyNode> ScrollingStateStickyNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingStateStickyNode(stateTree, nodeID));
+    return adoptRef(*new ScrollingStateStickyNode(stateTree, nodeID));
 }
 
 ScrollingStateStickyNode::ScrollingStateStickyNode(ScrollingStateTree& tree, ScrollingNodeID nodeID)
@@ -54,9 +54,9 @@ ScrollingStateStickyNode::~ScrollingStateStickyNode()
 {
 }
 
-PassRefPtr<ScrollingStateNode> ScrollingStateStickyNode::clone(ScrollingStateTree& adoptiveTree)
+Ref<ScrollingStateNode> ScrollingStateStickyNode::clone(ScrollingStateTree& adoptiveTree)
 {
-    return adoptRef(new ScrollingStateStickyNode(*this, adoptiveTree));
+    return adoptRef(*new ScrollingStateStickyNode(*this, adoptiveTree));
 }
 
 void ScrollingStateStickyNode::updateConstraints(const StickyPositionViewportConstraints& constraints)
index cf0639d..c9e7935 100644 (file)
@@ -39,9 +39,9 @@ class StickyPositionViewportConstraints;
 
 class ScrollingStateStickyNode final : public ScrollingStateNode {
 public:
-    static PassRefPtr<ScrollingStateStickyNode> create(ScrollingStateTree&, ScrollingNodeID);
+    static Ref<ScrollingStateStickyNode> create(ScrollingStateTree&, ScrollingNodeID);
 
-    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&) override;
+    virtual Ref<ScrollingStateNode> clone(ScrollingStateTree&) override;
 
     virtual ~ScrollingStateStickyNode();
 
index 6cb3f43..b158218 100644 (file)
@@ -44,9 +44,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
+Ref<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
 {
-    return adoptRef(new ScrollingCoordinatorIOS(page));
+    return adoptRef(*new ScrollingCoordinatorIOS(page));
 }
 
 ScrollingCoordinatorIOS::ScrollingCoordinatorIOS(Page* page)
index 3ea637b..426cbc9 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 class ScrollingTreeFrameScrollingNodeIOS : public ScrollingTreeFrameScrollingNode {
 public:
-    WEBCORE_EXPORT static PassRefPtr<ScrollingTreeFrameScrollingNodeIOS> create(ScrollingTree&, ScrollingNodeID);
+    WEBCORE_EXPORT static Ref<ScrollingTreeFrameScrollingNodeIOS> create(ScrollingTree&, ScrollingNodeID);
     virtual ~ScrollingTreeFrameScrollingNodeIOS();
 
 protected:
index 5e3c6d8..5682f51 100644 (file)
@@ -40,9 +40,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingTreeFrameScrollingNodeIOS> ScrollingTreeFrameScrollingNodeIOS::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+Ref<ScrollingTreeFrameScrollingNodeIOS> ScrollingTreeFrameScrollingNodeIOS::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingTreeFrameScrollingNodeIOS(scrollingTree, nodeID));
+    return adoptRef(*new ScrollingTreeFrameScrollingNodeIOS(scrollingTree, nodeID));
 }
 
 ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
index 13f7ea8..6325a5f 100644 (file)
@@ -41,9 +41,9 @@
 
 namespace WebCore {
 
-RefPtr<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator* scrollingCoordinator)
+Ref<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator* scrollingCoordinator)
 {
-    return adoptRef(new ScrollingTreeIOS(scrollingCoordinator));
+    return adoptRef(*new ScrollingTreeIOS(scrollingCoordinator));
 }
 
 ScrollingTreeIOS::ScrollingTreeIOS(AsyncScrollingCoordinator* scrollingCoordinator)
index d99ce4c..f90ca1d 100644 (file)
@@ -39,7 +39,7 @@ class AsyncScrollingCoordinator;
 
 class ScrollingTreeIOS : public ScrollingTree {
 public:
-    static RefPtr<ScrollingTreeIOS> create(AsyncScrollingCoordinator*);
+    static Ref<ScrollingTreeIOS> create(AsyncScrollingCoordinator*);
     virtual ~ScrollingTreeIOS();
 
     virtual void commitNewTreeState(std::unique_ptr<ScrollingStateTree>) override;
index 3e921f1..2505e7b 100644 (file)
@@ -46,9 +46,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
+Ref<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
 {
-    return adoptRef(new ScrollingCoordinatorMac(page));
+    return adoptRef(*new ScrollingCoordinatorMac(page));
 }
 
 ScrollingCoordinatorMac::ScrollingCoordinatorMac(Page* page)
index 576accd..2ad16eb 100644 (file)
@@ -40,7 +40,7 @@ class FixedPositionViewportConstraints;
 
 class ScrollingTreeFixedNode : public ScrollingTreeNode {
 public:
-    WEBCORE_EXPORT static PassRefPtr<ScrollingTreeFixedNode> create(ScrollingTree&, ScrollingNodeID);
+    WEBCORE_EXPORT static Ref<ScrollingTreeFixedNode> create(ScrollingTree&, ScrollingNodeID);
 
     virtual ~ScrollingTreeFixedNode();
 
index 720bbbd..380ca17 100644 (file)
@@ -34,9 +34,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingTreeFixedNode> ScrollingTreeFixedNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+Ref<ScrollingTreeFixedNode> ScrollingTreeFixedNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingTreeFixedNode(scrollingTree, nodeID));
+    return adoptRef(*new ScrollingTreeFixedNode(scrollingTree, nodeID));
 }
 
 ScrollingTreeFixedNode::ScrollingTreeFixedNode(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
index 1a1ba52..6f9f78c 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore {
 
 class ScrollingTreeFrameScrollingNodeMac : public ScrollingTreeFrameScrollingNode, private ScrollControllerClient {
 public:
-    WEBCORE_EXPORT static PassRefPtr<ScrollingTreeFrameScrollingNode> create(ScrollingTree&, ScrollingNodeID);
+    WEBCORE_EXPORT static Ref<ScrollingTreeFrameScrollingNode> create(ScrollingTree&, ScrollingNodeID);
     virtual ~ScrollingTreeFrameScrollingNodeMac();
 
 private:
index 7f64dc5..eab6da9 100644 (file)
@@ -49,9 +49,9 @@ namespace WebCore {
 
 static void logThreadedScrollingMode(unsigned synchronousScrollingReasons);
 
-PassRefPtr<ScrollingTreeFrameScrollingNode> ScrollingTreeFrameScrollingNodeMac::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+Ref<ScrollingTreeFrameScrollingNode> ScrollingTreeFrameScrollingNodeMac::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingTreeFrameScrollingNodeMac(scrollingTree, nodeID));
+    return adoptRef(*new ScrollingTreeFrameScrollingNodeMac(scrollingTree, nodeID));
 }
 
 ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
index 90c437f..70dbc06 100644 (file)
@@ -34,9 +34,9 @@
 
 using namespace WebCore;
 
-RefPtr<ScrollingTreeMac> ScrollingTreeMac::create(AsyncScrollingCoordinator* scrollingCoordinator)
+Ref<ScrollingTreeMac> ScrollingTreeMac::create(AsyncScrollingCoordinator* scrollingCoordinator)
 {
-    return adoptRef(new ScrollingTreeMac(scrollingCoordinator));
+    return adoptRef(*new ScrollingTreeMac(scrollingCoordinator));
 }
 
 ScrollingTreeMac::ScrollingTreeMac(AsyncScrollingCoordinator* scrollingCoordinator)
index 331eb75..5dcda0a 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 
 class ScrollingTreeMac : public ThreadedScrollingTree {
 public:
-    static RefPtr<ScrollingTreeMac> create(AsyncScrollingCoordinator*);
+    static Ref<ScrollingTreeMac> create(AsyncScrollingCoordinator*);
 
     virtual PassRefPtr<ScrollingTreeNode> createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override;
 
index e8222de..70487ed 100644 (file)
@@ -40,7 +40,7 @@ class StickyPositionViewportConstraints;
 
 class ScrollingTreeStickyNode : public ScrollingTreeNode {
 public:
-    WEBCORE_EXPORT static PassRefPtr<ScrollingTreeStickyNode> create(ScrollingTree&, ScrollingNodeID);
+    WEBCORE_EXPORT static Ref<ScrollingTreeStickyNode> create(ScrollingTree&, ScrollingNodeID);
 
     virtual ~ScrollingTreeStickyNode();
 
index 67c4dbe..72d1f73 100644 (file)
@@ -36,9 +36,9 @@
 
 namespace WebCore {
 
-PassRefPtr<ScrollingTreeStickyNode> ScrollingTreeStickyNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+Ref<ScrollingTreeStickyNode> ScrollingTreeStickyNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
 {
-    return adoptRef(new ScrollingTreeStickyNode(scrollingTree, nodeID));
+    return adoptRef(*new ScrollingTreeStickyNode(scrollingTree, nodeID));
 }
 
 ScrollingTreeStickyNode::ScrollingTreeStickyNode(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
index 8ed8c4c..7453924 100644 (file)
@@ -66,7 +66,7 @@ WebViewGroup* WebViewGroup::get(const String& name)
 WebViewGroup::WebViewGroup(const String& name, const String& localStorageDatabasePath)
     : m_name(name)
     , m_localStorageDatabasePath(localStorageDatabasePath)
-    , m_userContentController(*UserContentController::create())
+    , m_userContentController(UserContentController::create())
     , m_visitedLinkStore(WebVisitedLinkStore::create())
 {
 }
index 30baded..193d7f2 100644 (file)
@@ -1,3 +1,21 @@
+2015-05-10  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Use Ref instead of PassRefPtr in WebCore/page
+        https://bugs.webkit.org/show_bug.cgi?id=144841
+
+        Reviewed by Darin Adler.
+
+        To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
+        in WebCore/page.
+
+        (WebKit::WebUserContentController::WebUserContentController):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setTextIndicator):
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::didPerformDictionaryLookup):
+        * WebProcess/UserContent/WebUserContentController.cpp:
+        (WebKit::WebUserContentController::WebUserContentController):
+
 2015-05-10  Philip Chimento  <philip.chimento@gmail.com>
 
         [GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
index 0c608a0..4dbf062 100644 (file)
@@ -3924,7 +3924,7 @@ void WebPageProxy::didGetImageForFindMatch(const ShareableBitmap::Handle& conten
 
 void WebPageProxy::setTextIndicator(const TextIndicatorData& indicatorData, uint64_t lifetime)
 {
-    m_pageClient.setTextIndicator(*TextIndicator::create(indicatorData), static_cast<TextIndicatorLifetime>(lifetime));
+    m_pageClient.setTextIndicator(TextIndicator::create(indicatorData), static_cast<TextIndicatorLifetime>(lifetime));
 }
 
 void WebPageProxy::clearTextIndicator()
index 0769050..32a72b8 100644 (file)
@@ -596,7 +596,7 @@ void PageClientImpl::didPerformDictionaryLookup(const DictionaryPopupInfo& dicti
     [m_wkView _prepareForDictionaryLookup];
 
     if (canLoadLUTermOptionDisableSearchTermIndicator() && dictionaryPopupInfo.textIndicator.contentImage) {
-        [m_wkView _setTextIndicator:*TextIndicator::create(dictionaryPopupInfo.textIndicator) withLifetime:TextIndicatorLifetime::Permanent];
+        [m_wkView _setTextIndicator:TextIndicator::create(dictionaryPopupInfo.textIndicator) withLifetime:TextIndicatorLifetime::Permanent];
         [mutableOptions setObject:@YES forKey:getLUTermOptionDisableSearchTermIndicator()];
         [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.string.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
     } else
index e33e49a..aa7b645 100644 (file)
@@ -69,7 +69,7 @@ PassRefPtr<WebUserContentController> WebUserContentController::getOrCreate(uint6
 
 WebUserContentController::WebUserContentController(uint64_t identifier)
     : m_identifier(identifier)
-    , m_userContentController(*UserContentController::create())
+    , m_userContentController(UserContentController::create())
 {
     WebProcess::singleton().addMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier, *this);
 }