OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // deleted. | 64 // deleted. |
65 if (m_popup) | 65 if (m_popup) |
66 m_popup->listBox()->disconnectClient(); | 66 m_popup->listBox()->disconnectClient(); |
67 hide(); | 67 hide(); |
68 } | 68 } |
69 | 69 |
70 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co
ntrolSize, int index) | 70 void PopupMenuChromium::show(const FloatQuad& controlPosition, const IntSize& co
ntrolSize, int index) |
71 { | 71 { |
72 if (!m_popup) { | 72 if (!m_popup) { |
73 PopupContainerSettings popupSettings = dropDownSettings; | 73 PopupContainerSettings popupSettings = dropDownSettings; |
74 popupSettings.deviceSupportsTouch = m_frameView->frame()->page()->settin
gs().deviceSupportsTouch(); | 74 popupSettings.deviceSupportsTouch = m_frameView->frame().page()->setting
s().deviceSupportsTouch(); |
75 m_popup = PopupContainer::create(client(), PopupContainer::Select, popup
Settings); | 75 m_popup = PopupContainer::create(client(), PopupContainer::Select, popup
Settings); |
76 } | 76 } |
77 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index); | 77 m_popup->showInRect(controlPosition, controlSize, m_frameView.get(), index); |
78 } | 78 } |
79 | 79 |
80 void PopupMenuChromium::hide() | 80 void PopupMenuChromium::hide() |
81 { | 81 { |
82 if (m_popup) | 82 if (m_popup) |
83 m_popup->hide(); | 83 m_popup->hide(); |
84 } | 84 } |
85 | 85 |
86 void PopupMenuChromium::updateFromElement() | 86 void PopupMenuChromium::updateFromElement() |
87 { | 87 { |
88 m_popup->listBox()->updateFromElement(); | 88 m_popup->listBox()->updateFromElement(); |
89 } | 89 } |
90 | 90 |
91 | 91 |
92 void PopupMenuChromium::disconnectClient() | 92 void PopupMenuChromium::disconnectClient() |
93 { | 93 { |
94 m_popupClient = 0; | 94 m_popupClient = 0; |
95 } | 95 } |
96 | 96 |
97 } // namespace WebCore | 97 } // namespace WebCore |
OLD | NEW |