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

Side by Side Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 10807082: Add RenderText DirectionalityMode enum and support; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove errant blank line. Created 8 years, 4 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 | « ui/ui.gyp ('k') | ui/views/controls/textfield/textfield_views_model.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/i18n/case_conversion.h" 12 #include "base/i18n/case_conversion.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "grit/app_locale_settings.h" 16 #include "grit/app_locale_settings.h"
17 #include "grit/ui_strings.h" 17 #include "grit/ui_strings.h"
18 #include "third_party/skia/include/core/SkColor.h" 18 #include "third_party/skia/include/core/SkColor.h"
19 #include "ui/base/clipboard/clipboard.h" 19 #include "ui/base/clipboard/clipboard.h"
20 #include "ui/base/dragdrop/drag_drop_types.h" 20 #include "ui/base/dragdrop/drag_drop_types.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/base/range/range.h" 22 #include "ui/base/range/range.h"
23 #include "ui/compositor/layer.h" 23 #include "ui/compositor/layer.h"
24 #include "ui/gfx/canvas.h" 24 #include "ui/gfx/canvas.h"
25 #include "ui/gfx/insets.h" 25 #include "ui/gfx/insets.h"
26 #include "ui/gfx/render_text.h" 26 #include "ui/gfx/render_text.h"
27 #include "ui/gfx/text_constants.h"
27 #include "ui/views/background.h" 28 #include "ui/views/background.h"
28 #include "ui/views/border.h" 29 #include "ui/views/border.h"
29 #include "ui/views/controls/focusable_border.h" 30 #include "ui/views/controls/focusable_border.h"
30 #include "ui/views/controls/menu/menu_item_view.h" 31 #include "ui/views/controls/menu/menu_item_view.h"
31 #include "ui/views/controls/menu/menu_model_adapter.h" 32 #include "ui/views/controls/menu/menu_model_adapter.h"
32 #include "ui/views/controls/menu/menu_runner.h" 33 #include "ui/views/controls/menu/menu_runner.h"
33 #include "ui/views/controls/textfield/textfield.h" 34 #include "ui/views/controls/textfield/textfield.h"
34 #include "ui/views/controls/textfield/textfield_controller.h" 35 #include "ui/views/controls/textfield/textfield_controller.h"
35 #include "ui/views/controls/textfield/textfield_views_model.h" 36 #include "ui/views/controls/textfield/textfield_views_model.h"
36 #include "ui/views/events/event.h" 37 #include "ui/views/events/event.h"
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 // Filter out all control characters, including tab and new line characters, 1221 // Filter out all control characters, including tab and new line characters,
1221 // and all characters with Alt modifier. But we need to allow characters with 1222 // and all characters with Alt modifier. But we need to allow characters with
1222 // AltGr modifier. 1223 // AltGr modifier.
1223 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different 1224 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different
1224 // flag that we don't care about. 1225 // flag that we don't care about.
1225 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) && 1226 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) &&
1226 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN; 1227 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN;
1227 } 1228 }
1228 1229
1229 } // namespace views 1230 } // namespace views
OLDNEW
« no previous file with comments | « ui/ui.gyp ('k') | ui/views/controls/textfield/textfield_views_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698