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

Side by Side Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2938123002: Revert of [Android] Adding Smart GO/NEXT feature in Chrome (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 27 matching lines...) Expand all
38 #include "core/editing/state_machines/BackwardCodePointStateMachine.h" 38 #include "core/editing/state_machines/BackwardCodePointStateMachine.h"
39 #include "core/editing/state_machines/ForwardCodePointStateMachine.h" 39 #include "core/editing/state_machines/ForwardCodePointStateMachine.h"
40 #include "core/events/CompositionEvent.h" 40 #include "core/events/CompositionEvent.h"
41 #include "core/frame/LocalFrame.h" 41 #include "core/frame/LocalFrame.h"
42 #include "core/html/HTMLInputElement.h" 42 #include "core/html/HTMLInputElement.h"
43 #include "core/html/HTMLTextAreaElement.h" 43 #include "core/html/HTMLTextAreaElement.h"
44 #include "core/input/EventHandler.h" 44 #include "core/input/EventHandler.h"
45 #include "core/layout/LayoutObject.h" 45 #include "core/layout/LayoutObject.h"
46 #include "core/layout/LayoutTheme.h" 46 #include "core/layout/LayoutTheme.h"
47 #include "core/page/ChromeClient.h" 47 #include "core/page/ChromeClient.h"
48 #include "core/page/FocusController.h"
49 #include "core/page/Page.h"
50 48
51 namespace blink { 49 namespace blink {
52 50
53 namespace { 51 namespace {
54 52
55 void DispatchCompositionUpdateEvent(LocalFrame& frame, const String& text) { 53 void DispatchCompositionUpdateEvent(LocalFrame& frame, const String& text) {
56 Element* target = frame.GetDocument()->FocusedElement(); 54 Element* target = frame.GetDocument()->FocusedElement();
57 if (!target) 55 if (!target)
58 return; 56 return;
59 57
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 flags |= kWebTextInputFlagAutocapitalizeCharacters; 1127 flags |= kWebTextInputFlagAutocapitalizeCharacters;
1130 else if (autocapitalize == words) 1128 else if (autocapitalize == words)
1131 flags |= kWebTextInputFlagAutocapitalizeWords; 1129 flags |= kWebTextInputFlagAutocapitalizeWords;
1132 else if (autocapitalize == sentences) 1130 else if (autocapitalize == sentences)
1133 flags |= kWebTextInputFlagAutocapitalizeSentences; 1131 flags |= kWebTextInputFlagAutocapitalizeSentences;
1134 else 1132 else
1135 NOTREACHED(); 1133 NOTREACHED();
1136 } 1134 }
1137 } 1135 }
1138 1136
1139 if (GetDocument().GetPage()->GetFocusController().NextFocusableElementInForm(
1140 element, kWebFocusTypeForward))
1141 flags |= kWebTextInputFlagHaveNextFocusableElement;
1142
1143 if (GetDocument().GetPage()->GetFocusController().NextFocusableElementInForm(
1144 element, kWebFocusTypeBackward))
1145 flags |= kWebTextInputFlagHavePreviousFocusableElement;
1146
1147 return flags; 1137 return flags;
1148 } 1138 }
1149 1139
1150 WebTextInputMode InputMethodController::InputModeOfFocusedElement() const { 1140 WebTextInputMode InputMethodController::InputModeOfFocusedElement() const {
1151 if (!RuntimeEnabledFeatures::InputModeAttributeEnabled()) 1141 if (!RuntimeEnabledFeatures::InputModeAttributeEnabled())
1152 return kWebTextInputModeDefault; 1142 return kWebTextInputModeDefault;
1153 1143
1154 AtomicString mode = GetInputModeAttribute(GetDocument().FocusedElement()); 1144 AtomicString mode = GetInputModeAttribute(GetDocument().FocusedElement());
1155 1145
1156 if (mode.IsEmpty()) 1146 if (mode.IsEmpty())
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 FinishComposingText(kKeepSelection); 1238 FinishComposingText(kKeepSelection);
1249 } 1239 }
1250 1240
1251 DEFINE_TRACE(InputMethodController) { 1241 DEFINE_TRACE(InputMethodController) {
1252 visitor->Trace(frame_); 1242 visitor->Trace(frame_);
1253 visitor->Trace(composition_range_); 1243 visitor->Trace(composition_range_);
1254 SynchronousMutationObserver::Trace(visitor); 1244 SynchronousMutationObserver::Trace(visitor);
1255 } 1245 }
1256 1246
1257 } // namespace blink 1247 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/data/android/input/input_forms.html ('k') | third_party/WebKit/Source/core/page/FocusController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698