Source/WebCore: Export KURL::baseAsString() so it can be called in WebProcessProxy...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2011 17:55:31 +0000 (17:55 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2011 17:55:31 +0000 (17:55 +0000)
commit89b423fd9022dc3d0c8c896dfdd89090b668824d
tree79a3e58adbee48c19d6773466fe13046dcce2b33
parent933fcdec1796d9b5ab4905f35a6688034f397668
Source/WebCore: Export KURL::baseAsString() so it can be called in WebProcessProxy::assumeReadAccessToBaseURL() in WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=70168

Reviewed by Alexey Proskuryakov.

No new tests. There is no change in functionality.

* WebCore.exp.in: Export KURL::baseAsString().

Source/WebKit2: Calling WKPageLoadAlternateHTMLString() where baseURL does not point to a directory causes an invalid message to be returned from WebProcess
https://bugs.webkit.org/show_bug.cgi?id=70168

Reviewed by Alexey Proskuryakov.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::assumeReadAccessToBaseURL): Add the file path of url's base URL to m_localPathsWithAssumedReadAccess,
since url may not point to a directory.

Tools: Add a test to call WKPageLoadAlternateHTMLString() with a non-directory URL.
https://bugs.webkit.org/show_bug.cgi?id=70168

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp: Added.
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::TEST): Call WKPageLoadAlternateHTMLString() with a file URL and make sure it finishes loading.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/win/TestWebKitAPI.vcproj:
Add the new file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj