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