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

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

Issue 2457523003: Support 'insertReplacementText' for spellcheck (Closed)
Patch Set: dtapuska's comment addressed Created 4 years, 1 month 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 } 970 }
971 971
972 void WebLocalFrameImpl::replaceSelection(const WebString& text) { 972 void WebLocalFrameImpl::replaceSelection(const WebString& text) {
973 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 973 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
974 // needs to be audited. See http://crbug.com/590369 for more details. 974 // needs to be audited. See http://crbug.com/590369 for more details.
975 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 975 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
976 976
977 bool selectReplacement = 977 bool selectReplacement =
978 frame()->editor().behavior().shouldSelectReplacement(); 978 frame()->editor().behavior().shouldSelectReplacement();
979 bool smartReplace = true; 979 bool smartReplace = true;
980 frame()->editor().replaceSelectionWithText(text, selectReplacement, 980 frame()->editor().replaceSelectionWithText(
981 smartReplace); 981 text, selectReplacement, smartReplace,
982 InputEvent::InputType::InsertReplacementText);
982 } 983 }
983 984
984 void WebLocalFrameImpl::setMarkedText(const WebString& text, 985 void WebLocalFrameImpl::setMarkedText(const WebString& text,
985 unsigned location, 986 unsigned location,
986 unsigned length) { 987 unsigned length) {
987 Vector<CompositionUnderline> decorations; 988 Vector<CompositionUnderline> decorations;
988 frame()->inputMethodController().setComposition(text, decorations, location, 989 frame()->inputMethodController().setComposition(text, decorations, location,
989 length); 990 length);
990 } 991 }
991 992
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2401 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2401 } else if (metric == "wasAlternateProtocolAvailable") { 2402 } else if (metric == "wasAlternateProtocolAvailable") {
2402 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2403 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2403 } else if (metric == "connectionInfo") { 2404 } else if (metric == "connectionInfo") {
2404 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2405 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2405 } 2406 }
2406 UseCounter::count(frame(), feature); 2407 UseCounter::count(frame(), feature);
2407 } 2408 }
2408 2409
2409 } // namespace blink 2410 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698