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

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

Issue 12093068: Adding missing UpdateTextInputState calls after each ime event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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 | Annotate | Revision Log
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 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 } 1443 }
1444 1444
1445 void RenderViewImpl::OnUnselect() { 1445 void RenderViewImpl::OnUnselect() {
1446 if (!webview()) 1446 if (!webview())
1447 return; 1447 return;
1448 1448
1449 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Unselect")); 1449 webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Unselect"));
1450 } 1450 }
1451 1451
1452 void RenderViewImpl::OnSetEditableSelectionOffsets(int start, int end) { 1452 void RenderViewImpl::OnSetEditableSelectionOffsets(int start, int end) {
1453 DCHECK(!handling_ime_event_);
1454 handling_ime_event_ = true;
1453 webview()->setEditableSelectionOffsets(start, end); 1455 webview()->setEditableSelectionOffsets(start, end);
1456 handling_ime_event_ = false;
1457 UpdateTextInputState(DO_NOT_SHOW_IME);
1454 } 1458 }
1455 1459
1456 void RenderViewImpl::OnSetCompositionFromExistingText( 1460 void RenderViewImpl::OnSetCompositionFromExistingText(
1457 int start, int end, 1461 int start, int end,
1458 const std::vector<WebKit::WebCompositionUnderline>& underlines) { 1462 const std::vector<WebKit::WebCompositionUnderline>& underlines) {
1459 if (!webview()) 1463 if (!webview())
1460 return; 1464 return;
1465 DCHECK(!handling_ime_event_);
1466 handling_ime_event_ = true;
1461 webview()->setCompositionFromExistingText(start, end, underlines); 1467 webview()->setCompositionFromExistingText(start, end, underlines);
1468 handling_ime_event_ = false;
1469 UpdateTextInputState(DO_NOT_SHOW_IME);
1462 } 1470 }
1463 1471
1464 void RenderViewImpl::OnExtendSelectionAndDelete(int before, int after) { 1472 void RenderViewImpl::OnExtendSelectionAndDelete(int before, int after) {
1465 if (!webview()) 1473 if (!webview())
1466 return; 1474 return;
1475 DCHECK(!handling_ime_event_);
1476 handling_ime_event_ = true;
1467 webview()->extendSelectionAndDelete(before, after); 1477 webview()->extendSelectionAndDelete(before, after);
1478 handling_ime_event_ = false;
1479 UpdateTextInputState(DO_NOT_SHOW_IME);
1468 } 1480 }
1469 1481
1470 void RenderViewImpl::OnSelectRange(const gfx::Point& start, 1482 void RenderViewImpl::OnSelectRange(const gfx::Point& start,
1471 const gfx::Point& end) { 1483 const gfx::Point& end) {
1472 if (!webview()) 1484 if (!webview())
1473 return; 1485 return;
1474 1486
1475 Send(new ViewHostMsg_SelectRange_ACK(routing_id_)); 1487 Send(new ViewHostMsg_SelectRange_ACK(routing_id_));
1476 1488
1477 handling_select_range_ = true; 1489 handling_select_range_ = true;
(...skipping 5140 matching lines...) Expand 10 before | Expand all | Expand 10 after
6618 } 6630 }
6619 #endif 6631 #endif
6620 6632
6621 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6633 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6622 TransportDIB::Handle dib_handle) { 6634 TransportDIB::Handle dib_handle) {
6623 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6635 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6624 RenderProcess::current()->ReleaseTransportDIB(dib); 6636 RenderProcess::current()->ReleaseTransportDIB(dib);
6625 } 6637 }
6626 6638
6627 } // namespace content 6639 } // namespace content
OLDNEW
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ImeTest.java ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698