Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Side by Side Diff: Source/core/platform/chromium/PopupListBox.cpp

Issue 14280004: Revert removal of events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/platform/chromium/PopupListBox.h ('k') | Source/core/rendering/RenderTheme.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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"
45 #include "PlatformWheelEvent.h" 44 #include "PlatformWheelEvent.h"
46 #include "PopupContainer.h" 45 #include "PopupContainer.h"
47 #include "PopupMenuChromium.h" 46 #include "PopupMenuChromium.h"
48 #include "PopupMenuClient.h" 47 #include "PopupMenuClient.h"
49 #include "RenderTheme.h" 48 #include "RenderTheme.h"
50 #include "RuntimeEnabledFeatures.h" 49 #include "RuntimeEnabledFeatures.h"
51 #include "ScrollbarTheme.h" 50 #include "ScrollbarTheme.h"
52 #include "StringTruncator.h" 51 #include "StringTruncator.h"
53 #include "TextRun.h" 52 #include "TextRun.h"
54 #include <ctype.h> 53 #include <ctype.h>
55 #include <limits> 54 #include <limits>
56 #include <wtf/CurrentTime.h> 55 #include <wtf/CurrentTime.h>
57 56
57 #if ENABLE(TOUCH_EVENTS)
58 #include "PlatformTouchEvent.h"
59 #endif
60
58 namespace WebCore { 61 namespace WebCore {
59 62
60 using namespace std; 63 using namespace std;
61 using namespace WTF; 64 using namespace WTF;
62 using namespace Unicode; 65 using namespace Unicode;
63 66
64 PopupListBox::PopupListBox(PopupMenuClient* client, const PopupContainerSettings & settings) 67 PopupListBox::PopupListBox(PopupMenuClient* client, const PopupContainerSettings & settings)
65 : m_settings(settings) 68 : m_settings(settings)
66 , m_originalIndex(0) 69 , m_originalIndex(0)
67 , m_selectedIndex(0) 70 , m_selectedIndex(0)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 case VKEY_NEXT: 169 case VKEY_NEXT:
167 case VKEY_HOME: 170 case VKEY_HOME:
168 case VKEY_END: 171 case VKEY_END:
169 case VKEY_TAB: 172 case VKEY_TAB:
170 return true; 173 return true;
171 default: 174 default:
172 return false; 175 return false;
173 } 176 }
174 } 177 }
175 178
179 #if ENABLE(TOUCH_EVENTS)
176 bool PopupListBox::handleTouchEvent(const PlatformTouchEvent&) 180 bool PopupListBox::handleTouchEvent(const PlatformTouchEvent&)
177 { 181 {
178 return false; 182 return false;
179 } 183 }
184 #endif
180 185
181 bool PopupListBox::handleGestureEvent(const PlatformGestureEvent&) 186 bool PopupListBox::handleGestureEvent(const PlatformGestureEvent&)
182 { 187 {
183 return false; 188 return false;
184 } 189 }
185 190
186 static bool isCharacterTypeEvent(const PlatformKeyboardEvent& event) 191 static bool isCharacterTypeEvent(const PlatformKeyboardEvent& event)
187 { 192 {
188 // Check whether the event is a character-typed event or not. 193 // Check whether the event is a character-typed event or not.
189 // We use RawKeyDown/Char/KeyUp event scheme on all platforms, 194 // We use RawKeyDown/Char/KeyUp event scheme on all platforms,
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 { 914 {
910 return numItems() && IntRect(0, 0, width(), height()).contains(point); 915 return numItems() && IntRect(0, 0, width(), height()).contains(point);
911 } 916 }
912 917
913 int PopupListBox::popupContentHeight() const 918 int PopupListBox::popupContentHeight() const
914 { 919 {
915 return height(); 920 return height();
916 } 921 }
917 922
918 } // namespace WebCore 923 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/chromium/PopupListBox.h ('k') | Source/core/rendering/RenderTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698