[haiku-webkit-commits] r539 - webkit/trunk/WebKit/haiku/WebPositive/tabview

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Mon, 26 Jul 2010 12:05:26 +0000

Author: stippi
Date: Mon Jul 26 12:05:26 2010
New Revision: 539
URL: http://mmlr.dyndns.org/changeset/539

Log:
Account for the fact that the visible frame of a tab is one pixel larger at
the bottom. Will fix Haiku ticket #6383 when a new package is made available.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp

Modified: webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp  Sat Jul 
24 02:54:39 2010        (r538)
+++ webkit/trunk/WebKit/haiku/WebPositive/tabview/TabContainerView.cpp  Mon Jul 
26 12:05:26 2010        (r539)
@@ -429,9 +429,14 @@
        BGroupLayout* layout = GroupLayout();
        int32 count = layout->CountItems() - 1;
        for (int32 i = 0; i < count; i++) {
-               TabLayoutItem* item = dynamic_cast<TabLayoutItem*>(
-                       layout->ItemAt(i));
-               if (item && item->IsVisible() && item->Frame().Contains(where))
+               TabLayoutItem* item = 
dynamic_cast<TabLayoutItem*>(layout->ItemAt(i));
+               if (item == NULL || !item->IsVisible())
+                       continue;
+               // Account for the fact that the tab frame does not contain the
+               // visible bottom border.
+               BRect frame = item->Frame();
+               frame.bottom++;
+               if (frame.Contains(where))
                        return item->Parent();
        }
        return NULL;

Other related posts: