| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 selectComposition(); | 315 selectComposition(); |
| 316 | 316 |
| 317 if (frame().selection().isNone()) | 317 if (frame().selection().isNone()) |
| 318 return; | 318 return; |
| 319 | 319 |
| 320 Element* target = frame().document()->focusedElement(); | 320 Element* target = frame().document()->focusedElement(); |
| 321 if (!target) | 321 if (!target) |
| 322 return; | 322 return; |
| 323 | 323 |
| 324 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 325 // needs to be audited. see http://crbug.com/590369 for more details. |
| 326 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 327 |
| 324 int selectionOffsetsStart = static_cast<int>(getSelectionOffsets().start()); | 328 int selectionOffsetsStart = static_cast<int>(getSelectionOffsets().start()); |
| 325 int start = selectionOffsetsStart + selectionStart; | 329 int start = selectionOffsetsStart + selectionStart; |
| 326 int end = selectionOffsetsStart + selectionEnd; | 330 int end = selectionOffsetsStart + selectionEnd; |
| 327 PlainTextRange selectedRange = createRangeForSelection(start, end, text.leng
th()); | 331 PlainTextRange selectedRange = createRangeForSelection(start, end, text.leng
th()); |
| 328 | 332 |
| 329 // Dispatch an appropriate composition event to the focused node. | 333 // Dispatch an appropriate composition event to the focused node. |
| 330 // We check the composition status and choose an appropriate composition eve
nt since this | 334 // We check the composition status and choose an appropriate composition eve
nt since this |
| 331 // function is used for three purposes: | 335 // function is used for three purposes: |
| 332 // 1. Starting a new composition. | 336 // 1. Starting a new composition. |
| 333 // Send a compositionstart and a compositionupdate event when this functi
on creates | 337 // Send a compositionstart and a compositionupdate event when this functi
on creates |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 TypingCommand::deleteSelection(*frame().document()); | 580 TypingCommand::deleteSelection(*frame().document()); |
| 577 } | 581 } |
| 578 | 582 |
| 579 DEFINE_TRACE(InputMethodController) | 583 DEFINE_TRACE(InputMethodController) |
| 580 { | 584 { |
| 581 visitor->trace(m_frame); | 585 visitor->trace(m_frame); |
| 582 visitor->trace(m_compositionRange); | 586 visitor->trace(m_compositionRange); |
| 583 } | 587 } |
| 584 | 588 |
| 585 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |