Title: [210258] trunk/Source/WebCore
Revision
210258
Author
[email protected]
Date
2017-01-03 16:36:32 -0800 (Tue, 03 Jan 2017)

Log Message

Rename SharedBufferMac.mm to SharedBufferCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=166666

Reviewed by Tim Horton.

* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/SharedBufferCocoa.mm: Renamed from Source/WebCore/platform/mac/SharedBufferMac.mm.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (210257 => 210258)


--- trunk/Source/WebCore/ChangeLog	2017-01-04 00:33:39 UTC (rev 210257)
+++ trunk/Source/WebCore/ChangeLog	2017-01-04 00:36:32 UTC (rev 210258)
@@ -1,3 +1,14 @@
+2017-01-03  Andy Estes  <[email protected]>
+
+        Rename SharedBufferMac.mm to SharedBufferCocoa.mm
+        https://bugs.webkit.org/show_bug.cgi?id=166666
+
+        Reviewed by Tim Horton.
+
+        * PlatformMac.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/cocoa/SharedBufferCocoa.mm: Renamed from Source/WebCore/platform/mac/SharedBufferMac.mm.
+
 2017-01-03  Sam Weinig  <[email protected]>
 
         Re-implement ExceptionOr on top of WTF::Expected

Modified: trunk/Source/WebCore/PlatformMac.cmake (210257 => 210258)


--- trunk/Source/WebCore/PlatformMac.cmake	2017-01-04 00:33:39 UTC (rev 210257)
+++ trunk/Source/WebCore/PlatformMac.cmake	2017-01-04 00:36:32 UTC (rev 210258)
@@ -327,6 +327,7 @@
     platform/cocoa/ScrollController.mm
     platform/cocoa/ScrollSnapAnimatorState.mm
     platform/cocoa/SearchPopupMenuCocoa.mm
+    platform/cocoa/SharedBufferCocoa.mm
     platform/cocoa/SystemVersion.mm
     platform/cocoa/TelephoneNumberDetectorCocoa.cpp
     platform/cocoa/ThemeCocoa.mm
@@ -483,7 +484,6 @@
     platform/mac/ScrollViewMac.mm
     platform/mac/ScrollbarThemeMac.mm
     platform/mac/SerializedPlatformRepresentationMac.mm
-    platform/mac/SharedBufferMac.mm
     platform/mac/SoundMac.mm
     platform/mac/SuddenTermination.mm
     platform/mac/SystemSleepListenerMac.mm

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210257 => 210258)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-01-04 00:33:39 UTC (rev 210257)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-01-04 00:36:32 UTC (rev 210258)
@@ -714,7 +714,7 @@
 		1A4A2DF20A1B852A00C807F8 /* JSHTMLAppletElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4A2DEE0A1B852A00C807F8 /* JSHTMLAppletElement.h */; };
 		1A4A954D0B4EDCCB002D8C3C /* SharedBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A954B0B4EDCCB002D8C3C /* SharedBuffer.cpp */; };
 		1A4A954E0B4EDCCB002D8C3C /* SharedBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4A954C0B4EDCCB002D8C3C /* SharedBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		1A4A95520B4EDCFF002D8C3C /* SharedBufferMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A95510B4EDCFF002D8C3C /* SharedBufferMac.mm */; };
+		1A4A95520B4EDCFF002D8C3C /* SharedBufferCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A95510B4EDCFF002D8C3C /* SharedBufferCocoa.mm */; };
 		1A4DA4211CDD3A8300F4473C /* LinkIconCollector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4DA41F1CDD3A8300F4473C /* LinkIconCollector.cpp */; };
 		1A4DA4221CDD3A8300F4473C /* LinkIconCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4DA4201CDD3A8300F4473C /* LinkIconCollector.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1A569CF70D7E2B82007C3983 /* c_class.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A569CC60D7E2B82007C3983 /* c_class.cpp */; };
@@ -7750,7 +7750,7 @@
 		1A4A2DEE0A1B852A00C807F8 /* JSHTMLAppletElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLAppletElement.h; sourceTree = "<group>"; };
 		1A4A954B0B4EDCCB002D8C3C /* SharedBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SharedBuffer.cpp; sourceTree = "<group>"; };
 		1A4A954C0B4EDCCB002D8C3C /* SharedBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SharedBuffer.h; sourceTree = "<group>"; };
-		1A4A95510B4EDCFF002D8C3C /* SharedBufferMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SharedBufferMac.mm; sourceTree = "<group>"; };
+		1A4A95510B4EDCFF002D8C3C /* SharedBufferCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SharedBufferCocoa.mm; sourceTree = "<group>"; };
 		1A4DA41F1CDD3A8300F4473C /* LinkIconCollector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LinkIconCollector.cpp; sourceTree = "<group>"; };
 		1A4DA4201CDD3A8300F4473C /* LinkIconCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkIconCollector.h; sourceTree = "<group>"; };
 		1A569CC60D7E2B82007C3983 /* c_class.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = c_class.cpp; sourceTree = "<group>"; };
@@ -17806,7 +17806,6 @@
 				9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */,
 				077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */,
 				077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */,
