| 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 if (p.popup) | 64 if (p.popup) |
| 65 p.popup->listBox()->disconnectClient(); | 65 p.popup->listBox()->disconnectClient(); |
| 66 hide(); | 66 hide(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void PopupMenuChromium::show(const IntRect& rect, FrameView* frameView, int inde
x) | 69 void PopupMenuChromium::show(const IntRect& rect, FrameView* frameView, int inde
x) |
| 70 { | 70 { |
| 71 if (!p.popup) { | 71 if (!p.popup) { |
| 72 Settings* settings = frameView->frame()->page()->settings(); | 72 Settings* settings = frameView->frame()->page()->settings(); |
| 73 PopupContainerSettings popupSettings = dropDownSettings; | 73 PopupContainerSettings popupSettings = dropDownSettings; |
| 74 popupSettings.deviceSupportsTouch = settings->deviceSupportsTouch(); | 74 popupSettings.primaryInputIncludesTouch = settings->primaryPointerDevice
s() & PointerDeviceTouch; |
| 75 p.popup = PopupContainer::create(client(), PopupContainer::Select, popup
Settings); | 75 p.popup = PopupContainer::create(client(), PopupContainer::Select, popup
Settings); |
| 76 } | 76 } |
| 77 p.popup->showInRect(rect, frameView, index); | 77 p.popup->showInRect(rect, frameView, index); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void PopupMenuChromium::hide() | 80 void PopupMenuChromium::hide() |
| 81 { | 81 { |
| 82 if (p.popup) | 82 if (p.popup) |
| 83 p.popup->hide(); | 83 p.popup->hide(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void PopupMenuChromium::updateFromElement() | 86 void PopupMenuChromium::updateFromElement() |
| 87 { | 87 { |
| 88 p.popup->listBox()->updateFromElement(); | 88 p.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 |