| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "Font.h" | 34 #include "Font.h" |
| 35 #include "FontSelector.h" | 35 #include "FontSelector.h" |
| 36 #include "FramelessScrollViewClient.h" | 36 #include "FramelessScrollViewClient.h" |
| 37 #include "GraphicsContext.h" | 37 #include "GraphicsContext.h" |
| 38 #include "IntRect.h" | 38 #include "IntRect.h" |
| 39 #include "KeyboardCodes.h" | 39 #include "KeyboardCodes.h" |
| 40 #include "PlatformGestureEvent.h" | 40 #include "PlatformGestureEvent.h" |
| 41 #include "PlatformKeyboardEvent.h" | 41 #include "PlatformKeyboardEvent.h" |
| 42 #include "PlatformMouseEvent.h" | 42 #include "PlatformMouseEvent.h" |
| 43 #include "PlatformScreen.h" | 43 #include "PlatformScreen.h" |
| 44 #include "PlatformTouchEvent.h" |
| 44 #include "PlatformWheelEvent.h" | 45 #include "PlatformWheelEvent.h" |
| 45 #include "PopupContainer.h" | 46 #include "PopupContainer.h" |
| 46 #include "PopupMenuChromium.h" | 47 #include "PopupMenuChromium.h" |
| 47 #include "PopupMenuClient.h" | 48 #include "PopupMenuClient.h" |
| 48 #include "RenderTheme.h" | 49 #include "RenderTheme.h" |
| 49 #include "RuntimeEnabledFeatures.h" | 50 #include "RuntimeEnabledFeatures.h" |
| 50 #include "ScrollbarTheme.h" | 51 #include "ScrollbarTheme.h" |
| 51 #include "StringTruncator.h" | 52 #include "StringTruncator.h" |
| 52 #include "TextRun.h" | 53 #include "TextRun.h" |
| 53 #include <ctype.h> | 54 #include <ctype.h> |
| 54 #include <limits> | 55 #include <limits> |
| 55 #include <wtf/CurrentTime.h> | 56 #include <wtf/CurrentTime.h> |
| 56 | 57 |
| 57 #if ENABLE(TOUCH_EVENTS) | |
| 58 #include "PlatformTouchEvent.h" | |
| 59 #endif | |
| 60 | |
| 61 namespace WebCore { | 58 namespace WebCore { |
| 62 | 59 |
| 63 using namespace std; | 60 using namespace std; |
| 64 using namespace WTF; | 61 using namespace WTF; |
| 65 using namespace Unicode; | 62 using namespace Unicode; |
| 66 | 63 |
| 67 PopupListBox::PopupListBox(PopupMenuClient* client, const PopupContainerSettings
& settings) | 64 PopupListBox::PopupListBox(PopupMenuClient* client, const PopupContainerSettings
& settings) |
| 68 : m_settings(settings) | 65 : m_settings(settings) |
| 69 , m_originalIndex(0) | 66 , m_originalIndex(0) |
| 70 , m_selectedIndex(0) | 67 , m_selectedIndex(0) |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 case VKEY_NEXT: | 166 case VKEY_NEXT: |
| 170 case VKEY_HOME: | 167 case VKEY_HOME: |
| 171 case VKEY_END: | 168 case VKEY_END: |
| 172 case VKEY_TAB: | 169 case VKEY_TAB: |
| 173 return true; | 170 return true; |
| 174 default: | 171 default: |
| 175 return false; | 172 return false; |
| 176 } | 173 } |
| 177 } | 174 } |
| 178 | 175 |
| 179 #if ENABLE(TOUCH_EVENTS) | |
| 180 bool PopupListBox::handleTouchEvent(const PlatformTouchEvent&) | 176 bool PopupListBox::handleTouchEvent(const PlatformTouchEvent&) |
| 181 { | 177 { |
| 182 return false; | 178 return false; |
| 183 } | 179 } |
| 184 #endif | |
| 185 | 180 |
| 186 bool PopupListBox::handleGestureEvent(const PlatformGestureEvent&) | 181 bool PopupListBox::handleGestureEvent(const PlatformGestureEvent&) |
| 187 { | 182 { |
| 188 return false; | 183 return false; |
| 189 } | 184 } |
| 190 | 185 |
| 191 static bool isCharacterTypeEvent(const PlatformKeyboardEvent& event) | 186 static bool isCharacterTypeEvent(const PlatformKeyboardEvent& event) |
| 192 { | 187 { |
| 193 // Check whether the event is a character-typed event or not. | 188 // Check whether the event is a character-typed event or not. |
| 194 // We use RawKeyDown/Char/KeyUp event scheme on all platforms, | 189 // We use RawKeyDown/Char/KeyUp event scheme on all platforms, |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 { | 909 { |
| 915 return numItems() && IntRect(0, 0, width(), height()).contains(point); | 910 return numItems() && IntRect(0, 0, width(), height()).contains(point); |
| 916 } | 911 } |
| 917 | 912 |
| 918 int PopupListBox::popupContentHeight() const | 913 int PopupListBox::popupContentHeight() const |
| 919 { | 914 { |
| 920 return height(); | 915 return height(); |
| 921 } | 916 } |
| 922 | 917 |
| 923 } // namespace WebCore | 918 } // namespace WebCore |
| OLD | NEW |