Title: [193571] branches/safari-601-branch/Source/WebCore
Revision
193571
Author
[email protected]
Date
2015-12-05 23:57:11 -0800 (Sat, 05 Dec 2015)

Log Message

Merged r190202.  rdar://problem/23581547

Modified Paths

Diff

Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog	2015-12-06 07:57:11 UTC (rev 193571)
@@ -1,3 +1,57 @@
+2015-12-05  Babak Shafiei  <[email protected]>
+
+        Merge r190202.
+
+    2015-09-24  Gyuyoung Kim  <[email protected]>
+
+            Reduce almost uses of PassRefPtr in Webcore/testing
+            https://bugs.webkit.org/show_bug.cgi?id=149449
+
+            Reviewed by Darin Adler.
+
+            This patch removes all uses of PassRefPtr except for Internals::serializeObject() and Internals::deserializeObject().
+            It will be removed by upcoming patch.
+
+            * Modules/encryptedmedia/CDMSessionClearKey.cpp:
+            (WebCore::CDMSessionClearKey::generateKeyRequest):
+            * Modules/encryptedmedia/CDMSessionClearKey.h:
+            * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+            (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
+            * platform/graphics/CDMSession.h:
+            * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
+            (WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
+            * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
+            * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
+            * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
+            (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
+            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
+            * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+            (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
+            * testing/InternalSettings.h:
+            (WebCore::InternalSettings::create):
+            * testing/Internals.cpp:
+            (WebCore::Internals::create):
+            (WebCore::Internals::computedStyleIncludingVisitedInfo):
+            (WebCore::Internals::markerRangeForNode):
+            (WebCore::Internals::rangeFromLocationAndLength):
+            (WebCore::Internals::subrange):
+            (WebCore::Internals::nodesFromRect):
+            (WebCore::Internals::mallocStatistics):
+            (WebCore::Internals::typeConversions):
+            (WebCore::Internals::memoryInfo):
+            (WebCore::Internals::serializeObject):
+            (WebCore::Internals::deserializeBuffer):
+            (WebCore::Internals::createTimeRanges):
+            * testing/Internals.h:
+            * testing/MallocStatistics.h:
+            (WebCore::MallocStatistics::create):
+            * testing/MemoryInfo.h:
+            (WebCore::MemoryInfo::create):
+            * testing/MockCDM.cpp:
+            (WebCore::MockCDMSession::generateKeyRequest):
+            * testing/TypeConversions.h:
+            (WebCore::TypeConversions::create):
+
 2015-12-05  Matthew Hanson  <[email protected]>
 
         Rollout r193478. rdar://problem/23732400

Modified: branches/safari-601-branch/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp	2015-12-06 07:57:11 UTC (rev 193571)
@@ -68,7 +68,7 @@
 {
 }
 
-PassRefPtr<Uint8Array> CDMSessionClearKey::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
+RefPtr<Uint8Array> CDMSessionClearKey::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
 {
     UNUSED_PARAM(mimeType);
     UNUSED_PARAM(destinationURL);

Modified: branches/safari-601-branch/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -42,7 +42,7 @@
     virtual CDMSessionType type() override { return CDMSessionTypeClearKey; }
     virtual void setClient(CDMSessionClient* client) override { m_client = client; }
     virtual const String& sessionId() const override { return m_sessionId; }
-    virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array*, String&, unsigned short&, unsigned long&) override;
+    virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array*, String&, unsigned short&, unsigned long&) override;
     virtual void releaseKeys() override;
     virtual bool update(Uint8Array*, RefPtr<Uint8Array>&, unsigned short&, unsigned long&) override;
     virtual RefPtr<ArrayBuffer> cachedKeyForKeyID(const String&) const override;

Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/CDMSession.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/platform/graphics/CDMSession.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/CDMSession.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -69,7 +69,7 @@
     virtual CDMSessionType type() { return CDMSessionTypeUnknown; }
     virtual void setClient(CDMSessionClient*) = 0;
     virtual const String& sessionId() const = 0;
-    virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) = 0;
+    virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) = 0;
     virtual void releaseKeys() = 0;
     virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) = 0;
     virtual RefPtr<ArrayBuffer> cachedKeyForKeyID(const String&) const { return nullptr; }

Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp	2015-12-06 07:57:11 UTC (rev 193571)
@@ -51,7 +51,7 @@
 {
 }
 