-				1A4A95510B4EDCFF002D8C3C /* SharedBufferMac.mm */,
 				4B3043C80AE0371D00A82647 /* SoundMac.mm */,
 				84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */,
 				93B2D8170F9920EE006AE6B2 /* SuddenTermination.mm */,
@@ -19766,6 +19765,7 @@
 				F478755319983AFF0024A287 /* ScrollSnapAnimatorState.mm */,
 				0E7058F31BC5CCD70045A507 /* SearchPopupMenuCocoa.h */,
 				0E7058ED1BC5BC190045A507 /* SearchPopupMenuCocoa.mm */,
+				1A4A95510B4EDCFF002D8C3C /* SharedBufferCocoa.mm */,
 				0A4844980CA44CB200B7BD48 /* SoftLinking.h */,
 				5D5975B119635F1100D00878 /* SystemVersion.h */,
 				5D5975B219635F1100D00878 /* SystemVersion.mm */,
@@ -31215,7 +31215,7 @@
 				1A4A954D0B4EDCCB002D8C3C /* SharedBuffer.cpp in Sources */,
 				512DD8E30D91E2B4000F89EE /* SharedBufferCF.cpp in Sources */,
 				97B1F02E13B025CA00F5103F /* SharedBufferChunkReader.cpp in Sources */,
-				1A4A95520B4EDCFF002D8C3C /* SharedBufferMac.mm in Sources */,
+				1A4A95520B4EDCFF002D8C3C /* SharedBufferCocoa.mm in Sources */,
 				163E88F7118A39D200ED9231 /* SimpleFontDataCoreText.cpp in Sources */,
 				E48944A2180B57D800F165D8 /* SimpleLineLayout.cpp in Sources */,
 				585D6E031A1A792E00FA4F12 /* SimpleLineLayoutFlowContents.cpp in Sources */,

Copied: trunk/Source/WebCore/platform/cocoa/SharedBufferCocoa.mm (from rev 210257, trunk/Source/WebCore/platform/mac/SharedBufferMac.mm) (0 => 210258)


--- trunk/Source/WebCore/platform/cocoa/SharedBufferCocoa.mm	                        (rev 0)
+++ trunk/Source/WebCore/platform/cocoa/SharedBufferCocoa.mm	2017-01-04 00:36:32 UTC (rev 210258)
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2006 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "SharedBuffer.h"
+
+#include "WebCoreObjCExtras.h"
+#include <runtime/InitializeThreading.h>
+#include <string.h>
+#include <wtf/MainThread.h>
+
+using namespace WebCore;
+
+@interface WebCoreSharedBufferData : NSData
+{
+    RefPtr<SharedBuffer::DataBuffer> sharedBufferDataBuffer;
+}
+
+- (id)initWithSharedBufferDataBuffer:(SharedBuffer::DataBuffer*)dataBuffer;
+@end
+
+@implementation WebCoreSharedBufferData
+
++ (void)initialize
+{
+#if !USE(WEB_THREAD)
+    JSC::initializeThreading();
+    WTF::initializeMainThreadToProcessMainThread();
+#endif // !USE(WEB_THREAD)
+}
+
+- (void)dealloc
+{
+    if (WebCoreObjCScheduleDeallocateOnMainThread([WebCoreSharedBufferData class], self))
+        return;
+
+    [super dealloc];
+}
+
+- (id)initWithSharedBufferDataBuffer:(SharedBuffer::DataBuffer*)dataBuffer
+{
+    self = [super init];
+    
+    if (self)
+        sharedBufferDataBuffer = dataBuffer;
+
+    return self;
+}
+
+- (NSUInteger)length
+{
+    return sharedBufferDataBuffer->data.size();
+}
+
+- (const void *)bytes
+{
+    return sharedBufferDataBuffer->data.data();
+}
+
+@end
+
+namespace WebCore {
+
+Ref<SharedBuffer> SharedBuffer::wrapNSData(NSData *nsData)
+{
+    return adoptRef(*new SharedBuffer((CFDataRef)nsData));
+}
+
+RetainPtr<NSData> SharedBuffer::createNSData()
+{
+    return adoptNS((NSData *)createCFData().leakRef());
+}
+
+CFDataRef SharedBuffer::existingCFData()
+{
+    if (m_cfData)
+        return m_cfData.get();
+
+#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
+    if (m_dataArray.size() == 1)
+        return m_dataArray.at(0).get();
+#endif
+
+    return nullptr;
+}
+
+RetainPtr<CFDataRef> SharedBuffer::createCFData()
+{
+    if (CFDataRef cfData = existingCFData())
+        return cfData;
+
+    data(); // Force data into m_buffer from segments or data array.
+    return adoptCF((CFDataRef)adoptNS([[WebCoreSharedBufferData alloc] initWithSharedBufferDataBuffer:m_buffer.ptr()]).leakRef());
+}
+
+RefPtr<SharedBuffer> SharedBuffer::createFromReadingFile(const String& filePath)
+{
+    NSData *resourceData = [NSData dataWithContentsOfFile:filePath];
+    if (resourceData) 
+        return SharedBuffer::wrapNSData(resourceData);
+    return nullptr;
+}
+
+}

Deleted: trunk/Source/WebCore/platform/mac/SharedBufferMac.mm (210257 => 210258)


--- trunk/Source/WebCore/platform/mac/SharedBufferMac.mm	2017-01-04 00:33:39 UTC (rev 210257)
+++ trunk/Source/WebCore/platform/mac/SharedBufferMac.mm	2017-01-04 00:36:32 UTC (rev 210258)
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "config.h"
-#include "SharedBuffer.h"
-
-#include "WebCoreObjCExtras.h"
-#include <runtime/InitializeThreading.h>
-#include <string.h>
-#include <wtf/MainThread.h>
-
-using namespace WebCore;
-
-@interface WebCoreSharedBufferData : NSData
-{
-    RefPtr<SharedBuffer::DataBuffer> sharedBufferDataBuffer;
-}
-
-- (id)initWithSharedBufferDataBuffer:(SharedBuffer::DataBuffer*)dataBuffer;
-@end
-
-@implementation WebCoreSharedBufferData
-
-+ (void)initialize
-{
-#if !USE(WEB_THREAD)
-    JSC::initializeThreading();
-    WTF::initializeMainThreadToProcessMainThread();
-#endif // !USE(WEB_THREAD)
-}
-
-- (void)dealloc
-{
-    if (WebCoreObjCScheduleDeallocateOnMainThread([WebCoreSharedBufferData class], self))
-        return;
-
-    [super dealloc];
-}
-
-- (id)initWithSharedBufferDataBuffer:(SharedBuffer::DataBuffer*)dataBuffer
-{
-    self = [super init];
-    
-    if (self)
-        sharedBufferDataBuffer = dataBuffer;
-
-    return self;
-}
-
-- (NSUInteger)length
-{
-    return sharedBufferDataBuffer->data.size();
-}
-
-- (const void *)bytes
-{
-    return sharedBufferDataBuffer->data.data();
-}
-
-@end
-
-namespace WebCore {
-
-Ref<SharedBuffer> SharedBuffer::wrapNSData(NSData *nsData)
-{
-    return adoptRef(*new SharedBuffer((CFDataRef)nsData));
-}
-
-RetainPtr<NSData> SharedBuffer::createNSData()
-{
-    return adoptNS((NSData *)createCFData().leakRef());
-}
-
-CFDataRef SharedBuffer::existingCFData()
-{
-    if (m_cfData)
-        return m_cfData.get();
-
-#if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
-    if (m_dataArray.size() == 1)
-        return m_dataArray.at(0).get();
-#endif
-
-    return nullptr;
-}
-
-RetainPtr<CFDataRef> SharedBuffer::createCFData()
-{
-    if (CFDataRef cfData = existingCFData())
-        return cfData;
-
-    data(); // Force data into m_buffer from segments or data array.
-    return adoptCF((CFDataRef)adoptNS([[WebCoreSharedBufferData alloc] initWithSharedBufferDataBuffer:m_buffer.ptr()]).leakRef());
-}
-
-RefPtr<SharedBuffer> SharedBuffer::createFromReadingFile(const String& filePath)
-{
-    NSData *resourceData = [NSData dataWithContentsOfFile:filePath];
-    if (resourceData) 
-        return SharedBuffer::wrapNSData(resourceData);
-    return nullptr;
-}
-
-}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to