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

Side by Side Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2227333002: Revert of Change InputMethodController#setSelectionOffsets() to use NotUserTriggered parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/editing/InputMethodControllerTest.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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 return false; 493 return false;
494 494
495 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n eeds to be audited. 495 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n eeds to be audited.
496 // see http://crbug.com/590369 for more details. 496 // see http://crbug.com/590369 for more details.
497 rootEditableElement->document().updateStyleAndLayoutIgnorePendingStylesheets (); 497 rootEditableElement->document().updateStyleAndLayoutIgnorePendingStylesheets ();
498 498
499 const EphemeralRange range = selectionOffsets.createRange(*rootEditableEleme nt); 499 const EphemeralRange range = selectionOffsets.createRange(*rootEditableEleme nt);
500 if (range.isNull()) 500 if (range.isNull())
501 return false; 501 return false;
502 502
503 return frame().selection().setSelectedRange(range, VP_DEFAULT_AFFINITY, Sele ctionDirectionalMode::NonDirectional, NotUserTriggered); 503 return frame().selection().setSelectedRange(range, VP_DEFAULT_AFFINITY, Sele ctionDirectionalMode::NonDirectional, FrameSelection::CloseTyping);
504 } 504 }
505 505
506 bool InputMethodController::setEditableSelectionOffsets(const PlainTextRange& se lectionOffsets) 506 bool InputMethodController::setEditableSelectionOffsets(const PlainTextRange& se lectionOffsets)
507 { 507 {
508 if (!editor().canEdit()) 508 if (!editor().canEdit())
509 return false; 509 return false;
510 return setSelectionOffsets(selectionOffsets); 510 return setSelectionOffsets(selectionOffsets);
511 } 511 }
512 512
513 PlainTextRange InputMethodController::createRangeForSelection(int start, int end , size_t textLength) const 513 PlainTextRange InputMethodController::createRangeForSelection(int start, int end , size_t textLength) const
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 TypingCommand::deleteSelection(*frame().document()); 574 TypingCommand::deleteSelection(*frame().document());
575 } 575 }
576 576
577 DEFINE_TRACE(InputMethodController) 577 DEFINE_TRACE(InputMethodController)
578 { 578 {
579 visitor->trace(m_frame); 579 visitor->trace(m_frame);
580 visitor->trace(m_compositionRange); 580 visitor->trace(m_compositionRange);
581 } 581 }
582 582
583 } // namespace blink 583 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698