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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2457523003: Support 'insertReplacementText' for spellcheck (Closed)
Patch Set: yosin@ comment#57 #58 addressed Created 4 years 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 } 971 }
972 972
973 void WebLocalFrameImpl::replaceSelection(const WebString& text) { 973 void WebLocalFrameImpl::replaceSelection(const WebString& text) {
974 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 974 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
975 // needs to be audited. See http://crbug.com/590369 for more details. 975 // needs to be audited. See http://crbug.com/590369 for more details.
976 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 976 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
977 977
978 bool selectReplacement = 978 bool selectReplacement =
979 frame()->editor().behavior().shouldSelectReplacement(); 979 frame()->editor().behavior().shouldSelectReplacement();
980 bool smartReplace = true; 980 bool smartReplace = true;
981 frame()->editor().replaceSelectionWithText(text, selectReplacement, 981 frame()->editor().replaceSelectionWithText(
982 smartReplace); 982 text, selectReplacement, smartReplace,
983 InputEvent::InputType::InsertReplacementText);
983 } 984 }
984 985
985 void WebLocalFrameImpl::setMarkedText(const WebString& text, 986 void WebLocalFrameImpl::setMarkedText(const WebString& text,
986 unsigned location, 987 unsigned location,
987 unsigned length) { 988 unsigned length) {
988 Vector<CompositionUnderline> decorations; 989 Vector<CompositionUnderline> decorations;
989 frame()->inputMethodController().setComposition(text, decorations, location, 990 frame()->inputMethodController().setComposition(text, decorations, location,
990 length); 991 length);
991 } 992 }
992 993
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2379 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2379 } 2380 }
2380 UseCounter::count(frame(), feature); 2381 UseCounter::count(frame(), feature);
2381 } 2382 }
2382 2383
2383 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { 2384 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const {
2384 return m_inputMethodController.get(); 2385 return m_inputMethodController.get();
2385 } 2386 }
2386 2387
2387 } // namespace blink 2388 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/InputEvent.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698