| 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |