Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 768 compositionEphemeralRange(), | 768 compositionEphemeralRange(), |
| 769 TextIteratorBehavior::Builder().setEmitsOriginalText(true).build()); | 769 TextIteratorBehavior::Builder().setEmitsOriginalText(true).build()); |
| 770 } | 770 } |
| 771 | 771 |
| 772 PlainTextRange InputMethodController::getSelectionOffsets() const { | 772 PlainTextRange InputMethodController::getSelectionOffsets() const { |
| 773 EphemeralRange range = firstEphemeralRangeOf( | 773 EphemeralRange range = firstEphemeralRangeOf( |
| 774 frame().selection().computeVisibleSelectionInDOMTreeDeprecated()); | 774 frame().selection().computeVisibleSelectionInDOMTreeDeprecated()); |
| 775 if (range.isNull()) | 775 if (range.isNull()) |
| 776 return PlainTextRange(); | 776 return PlainTextRange(); |
| 777 ContainerNode* const editable = rootEditableElementOrTreeScopeRootNodeOf( | 777 ContainerNode* const editable = rootEditableElementOrTreeScopeRootNodeOf( |
| 778 frame().selection().computeVisibleSelectionInDOMTreeDeprecated()); | 778 frame().selection().computeVisibleSelectionInDOMTree().base()); |
|
yosin_UTC9
2017/03/09 07:00:13
L774 calls computeVisibleSelectionInDOMTreeDepreca
| |
| 779 DCHECK(editable); | 779 DCHECK(editable); |
| 780 return PlainTextRange::create(*editable, range); | 780 return PlainTextRange::create(*editable, range); |
| 781 } | 781 } |
| 782 | 782 |
| 783 EphemeralRange InputMethodController::ephemeralRangeForOffsets( | 783 EphemeralRange InputMethodController::ephemeralRangeForOffsets( |
| 784 const PlainTextRange& offsets) const { | 784 const PlainTextRange& offsets) const { |
| 785 if (offsets.isNull()) | 785 if (offsets.isNull()) |
| 786 return EphemeralRange(); | 786 return EphemeralRange(); |
| 787 Element* rootEditableElement = | 787 Element* rootEditableElement = |
| 788 frame() | 788 frame() |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1242 finishComposingText(KeepSelection); | 1242 finishComposingText(KeepSelection); |
| 1243 } | 1243 } |
| 1244 | 1244 |
| 1245 DEFINE_TRACE(InputMethodController) { | 1245 DEFINE_TRACE(InputMethodController) { |
| 1246 visitor->trace(m_frame); | 1246 visitor->trace(m_frame); |
| 1247 visitor->trace(m_compositionRange); | 1247 visitor->trace(m_compositionRange); |
| 1248 SynchronousMutationObserver::trace(visitor); | 1248 SynchronousMutationObserver::trace(visitor); |
| 1249 } | 1249 } |
| 1250 | 1250 |
| 1251 } // namespace blink | 1251 } // namespace blink |
| OLD | NEW |