* Changed the implementation of context menus in DownloadProgressViews. The views

were intercepting mouse messages even if the window was not showing. Now
  secondary clicks are intercepted in DownloadWindow and the target view is found,
  which makes this much cheaper.
* Offset context menus by 2 pixels, so the mouse does not start directly over
  an item.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@488 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi
2012-07-03 15:44:09 +02:00
committed by Alexandre Deckner
parent e7c6e9f747
commit e07fc6b71d
6 changed files with 65 additions and 42 deletions
+11 -7
View File
@@ -1300,16 +1300,22 @@ void
BrowserWindow::_UpdateTabGroupVisibility()
{
if (Lock()) {
if (fInterfaceVisible) {
fTabGroup->SetVisible(fShowTabsIfSinglePageOpen
|| fTabManager->CountTabs() > 1);
}
if (fInterfaceVisible)
fTabGroup->SetVisible(_TabGroupShouldBeVisible());
fTabManager->SetCloseButtonsAvailable(fTabManager->CountTabs() > 1);
Unlock();
}
}
bool
BrowserWindow::_TabGroupShouldBeVisible() const
{
return (fShowTabsIfSinglePageOpen || fTabManager->CountTabs() > 1)
&& (fVisibleInterfaceElements & INTERFACE_ELEMENT_TABS) != 0;
}
void
BrowserWindow::_ShutdownTab(int32 index)
{
@@ -1868,9 +1874,7 @@ BrowserWindow::_ShowInterface(bool show)
fMenuGroup->SetVisible(
(fVisibleInterfaceElements & INTERFACE_ELEMENT_MENU) != 0);
#endif
fTabGroup->SetVisible((fShowTabsIfSinglePageOpen
|| fTabManager->CountTabs() > 1)
&& (fVisibleInterfaceElements & INTERFACE_ELEMENT_TABS) != 0);
fTabGroup->SetVisible(_TabGroupShouldBeVisible());
fNavigationGroup->SetVisible(
(fVisibleInterfaceElements & INTERFACE_ELEMENT_NAVIGATION) != 0);
fStatusGroup->SetVisible(