summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 18:11:20 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 18:11:20 +0000
commitcd9832fe7ee4e4dc28f0b301b4eb614dcbba25e4 (patch)
tree85c652ad14572b480be9fdbf7b0e51877167a4cc /webkit
parent2b57f5460c86978c881bccd79d9272388a98312f (diff)
downloadchromium_src-cd9832fe7ee4e4dc28f0b301b4eb614dcbba25e4.zip
chromium_src-cd9832fe7ee4e4dc28f0b301b4eb614dcbba25e4.tar.gz
chromium_src-cd9832fe7ee4e4dc28f0b301b4eb614dcbba25e4.tar.bz2
Revert bug fix because interactive_ui_tests are failing.
Review URL: http://codereview.chromium.org/99358 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/chrome_client_impl.cc34
-rw-r--r--webkit/glue/chrome_client_impl.h10
2 files changed, 1 insertions, 43 deletions
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index 2a6eedc..573a3b2 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -29,7 +29,6 @@ MSVC_POP_WARNING();
#include "webkit/glue/chrome_client_impl.h"
#include "base/logging.h"
-#include "base/message_loop.h"
#include "base/gfx/rect.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
@@ -83,8 +82,7 @@ ChromeClientImpl::ChromeClientImpl(WebViewImpl* webview)
scrollbars_visible_(true),
menubar_visible_(true),
resizable_(true),
- ignore_next_set_cursor_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
+ ignore_next_set_cursor_(false) {
}
ChromeClientImpl::~ChromeClientImpl() {
@@ -94,47 +92,17 @@ void ChromeClientImpl::chromeDestroyed() {
delete this;
}
-void ChromeClientImpl::ClearPendingWindowRect() {
- has_pending_window_rect_ = false;
-}
-
-void ChromeClientImpl::SetPendingWindowRect(const WebCore::FloatRect& rect) {
- // Because we may be asynchronously attached to our delegate (where we
- // do the real SetWindowRect()/GetWindowRect()), we keep a pending
- // window rect size. If JS code sets the WindowRect, and then calls
- // GetWindowRect() before the delegate has asyncronously handled the
- // Set, the pending rect makes sure that JS gets the right values.
- //
- // TODO(mbelshe): There is still a potential race condition here. Currently
- // this cache of the pending_window_rect_ is maintained until we return to
- // the message loop. We could make the browser send an ACK when it processes
- // the SetWindowRect change.
- pending_window_rect_ = rect;
- if (!has_pending_window_rect_) {
- // Create a task to clear the pending rect as soon as we
- // go through our message loop once.
- MessageLoop::current()->PostTask(FROM_HERE,
- task_factory_.NewRunnableMethod(
- &ChromeClientImpl::ClearPendingWindowRect));
- has_pending_window_rect_ = true;
- }
-}
-
void ChromeClientImpl::setWindowRect(const WebCore::FloatRect& r) {
WebViewDelegate* delegate = webview_->delegate();
if (delegate) {
WebCore::IntRect ir(r);
delegate->SetWindowRect(webview_,
gfx::Rect(ir.x(), ir.y(), ir.width(), ir.height()));
- SetPendingWindowRect(r);
}
}
WebCore::FloatRect ChromeClientImpl::windowRect() {
WebRect rect;
- if (has_pending_window_rect_)
- return pending_window_rect_;
-
if (webview_->delegate()) {
webview_->delegate()->GetRootWindowRect(webview_, &rect);
} else {
diff --git a/webkit/glue/chrome_client_impl.h b/webkit/glue/chrome_client_impl.h
index 194dd62..e372f7c 100644
--- a/webkit/glue/chrome_client_impl.h
+++ b/webkit/glue/chrome_client_impl.h
@@ -6,7 +6,6 @@
#define WEBKIT_GLUE_CHROME_CLIENT_IMPL_H_
#include "base/compiler_specific.h"
-#include "base/task.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "ChromeClientChromium.h"
@@ -136,9 +135,6 @@ class ChromeClientImpl : public WebCore::ChromeClientChromium {
virtual WebCore::HTMLParserQuirks* createHTMLParserQuirks() { return 0; }
private:
- void ClearPendingWindowRect();
- void SetPendingWindowRect(const WebCore::FloatRect& r);
-
WebViewImpl* webview_; // weak pointer
bool toolbars_visible_;
bool statusbar_visible_;
@@ -147,12 +143,6 @@ class ChromeClientImpl : public WebCore::ChromeClientChromium {
bool resizable_;
// Set to true if the next SetCursor is to be ignored.
bool ignore_next_set_cursor_;
- // While we are waiting for the browser to update window sizes,
- // we track the pending size temporarily.
- bool has_pending_window_rect_;
- WebCore::FloatRect pending_window_rect_;
-
- ScopedRunnableMethodFactory<ChromeClientImpl> task_factory_;
};
#endif // WEBKIT_GLUE_CHROME_CLIENT_IMPL_H_