[haiku-webkit-commits] r389 - webkit/trunk/WebCore/platform/haiku

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Tue, 06 Apr 2010 00:58:41 +0000

Author: stippi
Date: Tue Apr  6 00:58:40 2010
New Revision: 389
URL: http://mmlr.dyndns.org/changeset/389

Log:
Do not hide the top-level widget (i.e. the containing BWebView) if any random
widget is supposed to be hidden. Changed the code such that when we ever support
one native widget per WebCore widget, that it would then work. Added other
missing code that the GTK and Qt ports have in show() and hide(). This fixes
youtube disappearing during load and the GMX Mail 2010 beta also works perfectly
now.

Modified:
   webkit/trunk/WebCore/platform/haiku/WidgetHaiku.cpp

Modified: webkit/trunk/WebCore/platform/haiku/WidgetHaiku.cpp
==============================================================================
--- webkit/trunk/WebCore/platform/haiku/WidgetHaiku.cpp Tue Apr  6 00:55:42 
2010        (r388)
+++ webkit/trunk/WebCore/platform/haiku/WidgetHaiku.cpp Tue Apr  6 00:58:40 
2010        (r389)
@@ -44,7 +44,7 @@
         : m_widget(widget)
     {
        if (!m_widget || m_widget->LockLooperWithTimeout(5000) != B_OK)
-          m_widget = 0; 
+          m_widget = 0;
     }
 
     ~AutoPlatformWidgetLocker()
@@ -98,16 +98,24 @@
 
 void Widget::show()
 {
-    AutoPlatformWidgetLocker locker(topLevelPlatformWidget());
-    if (locker.isLocked() && topLevelPlatformWidget()->IsHidden())
-        topLevelPlatformWidget()->Show();
+    setSelfVisible(true);
+    if (!isParentVisible())
+       return;
+
+    AutoPlatformWidgetLocker locker(platformWidget());
+    if (locker.isLocked() && platformWidget()->IsHidden())
+        platformWidget()->Show();
 }
 
 void Widget::hide()
 {
-    AutoPlatformWidgetLocker locker(topLevelPlatformWidget());
-    if (locker.isLocked() && !topLevelPlatformWidget()->IsHidden())
-        topLevelPlatformWidget()->Hide();
+    setSelfVisible(false);
+    if (!isParentVisible())
+       return;
+
+    AutoPlatformWidgetLocker locker(platformWidget());
+    if (locker.isLocked() && !platformWidget()->IsHidden())
+        platformWidget()->Hide();
 }
 
 void Widget::paint(GraphicsContext* p, IntRect const& r)

Other related posts:

  • » [haiku-webkit-commits] r389 - webkit/trunk/WebCore/platform/haiku - webkit