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

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

Issue 2457523003: Support 'insertReplacementText' for spellcheck (Closed)
Patch Set: fix for nit from Yosi_UTC9, Xiaocheng 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 } 969 }
970 970
971 void WebLocalFrameImpl::replaceSelection(const WebString& text) { 971 void WebLocalFrameImpl::replaceSelection(const WebString& text) {
972 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 972 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
973 // needs to be audited. See http://crbug.com/590369 for more details. 973 // needs to be audited. See http://crbug.com/590369 for more details.
974 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 974 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
975 975
976 bool selectReplacement = 976 bool selectReplacement =
977 frame()->editor().behavior().shouldSelectReplacement(); 977 frame()->editor().behavior().shouldSelectReplacement();
978 bool smartReplace = true; 978 bool smartReplace = true;
979 frame()->editor().replaceSelectionWithText(text, selectReplacement, 979 frame()->editor().replaceSelectionWithText(
980 smartReplace); 980 text, selectReplacement, smartReplace,
981 InputEvent::InputType::InsertReplacementText);
981 } 982 }
982 983
983 void WebLocalFrameImpl::setMarkedText(const WebString& text, 984 void WebLocalFrameImpl::setMarkedText(const WebString& text,
984 unsigned location, 985 unsigned location,
985 unsigned length) { 986 unsigned length) {
986 Vector<CompositionUnderline> decorations; 987 Vector<CompositionUnderline> decorations;
987 frame()->inputMethodController().setComposition(text, decorations, location, 988 frame()->inputMethodController().setComposition(text, decorations, location,
988 length); 989 length);
989 } 990 }
990 991
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2392 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2392 } else if (metric == "wasAlternateProtocolAvailable") { 2393 } else if (metric == "wasAlternateProtocolAvailable") {
2393 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2394 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2394 } else if (metric == "connectionInfo") { 2395 } else if (metric == "connectionInfo") {
2395 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2396 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2396 } 2397 }
2397 UseCounter::count(frame(), feature); 2398 UseCounter::count(frame(), feature);
2398 } 2399 }
2399 2400
2400 } // namespace blink 2401 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698