Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2828093003: updating Input field value by script should reset IME composition. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 void RenderViewImpl::SetZoomLevel(double zoom_level) { 1579 void RenderViewImpl::SetZoomLevel(double zoom_level) {
1580 // If we change the zoom level for the view, make sure any subsequent subframe 1580 // If we change the zoom level for the view, make sure any subsequent subframe
1581 // loads reflect the current zoom level. 1581 // loads reflect the current zoom level.
1582 page_zoom_level_ = zoom_level; 1582 page_zoom_level_ = zoom_level;
1583 1583
1584 webview()->SetZoomLevel(zoom_level); 1584 webview()->SetZoomLevel(zoom_level);
1585 for (auto& observer : observers_) 1585 for (auto& observer : observers_)
1586 observer.OnZoomLevelChanged(); 1586 observer.OnZoomLevelChanged();
1587 } 1587 }
1588 1588
1589 void RenderViewImpl::DidCancelCompositionOnSelectionChange() {
1590 Send(new InputHostMsg_ImeCancelComposition(GetRoutingID()));
1591 }
1592
1589 void RenderViewImpl::SetValidationMessageDirection( 1593 void RenderViewImpl::SetValidationMessageDirection(
1590 base::string16* wrapped_main_text, 1594 base::string16* wrapped_main_text,
1591 blink::WebTextDirection main_text_hint, 1595 blink::WebTextDirection main_text_hint,
1592 base::string16* wrapped_sub_text, 1596 base::string16* wrapped_sub_text,
1593 blink::WebTextDirection sub_text_hint) { 1597 blink::WebTextDirection sub_text_hint) {
1594 if (main_text_hint == blink::kWebTextDirectionLeftToRight) { 1598 if (main_text_hint == blink::kWebTextDirectionLeftToRight) {
1595 *wrapped_main_text = 1599 *wrapped_main_text =
1596 base::i18n::GetDisplayStringInLTRDirectionality(*wrapped_main_text); 1600 base::i18n::GetDisplayStringInLTRDirectionality(*wrapped_main_text);
1597 } else if (main_text_hint == blink::kWebTextDirectionRightToLeft && 1601 } else if (main_text_hint == blink::kWebTextDirectionRightToLeft &&
1598 !base::i18n::IsRTL()) { 1602 !base::i18n::IsRTL()) {
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2678 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2675 } 2679 }
2676 2680
2677 std::unique_ptr<InputEventAck> ack(new InputEventAck( 2681 std::unique_ptr<InputEventAck> ack(new InputEventAck(
2678 InputEventAckSource::MAIN_THREAD, input_event->GetType(), 2682 InputEventAckSource::MAIN_THREAD, input_event->GetType(),
2679 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2683 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2680 OnInputEventAck(std::move(ack)); 2684 OnInputEventAck(std::move(ack));
2681 } 2685 }
2682 2686
2683 } // namespace content 2687 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698