Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 966 } | 966 } |
| 967 | 967 |
| 968 void WebLocalFrameImpl::replaceSelection(const WebString& text) { | 968 void WebLocalFrameImpl::replaceSelection(const WebString& text) { |
| 969 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 969 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 970 // needs to be audited. See http://crbug.com/590369 for more details. | 970 // needs to be audited. See http://crbug.com/590369 for more details. |
| 971 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 971 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 972 | 972 |
| 973 bool selectReplacement = | 973 bool selectReplacement = |
| 974 frame()->editor().behavior().shouldSelectReplacement(); | 974 frame()->editor().behavior().shouldSelectReplacement(); |
| 975 bool smartReplace = true; | 975 bool smartReplace = true; |
| 976 frame()->editor().replaceSelectionWithText(text, selectReplacement, | 976 frame()->editor().replaceSelectionWithText( |
| 977 smartReplace); | 977 text, selectReplacement, smartReplace, |
| 978 InputEvent::InputType::InsertFromPaste); | |
|
chongz
2016/10/27 16:41:25
I cannot find the usage of this method, but we pro
| |
| 978 } | 979 } |
| 979 | 980 |
| 980 void WebLocalFrameImpl::setMarkedText(const WebString& text, | 981 void WebLocalFrameImpl::setMarkedText(const WebString& text, |
| 981 unsigned location, | 982 unsigned location, |
| 982 unsigned length) { | 983 unsigned length) { |
| 983 Vector<CompositionUnderline> decorations; | 984 Vector<CompositionUnderline> decorations; |
| 984 frame()->inputMethodController().setComposition(text, decorations, location, | 985 frame()->inputMethodController().setComposition(text, decorations, location, |
| 985 length); | 986 length); |
| 986 } | 987 } |
| 987 | 988 |
| (...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2386 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2387 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2387 } else if (metric == "wasAlternateProtocolAvailable") { | 2388 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2388 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2389 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2389 } else if (metric == "connectionInfo") { | 2390 } else if (metric == "connectionInfo") { |
| 2390 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2391 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2391 } | 2392 } |
| 2392 UseCounter::count(frame(), feature); | 2393 UseCounter::count(frame(), feature); |
| 2393 } | 2394 } |
| 2394 | 2395 |
| 2395 } // namespace blink | 2396 } // namespace blink |
| OLD | NEW |