[haiku-webkit-commits] r370 - webkit/trunk/WebKit/haiku/API

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Fri, 02 Apr 2010 21:30:32 +0000

Author: stippi
Date: Fri Apr  2 21:30:32 2010
New Revision: 370
URL: http://mmlr.dyndns.org/changeset/370

Log:
RESIZE_REQUESTED wasn't even used anymore, so the behavior could not be
overridden as intended. Fixed.

Modified:
   webkit/trunk/WebKit/haiku/API/WebPage.cpp

Modified: webkit/trunk/WebKit/haiku/API/WebPage.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/API/WebPage.cpp   Fri Apr  2 21:19:29 2010        
(r369)
+++ webkit/trunk/WebKit/haiku/API/WebPage.cpp   Fri Apr  2 21:30:32 2010        
(r370)
@@ -496,11 +496,15 @@
 
 void BWebPage::setWindowBounds(const BRect& bounds)
 {
-    if (fWebView->LockLooper()) {
-        fWebView->Window()->MoveTo(bounds.LeftTop());
-        fWebView->Window()->ResizeTo(bounds.Width(), bounds.Height());
-        fWebView->UnlockLooper();
-    }
+       BMessage message(RESIZING_REQUESTED);
+       message.AddRect("rect", bounds);
+       BMessenger windowMessenger(fWebView->Window());
+       if (windowMessenger.IsValid()) {
+               // Better make this synchronous, since I don't know if it is
+               // perhaps meant to be (called from 
ChromeClientHaiku::setWindowRect()).
+               BMessage reply;
+               windowMessenger.SendMessage(&message, &reply);
+       }
 }
 
 BRect BWebPage::viewBounds()

Other related posts:

  • » [haiku-webkit-commits] r370 - webkit/trunk/WebKit/haiku/API - webkit