[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
tony at chromium.org
tony at chromium.org
Wed Dec 22 15:48:20 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3f0b97c156be9d4512011355b24128f25f875a0a
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 12 18:25:21 2010 +0000
2010-11-12 Tony Chang <tony at chromium.org>
Reviewed by Kent Tamura.
[chromium] Load a blank page when closing DRT WebViewHosts
https://bugs.webkit.org/show_bug.cgi?id=49417
* platform/chromium/drt_expectations.txt: Fix 2 tests in DRT.
2010-11-12 Tony Chang <tony at chromium.org>
Reviewed by Kent Tamura.
[chromium] Load a blank page when closing DRT WebViewHosts
https://bugs.webkit.org/show_bug.cgi?id=49417
In test_shell, when we close a window, we first load about:blank
and run GC to fire the destruction logic of the page. In test_shell,
this happens in ~TestShell. In DRT, we manage virtual windows as
WebViewHosts, so we need to replicate this logic in ~WebViewHost.
Managing focus is a bit trickier, since normally you would get window
events to reset the focus to the right window. We do it manually
instead.
This fixes 2 plugin tests on DRT.
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::~TestShell): Move window close logic to ~WebViewHost.
(TestShell::closeWindow): Move widget close() to WVH destructor and
manage focus manually.
(TestShell::closeRemainingWindows): Comment typo.
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::closeWidget):
(invokeCloseWidget):
(WebViewHost::closeWidgetSoon): Close the window asynchronously (matches
test_shell).
(WebViewHost::~WebViewHost):
* DumpRenderTree/chromium/WebViewHost.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 51c07ae..34b3d89 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-11-12 Tony Chang <tony at chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] Load a blank page when closing DRT WebViewHosts
+ https://bugs.webkit.org/show_bug.cgi?id=49417
+
+ * platform/chromium/drt_expectations.txt: Fix 2 tests in DRT.
+
2010-11-12 Mihai Parparita <mihaip at chromium.org>
Unreviewed Chromium rebaseline.
diff --git a/LayoutTests/platform/chromium/drt_expectations.txt b/LayoutTests/platform/chromium/drt_expectations.txt
index 7a550f3..a1039b5 100644
--- a/LayoutTests/platform/chromium/drt_expectations.txt
+++ b/LayoutTests/platform/chromium/drt_expectations.txt
@@ -17,10 +17,6 @@ BUG_DRT WIN MAC : fast/speech/input-appearance-numberandspeech.html = IMAGE
BUG_DRT WIN MAC : fast/speech/input-appearance-searchandspeech.html = IMAGE
BUG_DRT WIN MAC : fast/speech/input-appearance-speechbutton.html = IMAGE
-// Plugin failures
-BUG48431 WIN LINUX : plugins/geturlnotify-during-document-teardown.html = TEXT
-BUG48431 WIN LINUX : plugins/open-and-close-window-with-plugin.html = TEXT
-
// Inspector-related failures
BUG_DRT WIN : http/tests/inspector-enabled/console-log-before-frame-navigation.html = TEXT
BUG_DRT WIN : http/tests/inspector/change-iframe-src.html = CRASH
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index d06818a..a99603f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,34 @@
+2010-11-12 Tony Chang <tony at chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] Load a blank page when closing DRT WebViewHosts
+ https://bugs.webkit.org/show_bug.cgi?id=49417
+
+ In test_shell, when we close a window, we first load about:blank
+ and run GC to fire the destruction logic of the page. In test_shell,
+ this happens in ~TestShell. In DRT, we manage virtual windows as
+ WebViewHosts, so we need to replicate this logic in ~WebViewHost.
+
+ Managing focus is a bit trickier, since normally you would get window
+ events to reset the focus to the right window. We do it manually
+ instead.
+
+ This fixes 2 plugin tests on DRT.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::~TestShell): Move window close logic to ~WebViewHost.
+ (TestShell::closeWindow): Move widget close() to WVH destructor and
+ manage focus manually.
+ (TestShell::closeRemainingWindows): Comment typo.
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::closeWidget):
+ (invokeCloseWidget):
+ (WebViewHost::closeWidgetSoon): Close the window asynchronously (matches
+ test_shell).
+ (WebViewHost::~WebViewHost):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
2010-11-12 David Levin <levin at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
index 9bb0192..5de351c 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
@@ -117,14 +117,8 @@ TestShell::~TestShell()
// Note: DevTools are closed together with all the other windows in the
// windows list.
- loadURL(GURL("about:blank"));
- // Call GC twice to clean up garbage.
- callJSGC();
- callJSGC();
-
// Destroy the WebView before its WebViewHost.
m_drtDevToolsAgent->setWebView(0);
- m_webView->close();
}
void TestShell::createDRTDevToolsClient(DRTDevToolsAgent* agent)
@@ -588,16 +582,24 @@ void TestShell::closeWindow(WebViewHost* window)
return;
}
m_windowList.remove(i);
+ WebWidget* focusedWidget = m_focusedWidget;
if (window->webWidget() == m_focusedWidget)
- m_focusedWidget = 0;
- window->webWidget()->close();
+ focusedWidget = 0;
+
delete window;
+ // We set the focused widget after deleting the web view host because it
+ // can change the focus.
+ m_focusedWidget = focusedWidget;
+ if (m_focusedWidget) {
+ webView()->setIsActive(true);
+ m_focusedWidget->setFocus(true);
+ }
}
void TestShell::closeRemainingWindows()
{
// Iterate through the window list and close everything except the main
- // ihwindow. We don't want to delete elements as we're iterating, so we copy
+ // window. We don't want to delete elements as we're iterating, so we copy
// to a temp vector first.
Vector<WebViewHost*> windowsToDelete;
for (unsigned i = 0; i < m_windowList.size(); ++i) {
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index 4762469..3f126be 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -643,14 +643,24 @@ void WebViewHost::show(WebNavigationPolicy)
updatePaintRect(WebRect(0, 0, size.width, size.height));
}
-void WebViewHost::closeWidgetSoon()
+
+
+void WebViewHost::closeWidget()
{
m_hasWindow = false;
m_shell->closeWindow(this);
- if (m_inModalLoop) {
- m_inModalLoop = false;
- webkit_support::QuitMessageLoop();
- }
+ // No more code here, we should be deleted at this point.
+}
+
+static void invokeCloseWidget(void* context)
+{
+ WebViewHost* wvh = static_cast<WebViewHost*>(context);
+ wvh->closeWidget();
+}
+
+void WebViewHost::closeWidgetSoon()
+{
+ webkit_support::PostDelayedTask(invokeCloseWidget, static_cast<void*>(this), 0);
}
void WebViewHost::didChangeCursor(const WebCursorInfo& cursorInfo)
@@ -1085,6 +1095,18 @@ WebViewHost::WebViewHost(TestShell* shell)
WebViewHost::~WebViewHost()
{
+ // Navigate to an empty page to fire all the destruction logic for the
+ // current page.
+ loadURLForFrame(GURL("about:blank"), WebString());
+
+ // Call GC twice to clean up garbage.
+ m_shell->callJSGC();
+ m_shell->callJSGC();
+
+ webWidget()->close();
+
+ if (m_inModalLoop)
+ webkit_support::QuitMessageLoop();
}
WebView* WebViewHost::webView() const
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index 0e12978..213cf3d 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -89,6 +89,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
void addClearHeader(const WTF::String& header) { m_clearHeaders.add(header); }
const HashSet<WTF::String>& clearHeaders() const { return m_clearHeaders; }
+ void closeWidget();
WebKit::WebContextMenuData* lastContextMenuData() const;
void clearContextMenuData();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list