Skip to content

Commit

Permalink
Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=177966
<rdar://problem/22387135>

Reviewed by Tim Horton.

Source/WebKit:

* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didChangeBackForwardList):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
(WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
(WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
(WebKit::NavigationState::NavigationClient::didCancelClientRedirect):
(WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
(WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
(WebKit::NavigationState::NavigationClient::processDidTerminate):
(WebKit::NavigationState::NavigationClient::processDidBecomeResponsive):
(WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive):
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
(WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
(WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
(WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
(WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(-[ListItemDelegate _webView:backForwardListItemAdded:removed:]):
(-[ListItemDelegate webView:didFinishNavigation:]):
(TEST):



Canonical link: https://commits.webkit.org/194216@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
achristensen07 committed Oct 5, 2017
1 parent 87d4cfd commit ec2143d
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 16 deletions.
32 changes: 32 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,35 @@
2017-10-05 Alex Christensen <achristensen@webkit.org>

Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=177966
<rdar://problem/22387135>

Reviewed by Tim Horton.

* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::didChangeBackForwardList):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):
(WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
(WebKit::NavigationState::NavigationClient::willPerformClientRedirect):
(WebKit::NavigationState::NavigationClient::didCancelClientRedirect):
(WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
(WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
(WebKit::NavigationState::NavigationClient::processDidTerminate):
(WebKit::NavigationState::NavigationClient::processDidBecomeResponsive):
(WebKit::NavigationState::NavigationClient::processDidBecomeUnresponsive):
(WebKit::NavigationState::NavigationClient::webCryptoMasterKey):
(WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):
(WebKit::NavigationState::HistoryClient::didNavigateWithNavigationData):
(WebKit::NavigationState::HistoryClient::didPerformClientRedirect):
(WebKit::NavigationState::HistoryClient::didPerformServerRedirect):
(WebKit::NavigationState::HistoryClient::didUpdateHistoryTitle):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):

2017-10-05 Alex Christensen <achristensen@webkit.org>

Add ObjC SPI with userInfo corresponding to WKPageNavigationClient's decidePolicyForNavigationAction, didStartProvisionalNavigation, and didFailNavigation
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/UIProcess/API/APINavigationClient.h
Expand Up @@ -127,6 +127,7 @@ class NavigationClient {
virtual void willEndNavigationGesture(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
virtual void didEndNavigationGesture(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
virtual void didRemoveNavigationGestureSnapshot(WebKit::WebPageProxy&) { }
virtual bool didChangeBackForwardList(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem*, const Vector<Ref<WebKit::WebBackForwardListItem>>&) { return false; }
};

} // namespace API
Expand Up @@ -92,6 +92,7 @@ static const WKNavigationResponsePolicy _WKNavigationResponsePolicyBecomeDownloa
- (void)_webView:(WKWebView *)webView resolveWebGLLoadPolicyForURL:(NSURL *)url decisionHandler:(void (^)(_WKWebGLLoadPolicy))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA));
- (void)_webView:(WKWebView *)webView willGoToBackForwardListItem:(WKBackForwardListItem *)item inPageCache:(BOOL)inPageCache WK_API_AVAILABLE(macosx(WK_MAC_TBA));
- (void)_webView:(WKWebView *)webView didFailToInitializePlugInWithInfo:(NSDictionary *)info WK_API_AVAILABLE(macosx(WK_MAC_TBA));
- (void)_webView:(WKWebView *)webView backForwardListItemAdded:(WKBackForwardListItem *)itemAdded removed:(NSArray<WKBackForwardListItem *> *)itemsRemoved WK_API_AVAILABLE(macosx(WK_MAC_TBA));
#endif

@end
Expand Down
4 changes: 3 additions & 1 deletion Source/WebKit/UIProcess/Cocoa/NavigationState.h
Expand Up @@ -120,7 +120,8 @@ class NavigationState final : private PageLoadState::Observer {
void webGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const final;
void resolveWebGLLoadPolicy(WebPageProxy&, const WebCore::URL&, WTF::Function<void(WebCore::WebGLLoadPolicy)>&& completionHandler) const final;
bool willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem&, bool inPageCache, API::Object*) final;
bool didFailToInitializePlugIn(WebKit::WebPageProxy&, API::Dictionary&) final;
bool didFailToInitializePlugIn(WebPageProxy&, API::Dictionary&) final;
bool didChangeBackForwardList(WebPageProxy&, WebBackForwardListItem*, const Vector<Ref<WebBackForwardListItem>>&) final;
#endif

void contentRuleListNotification(WebPageProxy&, WebCore::URL&&, Vector<String>&&, Vector<String>&&) final;
Expand Down Expand Up @@ -217,6 +218,7 @@ class NavigationState final : private PageLoadState::Observer {
#if PLATFORM(MAC)
bool webViewWebGLLoadPolicyForURL : 1;
bool webViewResolveWebGLLoadPolicyForURL : 1;
bool webViewBackForwardListItemAddedRemoved : 1;
bool webViewDidFailToInitializePlugInWithInfo : 1;
bool webViewWillGoToBackForwardListItemInPageCache : 1;
#endif
Expand Down
48 changes: 34 additions & 14 deletions Source/WebKit/UIProcess/Cocoa/NavigationState.mm
Expand Up @@ -183,6 +183,7 @@
m_navigationDelegateMethods.webViewResolveWebGLLoadPolicyForURL = [delegate respondsToSelector:@selector(_webView:resolveWebGLLoadPolicyForURL:decisionHandler:)];
m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInPageCache = [delegate respondsToSelector:@selector(_webView:willGoToBackForwardListItem:inPageCache:)];
m_navigationDelegateMethods.webViewDidFailToInitializePlugInWithInfo = [delegate respondsToSelector:@selector(_webView:didFailToInitializePlugInWithInfo:)];
m_navigationDelegateMethods.webViewBackForwardListItemAddedRemoved = [delegate respondsToSelector:@selector(_webView:backForwardListItemAdded:removed:)];
#endif
}

Expand Down Expand Up @@ -297,7 +298,7 @@
}

#if PLATFORM(MAC)
bool NavigationState::NavigationClient::didFailToInitializePlugIn(WebKit::WebPageProxy&, API::Dictionary& info)
bool NavigationState::NavigationClient::didFailToInitializePlugIn(WebPageProxy&, API::Dictionary& info)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewDidFailToInitializePlugInWithInfo)
return false;
Expand Down Expand Up @@ -359,6 +360,25 @@
}).get()];
}

bool NavigationState::NavigationClient::didChangeBackForwardList(WebPageProxy&, WebBackForwardListItem* added, const Vector<Ref<WebBackForwardListItem>>& removed)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewBackForwardListItemAddedRemoved)
return false;

auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
if (!navigationDelegate)
return false;

NSMutableArray<WKBackForwardListItem *> *removedItems = nil;
if (removed.size()) {
removedItems = [[[NSMutableArray alloc] initWithCapacity:removed.size()] autorelease];
for (auto& removedItem : removed)
[removedItems addObject:wrapper(removedItem.get())];
}
[(id <WKNavigationDelegatePrivate>)navigationDelegate _webView:m_navigationState.m_webView backForwardListItemAdded:added ? wrapper(*added) : nil removed:removedItems];
return true;
}

bool NavigationState::NavigationClient::willGoToBackForwardListItem(WebPageProxy&, WebBackForwardListItem& item, bool inPageCache, API::Object*)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewWillGoToBackForwardListItemInPageCache)
Expand Down Expand Up @@ -606,7 +626,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[navigationDelegate webView:m_navigationState.m_webView didReceiveServerRedirectForProvisionalNavigation:wkNavigation];
}

void NavigationState::NavigationClient::willPerformClientRedirect(WebKit::WebPageProxy& page, const WTF::String& urlString, double delay)
void NavigationState::NavigationClient::willPerformClientRedirect(WebPageProxy& page, const WTF::String& urlString, double delay)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewWillPerformClientRedirect)
return;
Expand All @@ -620,7 +640,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate) _webView:m_navigationState.m_webView willPerformClientRedirectToURL:url delay:delay];
}

void NavigationState::NavigationClient::didCancelClientRedirect(WebKit::WebPageProxy& page)
void NavigationState::NavigationClient::didCancelClientRedirect(WebPageProxy& page)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewDidCancelClientRedirect)
return;
Expand Down Expand Up @@ -775,7 +795,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView navigation:wkNavigation didSameDocumentNavigation:toWKSameDocumentNavigationType(navigationType)];
}

void NavigationState::NavigationClient::renderingProgressDidChange(WebKit::WebPageProxy&, WebCore::LayoutMilestones layoutMilestones)
void NavigationState::NavigationClient::renderingProgressDidChange(WebPageProxy&, WebCore::LayoutMilestones layoutMilestones)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewRenderingProgressDidChange)
return;
Expand All @@ -787,7 +807,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView renderingProgressDidChange:renderingProgressEvents(layoutMilestones)];
}

