Title: [129709] trunk/Source/WebKit/mac
Revision
129709
Author
[email protected]
Date
2012-09-26 14:43:49 -0700 (Wed, 26 Sep 2012)

Log Message

Stop using kCFURLHFSPathStyle
https://bugs.webkit.org/show_bug.cgi?id=97731
<rdar://problem/12378980>

Reviewed by Tim Horton.

Stop passing Carbon style paths to the plug-in. Both WebKitPluginHost, WebKit2 and Firefox
pass POSIX style paths which makes more sense.

* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::destroyStream):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (129708 => 129709)


--- trunk/Source/WebKit/mac/ChangeLog	2012-09-26 21:36:21 UTC (rev 129708)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-09-26 21:43:49 UTC (rev 129709)
@@ -1,3 +1,17 @@
+2012-09-26  Anders Carlsson  <[email protected]>
+
+        Stop using kCFURLHFSPathStyle
+        https://bugs.webkit.org/show_bug.cgi?id=97731
+        <rdar://problem/12378980>
+
+        Reviewed by Tim Horton.
+
+        Stop passing Carbon style paths to the plug-in. Both WebKitPluginHost, WebKit2 and Firefox
+        pass POSIX style paths which makes more sense.
+
+        * Plugins/WebNetscapePluginStream.mm:
+        (WebNetscapePluginStream::destroyStream):
+
 2012-09-25  Dan Bernstein  <[email protected]>
 
         WebKit/mac part of <rdar://problem/11455228> [mac] Stop using screen fonts

Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm (129708 => 129709)


--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm	2012-09-26 21:36:21 UTC (rev 129708)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm	2012-09-26 21:43:49 UTC (rev 129709)
@@ -56,8 +56,6 @@
 
 #define WEB_REASON_NONE -1
 
-static NSString *CarbonPathFromPOSIXPath(NSString *posixPath);
-
 class PluginStopDeferrer {
 public:
     PluginStopDeferrer(WebNetscapePluginView* pluginView)
@@ -393,12 +391,10 @@
         if (m_reason == NPRES_DONE && (m_transferMode == NP_ASFILE || m_transferMode == NP_ASFILEONLY)) {
             ASSERT(m_fileDescriptor == -1);
             ASSERT(m_path);
-            NSString *carbonPath = CarbonPathFromPOSIXPath(m_path.get());
-            ASSERT(carbonPath != NULL);
-            
+
             PluginStopDeferrer deferrer(m_pluginView.get());
-            m_pluginFuncs->asfile(m_plugin, &m_stream, [carbonPath fileSystemRepresentation]);
-            LOG(Plugins, "NPP_StreamAsFile responseURL=%@ path=%s", m_responseURL.get(), carbonPath);
+            m_pluginFuncs->asfile(m_plugin, &m_stream, [m_path.get() fileSystemRepresentation]);
+            LOG(Plugins, "NPP_StreamAsFile responseURL=%@ path=%s", m_responseURL.get(), m_path.get());
         }
 
         if (m_path) {
@@ -629,16 +625,4 @@
     [data release];
 }
 
-static NSString *CarbonPathFromPOSIXPath(NSString *posixPath)
-{
-    // Doesn't add a trailing colon for directories; this is a problem for paths to a volume,
-    // so this function would need to be revised if we ever wanted to call it with that.
-
-    CFURLRef url = "" fileURLWithPath:posixPath];
-    if (!url)
-        return nil;
-
-    return WebCFAutorelease(CFURLCopyFileSystemPath(url, kCFURLHFSPathStyle));
-}
-
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to