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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 | 942 |
943 unsigned WebLocalFrameImpl::unloadListenerCount() const { | 943 unsigned WebLocalFrameImpl::unloadListenerCount() const { |
944 return frame()->domWindow()->pendingUnloadEventListeners(); | 944 return frame()->domWindow()->pendingUnloadEventListeners(); |
945 } | 945 } |
946 | 946 |
947 void WebLocalFrameImpl::replaceSelection(const WebString& text) { | 947 void WebLocalFrameImpl::replaceSelection(const WebString& text) { |
948 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 948 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
949 // needs to be audited. See http://crbug.com/590369 for more details. | 949 // needs to be audited. See http://crbug.com/590369 for more details. |
950 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 950 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
951 | 951 |
952 bool selectReplacement = | 952 frame()->editor().replaceSelection(text); |
953 frame()->editor().behavior().shouldSelectReplacement(); | |
954 bool smartReplace = true; | |
955 frame()->editor().replaceSelectionWithText( | |
956 text, selectReplacement, smartReplace, | |
957 InputEvent::InputType::InsertReplacementText); | |
958 } | 953 } |
959 | 954 |
960 void WebLocalFrameImpl::setMarkedText(const WebString& text, | 955 void WebLocalFrameImpl::setMarkedText(const WebString& text, |
961 unsigned location, | 956 unsigned location, |
962 unsigned length) { | 957 unsigned length) { |
963 Vector<CompositionUnderline> decorations; | 958 Vector<CompositionUnderline> decorations; |
964 frame()->inputMethodController().setComposition(text, decorations, location, | 959 frame()->inputMethodController().setComposition(text, decorations, location, |
965 length); | 960 length); |
966 } | 961 } |
967 | 962 |
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2357 ->frameScheduler() | 2352 ->frameScheduler() |
2358 ->unthrottledTaskRunner() | 2353 ->unthrottledTaskRunner() |
2359 ->toSingleThreadTaskRunner(); | 2354 ->toSingleThreadTaskRunner(); |
2360 } | 2355 } |
2361 | 2356 |
2362 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { | 2357 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { |
2363 return m_inputMethodController.get(); | 2358 return m_inputMethodController.get(); |
2364 } | 2359 } |
2365 | 2360 |
2366 } // namespace blink | 2361 } // namespace blink |
OLD | NEW |