| 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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 void WebLocalFrameImpl::replaceSelection(const WebString& text) | 939 void WebLocalFrameImpl::replaceSelection(const WebString& text) |
| 940 { | 940 { |
| 941 bool selectReplacement = frame()->editor().behavior().shouldSelectReplacemen
t(); | 941 bool selectReplacement = frame()->editor().behavior().shouldSelectReplacemen
t(); |
| 942 bool smartReplace = true; | 942 bool smartReplace = true; |
| 943 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); | 943 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); |
| 944 } | 944 } |
| 945 | 945 |
| 946 void WebLocalFrameImpl::insertText(const WebString& text) | 946 void WebLocalFrameImpl::insertText(const WebString& text) |
| 947 { | 947 { |
| 948 if (frame()->inputMethodController().hasComposition()) | 948 if (frame()->inputMethodController().hasComposition()) |
| 949 frame()->inputMethodController().confirmComposition(text); | 949 frame()->inputMethodController().replaceComposition(text); |
| 950 else | 950 else |
| 951 frame()->editor().insertText(text, 0); | 951 frame()->editor().insertText(text, 0); |
| 952 } | 952 } |
| 953 | 953 |
| 954 void WebLocalFrameImpl::setMarkedText(const WebString& text, unsigned location,
unsigned length) | 954 void WebLocalFrameImpl::setMarkedText(const WebString& text, unsigned location,
unsigned length) |
| 955 { | 955 { |
| 956 Vector<CompositionUnderline> decorations; | 956 Vector<CompositionUnderline> decorations; |
| 957 frame()->inputMethodController().setComposition(text, decorations, location,
length); | 957 frame()->inputMethodController().setComposition(text, decorations, location,
length); |
| 958 } | 958 } |
| 959 | 959 |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2195 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2196 } else if (metric == "wasAlternateProtocolAvailable") { | 2196 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2197 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2197 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2198 } else if (metric == "connectionInfo") { | 2198 } else if (metric == "connectionInfo") { |
| 2199 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2199 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2200 } | 2200 } |
| 2201 UseCounter::count(frame(), feature); | 2201 UseCounter::count(frame(), feature); |
| 2202 } | 2202 } |
| 2203 | 2203 |
| 2204 } // namespace blink | 2204 } // namespace blink |
| OLD | NEW |