-PassRefPtr<Uint8Array> CDMSessionAVFoundationCF::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
+RefPtr<Uint8Array> CDMSessionAVFoundationCF::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
 {
     UNUSED_PARAM(mimeType);
 

Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -44,7 +44,7 @@
 
     virtual void setClient(CDMSessionClient* client) override { m_client = client; }
     virtual const String& sessionId() const override { return m_sessionId; }
-    virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
+    virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
     virtual void releaseKeys() override;
     virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override;
 

Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -45,7 +45,7 @@
     virtual CDMSessionType type() override { return CDMSessionTypeAVFoundationObjC; }
     virtual void setClient(CDMSessionClient* client) override { m_client = client; }
     virtual const String& sessionId() const override { return m_sessionId; }
-    virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
+    virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
     virtual void releaseKeys() override;
     virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override;
 

Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm	2015-12-06 07:57:11 UTC (rev 193571)
@@ -53,7 +53,7 @@
 {
 }
 
-PassRefPtr<Uint8Array> CDMSessionAVFoundationObjC::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
+RefPtr<Uint8Array> CDMSessionAVFoundationObjC::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
 {
     UNUSED_PARAM(mimeType);
 

Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -45,7 +45,7 @@
     virtual CDMSessionType type() override { return CDMSessionTypeMediaSourceAVFObjC; }
     virtual void setClient(CDMSessionClient* client) override { m_client = client; }
     virtual const String& sessionId() const override { return m_sessionId; }
-    virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
+    virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
     virtual void releaseKeys() override;
     virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override;
 

Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm	2015-12-06 07:57:11 UTC (rev 193571)
@@ -113,7 +113,7 @@
     setStreamSession(nullptr);
 }
 
-PassRefPtr<Uint8Array> CDMSessionMediaSourceAVFObjC::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
+RefPtr<Uint8Array> CDMSessionMediaSourceAVFObjC::generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode)
 {
     UNUSED_PARAM(mimeType);
     UNUSED_PARAM(destinationURL);

Modified: branches/safari-601-branch/Source/WebCore/testing/InternalSettings.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/testing/InternalSettings.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/testing/InternalSettings.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -35,7 +35,6 @@
 #include "IntSize.h"
 #include "InternalSettingsGenerated.h"
 #include "SecurityOrigin.h"
-#include <wtf/PassRefPtr.h>
 
 namespace WebCore {
 
@@ -101,9 +100,9 @@
 #endif
     };
 
-    static PassRefPtr<InternalSettings> create(Page* page)
+    static Ref<InternalSettings> create(Page* page)
     {
-        return adoptRef(new InternalSettings(page));
+        return adoptRef(*new InternalSettings(page));
     }
     static InternalSettings* from(Page*);
     void hostDestroyed() { m_page = 0; }

Modified: branches/safari-601-branch/Source/WebCore/testing/Internals.cpp (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/testing/Internals.cpp	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/testing/Internals.cpp	2015-12-06 07:57:11 UTC (rev 193571)
@@ -284,9 +284,9 @@
 
 const char* Internals::internalsId = "internals";
 
-PassRefPtr<Internals> Internals::create(Document* document)
+Ref<Internals> Internals::create(Document* document)
 {
-    return adoptRef(new Internals(document));
+    return adoptRef(*new Internals(document));
 }
 
 Internals::~Internals()
@@ -691,11 +691,11 @@
     return element->renderer() && element->renderer()->hasPausedImageAnimations();
 }
 
-PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Node* node, ExceptionCode& ec) const
+RefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Node* node, ExceptionCode& ec) const
 {
     if (!node) {
         ec = INVALID_ACCESS_ERR;
-        return 0;
+        return nullptr;
     }
 
     bool allowVisitedStyle = true;
@@ -977,7 +977,7 @@
     return markers[index];
 }
 
