| 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |