OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
10 * | 10 * |
(...skipping 11 matching lines...) Expand all Loading... |
22 * along with this library; see the file COPYING.LIB. If not, write to | 22 * along with this library; see the file COPYING.LIB. If not, write to |
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
25 * | 25 * |
26 */ | 26 */ |
27 | 27 |
28 #include "config.h" | 28 #include "config.h" |
29 #include "core/html/TypeAhead.h" | 29 #include "core/html/TypeAhead.h" |
30 | 30 |
31 #include "core/dom/KeyboardEvent.h" | 31 #include "core/dom/KeyboardEvent.h" |
32 #include <wtf/unicode/CharacterNames.h> | 32 #include "wtf/unicode/CharacterNames.h" |
33 #include <wtf/unicode/Unicode.h> | |
34 | 33 |
35 using namespace WTF::Unicode; | 34 using namespace WTF::Unicode; |
36 | 35 |
37 namespace WebCore { | 36 namespace WebCore { |
38 | 37 |
39 TypeAhead::TypeAhead(TypeAheadDataSource* dataSource) | 38 TypeAhead::TypeAhead(TypeAheadDataSource* dataSource) |
40 : m_dataSource(dataSource) | 39 : m_dataSource(dataSource) |
41 , m_lastTypeTime(0) | 40 , m_lastTypeTime(0) |
42 , m_repeatingChar(0) | 41 , m_repeatingChar(0) |
43 { | 42 { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 if (matchMode & MatchIndex) { | 112 if (matchMode & MatchIndex) { |
114 bool ok = false; | 113 bool ok = false; |
115 int index = m_buffer.toString().toInt(&ok); | 114 int index = m_buffer.toString().toInt(&ok); |
116 if (index > 0 && index <= optionCount) | 115 if (index > 0 && index <= optionCount) |
117 return index - 1; | 116 return index - 1; |
118 } | 117 } |
119 return -1; | 118 return -1; |
120 } | 119 } |
121 | 120 |
122 } // namespace WebCore | 121 } // namespace WebCore |
OLD | NEW |