-PassRefPtr<Range> Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec)
+RefPtr<Range> Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec)
 {
     RenderedDocumentMarker* marker = markerAt(node, markerType, index, ec);
     if (!marker)
@@ -1183,11 +1183,11 @@
     frameView->paintControlTints();
 }
 
-PassRefPtr<Range> Internals::rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode& ec)
+RefPtr<Range> Internals::rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode& ec)
 {
     if (!scope) {
         ec = INVALID_ACCESS_ERR;
-        return 0;
+        return nullptr;
     }
 
     return TextIterator::rangeFromLocationAndLength(scope, rangeLocation, rangeLength);
@@ -1229,11 +1229,11 @@
     return range->text();
 }
 
-PassRefPtr<Range> Internals::subrange(Range* range, int rangeLocation, int rangeLength, ExceptionCode& ec)
+RefPtr<Range> Internals::subrange(Range* range, int rangeLocation, int rangeLength, ExceptionCode& ec)
 {
     if (!range) {
         ec = INVALID_ACCESS_ERR;
-        return 0;
+        return nullptr;
     }
 
     return TextIterator::subrange(range, rangeLocation, rangeLength);
@@ -1355,19 +1355,19 @@
 // contextDocument(), with the exception of a few tests that pass a
 // different document, and could just make the call through another Internals
 // instance instead.
-PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
+RefPtr<NodeList> Internals::nodesFromRect(Document* document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
     unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const
 {
     if (!document || !document->frame() || !document->frame()->view()) {
         ec = INVALID_ACCESS_ERR;
-        return 0;
+        return nullptr;
     }
 
     Frame* frame = document->frame();
     FrameView* frameView = document->view();
     RenderView* renderView = document->renderView();
     if (!renderView)
-        return 0;
+        return nullptr;
 
     document->updateLayoutIgnorePendingStylesheets();
 
@@ -1386,7 +1386,7 @@
 
     // When ignoreClipping is false, this method returns null for coordinates outside of the viewport.
     if (!request.ignoreClipping() && !frameView->visibleContentRect().intersects(HitTestLocation::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))
-        return 0;
+        return nullptr;
 
     Vector<Ref<Node>> matches;
 
@@ -2107,17 +2107,17 @@
     SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(scheme);
 }
 
-PassRefPtr<MallocStatistics> Internals::mallocStatistics() const
+Ref<MallocStatistics> Internals::mallocStatistics() const
 {
     return MallocStatistics::create();
 }
 
-PassRefPtr<TypeConversions> Internals::typeConversions() const
+Ref<TypeConversions> Internals::typeConversions() const
 {
     return TypeConversions::create();
 }
 
-PassRefPtr<MemoryInfo> Internals::memoryInfo() const
+Ref<MemoryInfo> Internals::memoryInfo() const
 {
     return MemoryInfo::create();
 }
@@ -2340,13 +2340,13 @@
 #endif
 }
 
-PassRefPtr<ArrayBuffer> Internals::serializeObject(PassRefPtr<SerializedScriptValue> value) const
+RefPtr<ArrayBuffer> Internals::serializeObject(PassRefPtr<SerializedScriptValue> value) const
 {
     Vector<uint8_t> bytes = value->data();
     return ArrayBuffer::create(bytes.data(), bytes.size());
 }
 
-PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<ArrayBuffer> buffer) const
+RefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<ArrayBuffer> buffer) const
 {
     Vector<uint8_t> bytes;
     bytes.append(static_cast<const uint8_t*>(buffer->data()), buffer->byteLength());
@@ -2530,11 +2530,11 @@
 }
 
 #if ENABLE(VIDEO)
