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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 #include "core/dom/MessagePort.h" | 105 #include "core/dom/MessagePort.h" |
| 106 #include "core/dom/Node.h" | 106 #include "core/dom/Node.h" |
| 107 #include "core/dom/NodeTraversal.h" | 107 #include "core/dom/NodeTraversal.h" |
| 108 #include "core/dom/shadow/ShadowRoot.h" | 108 #include "core/dom/shadow/ShadowRoot.h" |
| 109 #include "core/editing/EditingUtilities.h" | 109 #include "core/editing/EditingUtilities.h" |
| 110 #include "core/editing/Editor.h" | 110 #include "core/editing/Editor.h" |
| 111 #include "core/editing/FrameSelection.h" | 111 #include "core/editing/FrameSelection.h" |
| 112 #include "core/editing/InputMethodController.h" | 112 #include "core/editing/InputMethodController.h" |
| 113 #include "core/editing/PlainTextRange.h" | 113 #include "core/editing/PlainTextRange.h" |
| 114 #include "core/editing/TextAffinity.h" | 114 #include "core/editing/TextAffinity.h" |
| 115 #include "core/editing/commands/CompositeEditCommand.h" | |
|
Xiaocheng
2016/12/14 05:13:15
Besides, ideally we would like not to make anythin
chongz
2016/12/15 00:53:33
Changed |CommandSource| to be a default parameter
| |
| 115 #include "core/editing/iterators/TextIterator.h" | 116 #include "core/editing/iterators/TextIterator.h" |
| 116 #include "core/editing/serializers/Serialization.h" | 117 #include "core/editing/serializers/Serialization.h" |
| 117 #include "core/editing/spellcheck/SpellChecker.h" | 118 #include "core/editing/spellcheck/SpellChecker.h" |
| 118 #include "core/fetch/ResourceFetcher.h" | 119 #include "core/fetch/ResourceFetcher.h" |
| 119 #include "core/fetch/SubstituteData.h" | 120 #include "core/fetch/SubstituteData.h" |
| 120 #include "core/frame/FrameHost.h" | 121 #include "core/frame/FrameHost.h" |
| 121 #include "core/frame/FrameView.h" | 122 #include "core/frame/FrameView.h" |
| 122 #include "core/frame/LocalDOMWindow.h" | 123 #include "core/frame/LocalDOMWindow.h" |
| 123 #include "core/frame/PageScaleConstraintsSet.h" | 124 #include "core/frame/PageScaleConstraintsSet.h" |
| 124 #include "core/frame/RemoteFrame.h" | 125 #include "core/frame/RemoteFrame.h" |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 945 | 946 |
| 946 void WebLocalFrameImpl::replaceSelection(const WebString& text) { | 947 void WebLocalFrameImpl::replaceSelection(const WebString& text) { |
| 947 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 948 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 948 // 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. |
| 949 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 950 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 950 | 951 |
| 951 bool selectReplacement = | 952 bool selectReplacement = |
| 952 frame()->editor().behavior().shouldSelectReplacement(); | 953 frame()->editor().behavior().shouldSelectReplacement(); |
| 953 bool smartReplace = true; | 954 bool smartReplace = true; |
| 954 frame()->editor().replaceSelectionWithText( | 955 frame()->editor().replaceSelectionWithText( |
| 955 text, selectReplacement, smartReplace, | 956 blink::CommandSource::MenuOrKeyBinding, text, selectReplacement, |
| 956 InputEvent::InputType::InsertReplacementText); | 957 smartReplace, InputEvent::InputType::InsertReplacementText); |
| 957 } | 958 } |
| 958 | 959 |
| 959 void WebLocalFrameImpl::setMarkedText(const WebString& text, | 960 void WebLocalFrameImpl::setMarkedText(const WebString& text, |
| 960 unsigned location, | 961 unsigned location, |
| 961 unsigned length) { | 962 unsigned length) { |
| 962 Vector<CompositionUnderline> decorations; | 963 Vector<CompositionUnderline> decorations; |
| 963 frame()->inputMethodController().setComposition(text, decorations, location, | 964 frame()->inputMethodController().setComposition(text, decorations, location, |
| 964 length); | 965 length); |
| 965 } | 966 } |
| 966 | 967 |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2335 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2336 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2336 } | 2337 } |
| 2337 UseCounter::count(frame(), feature); | 2338 UseCounter::count(frame(), feature); |
| 2338 } | 2339 } |
| 2339 | 2340 |
| 2340 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { | 2341 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { |
| 2341 return m_inputMethodController.get(); | 2342 return m_inputMethodController.get(); |
| 2342 } | 2343 } |
| 2343 | 2344 |
| 2344 } // namespace blink | 2345 } // namespace blink |
| OLD | NEW |