[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 15:36:19 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit de91794f0f4b4d98d9bee269f3f35f68c6db178c
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 9 03:04:30 2010 +0000
2010-11-08 John Knottenbelt <jknotten at chromium.org>
Reviewed by Kent Tamura.
WebViewHost::reset() uses placement new.
https://bugs.webkit.org/show_bug.cgi?id=49069
WebViewHost is using placement destruction / new to simulate a fresh
WebViewHost object at the same address. This is because the WebView remains
open across tests and maintains a pointer to the WebViewHost.
This change resets member variables explictly instead of the placement new dance.
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::WebViewHost):
(WebViewHost::reset):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 589edc9..ac40e0b 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-08 John Knottenbelt <jknotten at chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ WebViewHost::reset() uses placement new.
+ https://bugs.webkit.org/show_bug.cgi?id=49069
+
+ WebViewHost is using placement destruction / new to simulate a fresh
+ WebViewHost object at the same address. This is because the WebView remains
+ open across tests and maintains a pointer to the WebViewHost.
+ This change resets member variables explictly instead of the placement new dance.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::WebViewHost):
+ (WebViewHost::reset):
+
2010-11-08 Dirk Pranke <dpranke at chromium.org>
Reviewed by Eric Seidel.
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index 2f9bdfb..0dc57ef 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -1066,27 +1066,10 @@ void WebViewHost::openFileSystem(WebFrame* frame, WebFileSystem::Type type, long
// Public functions -----------------------------------------------------------
WebViewHost::WebViewHost(TestShell* shell)
- : m_policyDelegateEnabled(false)
- , m_policyDelegateIsPermissive(false)
- , m_policyDelegateShouldNotifyDone(false)
- , m_shell(shell)
+ : m_shell(shell)
, m_webWidget(0)
- , m_topLoadingFrame(0)
- , m_pageId(-1)
- , m_lastPageIdUpdated(-1)
- , m_hasWindow(false)
- , m_inModalLoop(false)
- , m_smartInsertDeleteEnabled(true)
-#if OS(WINDOWS)
- , m_selectTrailingWhitespaceEnabled(true)
-#else
- , m_selectTrailingWhitespaceEnabled(false)
-#endif
- , m_blocksRedirects(false)
- , m_requestReturnNull(false)
- , m_isPainting(false)
{
- m_navigationController.set(new TestNavigationController(this));
+ reset();
}
WebViewHost::~WebViewHost()
@@ -1108,13 +1091,43 @@ WebWidget* WebViewHost::webWidget() const
void WebViewHost::reset()
{
- // Do a little placement new dance...
- TestShell* shell = m_shell;
- WebWidget* widget = m_webWidget;
- this->~WebViewHost();
- new (this) WebViewHost(shell);
- setWebWidget(widget);
- webView()->mainFrame()->setName(WebString());
+ m_policyDelegateEnabled = false;
+ m_policyDelegateIsPermissive = false;
+ m_policyDelegateShouldNotifyDone = false;
+ m_topLoadingFrame = 0;
+ m_pageId = -1;
+ m_lastPageIdUpdated = -1;
+ m_hasWindow = false;
+ m_inModalLoop = false;
+ m_smartInsertDeleteEnabled = true;
+#if OS(WINDOWS)
+ m_selectTrailingWhitespaceEnabled = true;
+#else
+ m_selectTrailingWhitespaceEnabled = false;
+#endif
+ m_blocksRedirects = false;
+ m_requestReturnNull = false;
+ m_isPainting = false;
+ m_canvas.clear();
+
+ m_navigationController.set(new TestNavigationController(this));
+
+ m_pendingExtraData.clear();
+ m_resourceIdentifierMap.clear();
+ m_clearHeaders.clear();
+ m_editCommandName.clear();
+ m_editCommandValue.clear();
+
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
+ m_geolocationServiceMock.clear();
+#endif
+
+ m_currentCursor = WebCursorInfo();
+ m_windowRect = WebRect();
+ m_paintRect = WebRect();
+
+ if (m_webWidget)
+ webView()->mainFrame()->setName(WebString());
}
void WebViewHost::setSelectTrailingWhitespaceEnabled(bool enabled)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list