summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/haiku/PopupMenuHaiku.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/haiku/PopupMenuHaiku.cpp')
-rw-r--r--WebCore/platform/haiku/PopupMenuHaiku.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/WebCore/platform/haiku/PopupMenuHaiku.cpp b/WebCore/platform/haiku/PopupMenuHaiku.cpp
index 5adbc66..e3edb83 100644
--- a/WebCore/platform/haiku/PopupMenuHaiku.cpp
+++ b/WebCore/platform/haiku/PopupMenuHaiku.cpp
@@ -2,6 +2,7 @@
* This file is part of the popup menu implementation for <select> elements in WebCore.
*
* Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de>
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,7 +22,7 @@
*/
#include "config.h"
-#include "PopupMenu.h"
+#include "PopupMenuHaiku.h"
#include "FrameView.h"
@@ -72,9 +73,9 @@ private:
PopupMenuClient* m_popupClient;
};
-class PopupMenuHaiku : public BPopUpMenu {
+class HaikuPopup : public BPopUpMenu {
public:
- PopupMenuHaiku(PopupMenuClient* popupClient)
+ HaikuPopup(PopupMenuClient* popupClient)
: BPopUpMenu("WebCore Popup", true, false)
, m_popupClient(popupClient)
, m_Handler(popupClient)
@@ -86,7 +87,7 @@ public:
SetAsyncAutoDestruct(false);
}
- virtual ~PopupMenuHaiku()
+ virtual ~HaikuPopup()
{
if (be_app->Lock()) {
be_app->RemoveHandler(&m_Handler);
@@ -153,39 +154,39 @@ private:
PopupMenuHandler m_Handler;
};
-PopupMenu::PopupMenu(PopupMenuClient* client)
+PopupMenuHaiku::PopupMenuHaiku(PopupMenuClient* client)
: m_popupClient(client)
- , m_menu(new PopupMenuHaiku(client))
+ , m_menu(new HaikuPopup(client))
{
// We don't need additional references to the client, since we completely
// control any sub-objects we create that need it as well.
}
-PopupMenu::~PopupMenu()
+PopupMenuHaiku::~PopupMenuHaiku()
{
delete m_menu;
}
-void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
+void PopupMenuHaiku::disconnectClient()
+{
+ m_popupClient = 0;
+}
+
+void PopupMenuHaiku::show(const IntRect& rect, FrameView* view, int index)
{
// The menu will update itself from the PopupMenuClient before showing.
m_menu->show(rect, view, index);
}
-void PopupMenu::hide()
+void PopupMenuHaiku::hide()
{
m_menu->hide();
}
-void PopupMenu::updateFromElement()
+void PopupMenuHaiku::updateFromElement()
{
client()->setTextFromItem(m_popupClient->selectedIndex());
}
-bool PopupMenu::itemWritingDirectionIsNatural()
-{
- return false;
-}
-
} // namespace WebCore