bool NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace(WebKit::WebPageProxy&, WebKit::WebProtectionSpace* protectionSpace)
bool NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace(WebPageProxy&, WebProtectionSpace* protectionSpace)
{
if (m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallengeCompletionHandler)
return true;
Expand Down Expand Up @@ -859,7 +879,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView didReceiveAuthenticationChallenge:wrapper(*authenticationChallenge)];
}

void NavigationState::NavigationClient::processDidTerminate(WebKit::WebPageProxy& page, WebKit::ProcessTerminationReason)
void NavigationState::NavigationClient::processDidTerminate(WebPageProxy& page, ProcessTerminationReason)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewWebContentProcessDidTerminate && !m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidCrash)
return;
Expand All @@ -878,7 +898,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webViewWebProcessDidCrash:m_navigationState.m_webView];
}

void NavigationState::NavigationClient::processDidBecomeResponsive(WebKit::WebPageProxy& page)
void NavigationState::NavigationClient::processDidBecomeResponsive(WebPageProxy& page)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidBecomeResponsive)
return;
Expand All @@ -890,7 +910,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webViewWebProcessDidBecomeResponsive:m_navigationState.m_webView];
}

void NavigationState::NavigationClient::processDidBecomeUnresponsive(WebKit::WebPageProxy& page)
void NavigationState::NavigationClient::processDidBecomeUnresponsive(WebPageProxy& page)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewWebProcessDidBecomeUnresponsive)
return;
Expand All @@ -902,7 +922,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webViewWebProcessDidBecomeUnresponsive:m_navigationState.m_webView];
}

RefPtr<API::Data> NavigationState::NavigationClient::webCryptoMasterKey(WebKit::WebPageProxy&)
RefPtr<API::Data> NavigationState::NavigationClient::webCryptoMasterKey(WebPageProxy&)
{
if (!m_navigationState.m_navigationDelegateMethods.webCryptoMasterKeyForWebView) {
Vector<uint8_t> masterKey;
Expand Down Expand Up @@ -936,7 +956,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView didStartLoadForQuickLookDocumentInMainFrameWithFileName:fileName uti:uti];
}

void NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame(const WebKit::QuickLookDocumentData& data)
void NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame(const QuickLookDocumentData& data)
{
if (!m_navigationState.m_navigationDelegateMethods.webViewDidFinishLoadForQuickLookDocumentInMainFrame)
return;
Expand All @@ -960,7 +980,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
{
}

void NavigationState::HistoryClient::didNavigateWithNavigationData(WebKit::WebPageProxy&, const WebKit::WebNavigationDataStore& navigationDataStore)
void NavigationState::HistoryClient::didNavigateWithNavigationData(WebPageProxy&, const WebNavigationDataStore& navigationDataStore)
{
if (!m_navigationState.m_historyDelegateMethods.webViewDidNavigateWithNavigationData)
return;
Expand All @@ -972,7 +992,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[historyDelegate _webView:m_navigationState.m_webView didNavigateWithNavigationData:wrapper(API::NavigationData::create(navigationDataStore))];
}

void NavigationState::HistoryClient::didPerformClientRedirect(WebKit::WebPageProxy&, const WTF::String& sourceURL, const WTF::String& destinationURL)
void NavigationState::HistoryClient::didPerformClientRedirect(WebPageProxy&, const WTF::String& sourceURL, const WTF::String& destinationURL)
{
if (!m_navigationState.m_historyDelegateMethods.webViewDidPerformClientRedirectFromURLToURL)
return;
Expand All @@ -984,7 +1004,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[historyDelegate _webView:m_navigationState.m_webView didPerformClientRedirectFromURL:[NSURL _web_URLWithWTFString:sourceURL] toURL:[NSURL _web_URLWithWTFString:destinationURL]];
}

void NavigationState::HistoryClient::didPerformServerRedirect(WebKit::WebPageProxy&, const WTF::String& sourceURL, const WTF::String& destinationURL)
void NavigationState::HistoryClient::didPerformServerRedirect(WebPageProxy&, const WTF::String& sourceURL, const WTF::String& destinationURL)
{
if (!m_navigationState.m_historyDelegateMethods.webViewDidPerformServerRedirectFromURLToURL)
return;
Expand All @@ -996,7 +1016,7 @@ static void tryAppLink(RefPtr<API::NavigationAction>&& navigationAction, const S
[historyDelegate _webView:m_navigationState.m_webView didPerformServerRedirectFromURL:[NSURL _web_URLWithWTFString:sourceURL] toURL:[NSURL _web_URLWithWTFString:destinationURL]];
}

void NavigationState::HistoryClient::didUpdateHistoryTitle(WebKit::WebPageProxy&, const WTF::String& title, const WTF::String& url)
void NavigationState::HistoryClient::didUpdateHistoryTitle(WebPageProxy&, const WTF::String& title, const WTF::String& url)
{
if (!m_navigationState.m_historyDelegateMethods.webViewDidUpdateHistoryTitleForURL)
return;
Expand Down
3 changes: 2 additions & 1 deletion Source/WebKit/UIProcess/WebPageProxy.cpp
Expand Up @@ -1196,7 +1196,8 @@ void WebPageProxy::didChangeBackForwardList(WebBackForwardListItem* added, Vecto
{
PageClientProtector protector(m_pageClient);

m_loaderClient->didChangeBackForwardList(*this, added, WTFMove(removed));
if (!m_navigationClient || !m_navigationClient->didChangeBackForwardList(*this, added, removed))
m_loaderClient->didChangeBackForwardList(*this, added, WTFMove(removed));

auto transaction = m_pageLoadState.transaction();

Expand Down
13 changes: 13 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,16 @@
2017-10-05 Alex Christensen <achristensen@webkit.org>

Add ObjC equivalent of WKPageNavigationClient.didChangeBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=177966
<rdar://problem/22387135>

Reviewed by Tim Horton.

* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(-[ListItemDelegate _webView:backForwardListItemAdded:removed:]):
(-[ListItemDelegate webView:didFinishNavigation:]):
(TEST):

2017-10-04 Megan Gardner <megan_gardner@apple.com>

check-webkit-style erroneously requires a space between the carrot and brace in obj-c blocks.
Expand Down
56 changes: 56 additions & 0 deletions Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm
Expand Up @@ -25,6 +25,7 @@

#include "config.h"

#import <WebKit/WKBackForwardListPrivate.h>
#import <WebKit/WKNavigationDelegatePrivate.h>
#import <WebKit/WKNavigationPrivate.h>
#import <WebKit/WKWebView.h>
Expand Down Expand Up @@ -328,6 +329,61 @@ - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigat
TestWebKitAPI::Util::run(&isDone);
}

RetainPtr<WKBackForwardListItem> firstItem;
RetainPtr<WKBackForwardListItem> secondItem;

@interface ListItemDelegate : NSObject<WKNavigationDelegatePrivate>
@end
@implementation ListItemDelegate
- (void)_webView:(WKWebView *)webView backForwardListItemAdded:(WKBackForwardListItem *)itemAdded removed:(NSArray<WKBackForwardListItem *> *)itemsRemoved
{
NSString *firstURL = [[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"].absoluteString;
NSString *secondURL = [[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"].absoluteString;

if (!firstItem) {
EXPECT_NULL(firstItem);
EXPECT_NULL(secondItem);
EXPECT_NULL(itemsRemoved);
EXPECT_NOT_NULL(itemAdded);
EXPECT_STREQ(firstURL.UTF8String, itemAdded.URL.absoluteString.UTF8String);
firstItem = itemAdded;
} else if (!secondItem) {
EXPECT_NOT_NULL(firstItem);
EXPECT_NULL(secondItem);
EXPECT_NULL(itemsRemoved);
EXPECT_NOT_NULL(itemAdded);
EXPECT_STREQ(secondURL.UTF8String, itemAdded.URL.absoluteString.UTF8String);
secondItem = itemAdded;
} else {
EXPECT_NOT_NULL(firstItem);
EXPECT_NOT_NULL(secondItem);
EXPECT_NOT_NULL(itemsRemoved);
EXPECT_NULL(itemAdded);
EXPECT_EQ([itemsRemoved count], 2u);
EXPECT_STREQ(firstURL.UTF8String, [itemsRemoved objectAtIndex:0].URL.absoluteString.UTF8String);
EXPECT_STREQ(secondURL.UTF8String, [itemsRemoved objectAtIndex:1].URL.absoluteString.UTF8String);
isDone = true;
}
}
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
{
navigationComplete = true;
}
@end

TEST(WKNavigation, ListItemAddedRemoved)
{
auto webView = adoptNS([[WKWebView alloc] init]);
auto delegate = adoptNS([[ListItemDelegate alloc] init]);
[webView setNavigationDelegate:delegate.get()];
[webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
TestWebKitAPI::Util::run(&navigationComplete);
navigationComplete = false;
[webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
TestWebKitAPI::Util::run(&navigationComplete);
[[webView backForwardList] _removeAllItems];
TestWebKitAPI::Util::run(&isDone);
}
#endif // PLATFORM(MAC)

#endif // WK_API_ENABLED

0 comments on commit ec2143d

Please sign in to comment.