-PassRefPtr<TimeRanges> Internals::createTimeRanges(Float32Array* startTimes, Float32Array* endTimes)
+Ref<TimeRanges> Internals::createTimeRanges(Float32Array* startTimes, Float32Array* endTimes)
 {
     ASSERT(startTimes && endTimes);
     ASSERT(startTimes->length() == endTimes->length());
-    RefPtr<TimeRanges> ranges = TimeRanges::create();
+    Ref<TimeRanges> ranges = TimeRanges::create();
 
     unsigned count = std::min(startTimes->length(), endTimes->length());
     for (unsigned i = 0; i < count; ++i)

Modified: branches/safari-601-branch/Source/WebCore/testing/Internals.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/testing/Internals.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/testing/Internals.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -35,7 +35,6 @@
 #include <bindings/ScriptValue.h>
 #include <runtime/ArrayBuffer.h>
 #include <runtime/Float32Array.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
@@ -77,7 +76,7 @@
 class Internals : public RefCounted<Internals>
                 , public ContextDestructionObserver {
 public:
-    static PassRefPtr<Internals> create(Document*);
+    static Ref<Internals> create(Document*);
     virtual ~Internals();
 
     static void resetToConsistentState(Page*);
@@ -104,7 +103,7 @@
     void clearPageCache();
     unsigned pageCacheSize() const;
 
-    PassRefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Node*, ExceptionCode&) const;
+    RefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Node*, ExceptionCode&) const;
 
     Node* ensureShadowRoot(Element* host, ExceptionCode&);
     Node* ensureUserAgentShadowRoot(Element* host, ExceptionCode&);
@@ -155,7 +154,7 @@
     String inspectorHighlightObject(ExceptionCode&);
 
     unsigned markerCountForNode(Node*, const String&, ExceptionCode&);
-    PassRefPtr<Range> markerRangeForNode(Node*, const String& markerType, unsigned index, ExceptionCode&);
+    RefPtr<Range> markerRangeForNode(Node*, const String& markerType, unsigned index, ExceptionCode&);
     String markerDescriptionForNode(Node*, const String& markerType, unsigned index, ExceptionCode&);
     void addTextMatchMarker(const Range*, bool isActive);
     void setMarkedTextMatchesAreHighlighted(bool, ExceptionCode&);
@@ -178,11 +177,11 @@
 
     void paintControlTints(ExceptionCode&);
 
-    PassRefPtr<Range> rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&);
+    RefPtr<Range> rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&);
     unsigned locationFromRange(Element* scope, const Range*, ExceptionCode&);
     unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
     String rangeAsText(const Range*, ExceptionCode&);
-    PassRefPtr<Range> subrange(Range* range, int rangeLocation, int rangeLength, ExceptionCode&);
+    RefPtr<Range> subrange(Range*, int rangeLocation, int rangeLength, ExceptionCode&);
     RefPtr<Range> rangeForDictionaryLookupAtLocation(int x, int y, ExceptionCode&);
 
     void setDelegatesScrolling(bool enabled, ExceptionCode&);
@@ -199,7 +198,7 @@
     unsigned wheelEventHandlerCount(ExceptionCode&);
     unsigned touchEventHandlerCount(ExceptionCode&);
 
-    PassRefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding,
+    RefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding,
         unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&) const;
 
     String parserMetaData(Deprecated::ScriptValue = Deprecated::ScriptValue());
@@ -299,9 +298,9 @@
     void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme);
     void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme);
 
-    PassRefPtr<MallocStatistics> mallocStatistics() const;
-    PassRefPtr<TypeConversions> typeConversions() const;
-    PassRefPtr<MemoryInfo> memoryInfo() const;
+    Ref<MallocStatistics> mallocStatistics() const;
+    Ref<TypeConversions> typeConversions() const;
+    Ref<MemoryInfo> memoryInfo() const;
 
     Vector<String> getReferencedFilePaths() const;
 
@@ -321,8 +320,8 @@
     void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node*, ExceptionCode&);
     unsigned layoutCount() const;
 
-    PassRefPtr<ArrayBuffer> serializeObject(PassRefPtr<SerializedScriptValue>) const;
-    PassRefPtr<SerializedScriptValue> deserializeBuffer(PassRefPtr<ArrayBuffer>) const;
+    RefPtr<ArrayBuffer> serializeObject(PassRefPtr<SerializedScriptValue>) const;
+    RefPtr<SerializedScriptValue> deserializeBuffer(PassRefPtr<ArrayBuffer>) const;
 
     bool isFromCurrentWorld(Deprecated::ScriptValue) const;
 
@@ -363,7 +362,7 @@
     void setCaptionDisplayMode(const String&, ExceptionCode&);
 
 #if ENABLE(VIDEO)
-    PassRefPtr<TimeRanges> createTimeRanges(Float32Array* startTimes, Float32Array* endTimes);
+    Ref<TimeRanges> createTimeRanges(Float32Array* startTimes, Float32Array* endTimes);
     double closestTimeToTimeRanges(double time, TimeRanges*);
 #endif
 

Modified: branches/safari-601-branch/Source/WebCore/testing/MallocStatistics.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/testing/MallocStatistics.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/testing/MallocStatistics.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -27,14 +27,13 @@
 #define MallocStatistics_h
 
 #include <wtf/FastMalloc.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
 class MallocStatistics : public RefCounted<MallocStatistics> {
 public:
-    static PassRefPtr<MallocStatistics> create() { return adoptRef(new MallocStatistics()); }
+    static Ref<MallocStatistics> create() { return adoptRef(*new MallocStatistics); }
 
     size_t reservedVMBytes() const { return m_stats.reservedVMBytes; }
     size_t committedVMBytes() const { return m_stats.committedVMBytes; }

Modified: branches/safari-601-branch/Source/WebCore/testing/MemoryInfo.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/testing/MemoryInfo.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/testing/MemoryInfo.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -32,14 +32,13 @@
 #define MemoryInfo_h
 
 #include "JSDOMWindow.h"
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
 class MemoryInfo : public RefCounted<MemoryInfo> {
 public:
-    static PassRefPtr<MemoryInfo> create() { return adoptRef(new MemoryInfo); }
+    static Ref<MemoryInfo> create() { return adoptRef(*new MemoryInfo); }
 
     size_t usedJSHeapSize() const { return m_usedJSHeapSize; }
     size_t totalJSHeapSize() const { return m_totalJSHeapSize; }

Modified: branches/safari-601-branch/Source/WebCore/testing/MockCDM.cpp (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/testing/MockCDM.cpp	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/testing/MockCDM.cpp	2015-12-06 07:57:11 UTC (rev 193571)
@@ -44,7 +44,7 @@
 
     virtual void setClient(CDMSessionClient* client) override { m_client = client; }
     virtual const String& sessionId() const override { return m_sessionId; }
-    virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
+    virtual RefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
     virtual void releaseKeys() override;
     virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override;
 
@@ -111,12 +111,12 @@
 {
 }
 
-PassRefPtr<Uint8Array> MockCDMSession::generateKeyRequest(const String&, Uint8Array* initData, String&, unsigned short& errorCode, unsigned long&)
+RefPtr<Uint8Array> MockCDMSession::generateKeyRequest(const String&, Uint8Array* initData, String&, unsigned short& errorCode, unsigned long&)
 {
     for (unsigned i = 0; i < initDataPrefix()->length(); ++i) {
         if (!initData || i >= initData->length() || initData->item(i) != initDataPrefix()->item(i)) {
             errorCode = MediaKeyError::MEDIA_KEYERR_UNKNOWN;
-            return 0;
+            return nullptr;
         }
     }
     return keyRequest();

Modified: branches/safari-601-branch/Source/WebCore/testing/TypeConversions.h (193570 => 193571)


--- branches/safari-601-branch/Source/WebCore/testing/TypeConversions.h	2015-12-06 07:27:50 UTC (rev 193570)
+++ branches/safari-601-branch/Source/WebCore/testing/TypeConversions.h	2015-12-06 07:57:11 UTC (rev 193571)
@@ -27,14 +27,13 @@
 #define TypeConversions_h
 
 #include <wtf/FastMalloc.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
 class TypeConversions : public RefCounted<TypeConversions> {
 public:
-    static PassRefPtr<TypeConversions> create() { return adoptRef(new TypeConversions()); }
+    static Ref<TypeConversions> create() { return adoptRef(*new TypeConversions()); }
 
     long testLong() { return m_long; }
     void setTestLong(long value) { m_long = value; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to