Modified: trunk/Source/WebKit2/ChangeLog (197741 => 197742)
--- trunk/Source/WebKit2/ChangeLog 2016-03-08 08:49:09 UTC (rev 197741)
+++ trunk/Source/WebKit2/ChangeLog 2016-03-08 08:55:55 UTC (rev 197742)
@@ -1,3 +1,18 @@
+2016-03-08 Timothy Hatcher <[email protected]>
+
+ Web Inspector: Make WebAutomationSession::closeBrowsingContext work as expected
+
+ https://bugs.webkit.org/show_bug.cgi?id=155162
+ rdar://problem/25027191
+
+ Reviewed by Brian Burg.
+
+ * UIProcess/Automation/WebAutomationSession.cpp:
+ (WebKit::WebAutomationSession::closeBrowsingContext):
+ Call closePage, the same method ultimately used by window.close().
+
+ * UIProcess/WebPageProxy.h: Make closePage public.
+
2016-03-07 Carlos Garcia Campos <[email protected]>
REGRESSION(r197062): [GTK] Transparent backgrounds no longer work after r197062
Modified: trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp (197741 => 197742)
--- trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp 2016-03-08 08:49:09 UTC (rev 197741)
+++ trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp 2016-03-08 08:55:55 UTC (rev 197742)
@@ -170,9 +170,7 @@
if (handle == m_activeBrowsingContextHandle)
m_activeBrowsingContextHandle = emptyString();
- // FIXME: Verify this is enough. We still might want to go through the AutomationSessionClient
- // to get closer to a user pressing the close button.
- page->tryClose();
+ page->closePage(false);
}
void WebAutomationSession::switchToBrowsingContext(Inspector::ErrorString& errorString, const String& handle)
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (197741 => 197742)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-03-08 08:49:09 UTC (rev 197741)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2016-03-08 08:55:55 UTC (rev 197742)
@@ -363,6 +363,8 @@
bool tryClose();
bool isClosed() const { return m_isClosed; }
+ void closePage(bool stopResponsivenessTimer);
+
RefPtr<API::Navigation> loadRequest(const WebCore::ResourceRequest&, WebCore::ShouldOpenExternalURLsPolicy = WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadFile(const String& fileURL, const String& resourceDirectoryURL, API::Object* userData = nullptr);
RefPtr<API::Navigation> loadData(API::Data*, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData = nullptr);
@@ -1170,7 +1172,6 @@
// UI client
void createNewPage(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, const NavigationActionData&, uint64_t& newPageID, WebPageCreationParameters&);
void showPage();
- void closePage(bool stopResponsivenessTimer);
void runJavaScriptAlert(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
void runJavaScriptConfirm(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
void runJavaScriptPrompt(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);