Title: [149488] trunk/Source/WebKit2
Revision
149488
Author
[email protected]
Date
2013-05-02 09:56:29 -0700 (Thu, 02 May 2013)

Log Message

        REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
        broken when second argument is nil
        https://bugs.webkit.org/show_bug.cgi?id=115505
        <rdar://problem/13787297>

        Reviewed by Darin Adler.

        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
        to assumeReadAccessToBaseURL, as this is what it takes.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (149487 => 149488)


--- trunk/Source/WebKit2/ChangeLog	2013-05-02 15:52:38 UTC (rev 149487)
+++ trunk/Source/WebKit2/ChangeLog	2013-05-02 16:56:29 UTC (rev 149488)
@@ -1,3 +1,15 @@
+2013-05-01  Alexey Proskuryakov  <[email protected]>
+
+        REGRESSION (r149422): -[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]
+        broken when second argument is nil
+        https://bugs.webkit.org/show_bug.cgi?id=115505
+        <rdar://problem/13787297>
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadFile): Pass a URL string
+        to assumeReadAccessToBaseURL, as this is what it takes.
+
 2013-05-01  Ryosuke Niwa  <[email protected]>
 
         [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (149487 => 149488)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-05-02 15:52:38 UTC (rev 149487)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2013-05-02 16:56:29 UTC (rev 149488)
@@ -740,18 +740,20 @@
     if (!fileURL.isLocalFile())
         return;
 
-    String resourceDirectoryPath;
-    if (!resourceDirectoryURLString.isNull()) {
-        KURL resourceDirectoryURL = KURL(KURL(), resourceDirectoryURLString);
+    KURL resourceDirectoryURL;
+    if (resourceDirectoryURLString.isNull())
+        resourceDirectoryURL = KURL(ParsedURLString, ASCIILiteral("file:///"));
+    else {
+        resourceDirectoryURL = KURL(KURL(), resourceDirectoryURLString);
         if (!resourceDirectoryURL.isLocalFile())
             return;
-        resourceDirectoryPath = resourceDirectoryURL.fileSystemPath();
-    } else
-        resourceDirectoryPath = ASCIILiteral("/");
+    }
 
+    String resourceDirectoryPath = resourceDirectoryURL.fileSystemPath();
+
     SandboxExtension::Handle sandboxExtensionHandle;
     SandboxExtension::createHandle(resourceDirectoryPath, SandboxExtension::ReadOnly, sandboxExtensionHandle);
-    m_process->assumeReadAccessToBaseURL(resourceDirectoryPath);
+    m_process->assumeReadAccessToBaseURL(resourceDirectoryURL);
     m_process->send(Messages::WebPage::LoadURL(fileURL, sandboxExtensionHandle), m_pageID);
     m_process->responsivenessTimer()->start();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to