diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/web/PopupMenuChromium.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/web/PopupMenuChromium.cpp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/chromium/third_party/WebKit/Source/web/PopupMenuChromium.cpp b/chromium/third_party/WebKit/Source/web/PopupMenuChromium.cpp index 94df31cf18f..cf087ff1c45 100644 --- a/chromium/third_party/WebKit/Source/web/PopupMenuChromium.cpp +++ b/chromium/third_party/WebKit/Source/web/PopupMenuChromium.cpp @@ -30,28 +30,18 @@ */ #include "config.h" -#include "PopupMenuChromium.h" +#include "web/PopupMenuChromium.h" -#include "PopupContainer.h" -#include "core/frame/Frame.h" #include "core/frame/FrameView.h" +#include "core/frame/LocalFrame.h" #include "core/frame/Settings.h" +#include "web/PopupContainer.h" -namespace WebCore { +namespace blink { -int PopupMenuChromium::s_minimumRowHeight = 0; -int PopupMenuChromium::s_optionRowHeightForTouch = 28; +using namespace WebCore; -// The settings used for the drop down menu. -// This is the delegate used if none is provided. -static const PopupContainerSettings dropDownSettings = { - true, // setTextOnIndexChange - true, // acceptOnAbandon - false, // loopSelectionNavigation - false // restrictWidthOfListBox -}; - -PopupMenuChromium::PopupMenuChromium(Frame& frame, PopupMenuClient* client) +PopupMenuChromium::PopupMenuChromium(LocalFrame& frame, PopupMenuClient* client) : m_popupClient(client) , m_frameView(frame.view()) { @@ -59,8 +49,7 @@ PopupMenuChromium::PopupMenuChromium(Frame& frame, PopupMenuClient* client) PopupMenuChromium::~PopupMenuChromium() { - // When the PopupMenuChromium is destroyed, the client could already have been - // deleted. + // When the PopupMenuChromium is destroyed, the client could already have been deleted. if (m_popup) m_popup->listBox()->disconnectClient(); hide(); @@ -69,9 +58,8 @@ PopupMenuChromium::~PopupMenuChromium() void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) { if (!m_popup) { - PopupContainerSettings popupSettings = dropDownSettings; - popupSettings.deviceSupportsTouch = m_frameView->frame().settings()->deviceSupportsTouch(); - m_popup = PopupContainer::create(client(), PopupContainer::Select, popupSettings); + bool deviceSupportsTouch = m_frameView->frame().settings()->deviceSupportsTouch(); + m_popup = PopupContainer::create(m_popupClient, deviceSupportsTouch); } m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index); } @@ -93,4 +81,4 @@ void PopupMenuChromium::disconnectClient() m_popupClient = 0; } -} // namespace WebCore +} // namespace blink |