| 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 frame().document()->markers().addCompositionMarker(ephemeralLineRange.st
artPosition(), ephemeralLineRange.endPosition(), underline.color, underline.thic
k, underline.backgroundColor); | 421 frame().document()->markers().addCompositionMarker(ephemeralLineRange.st
artPosition(), ephemeralLineRange.endPosition(), underline.color, underline.thic
k, underline.backgroundColor); |
| 422 } | 422 } |
| 423 } | 423 } |
| 424 | 424 |
| 425 void InputMethodController::setCompositionFromExistingText(const Vector<Composit
ionUnderline>& underlines, unsigned compositionStart, unsigned compositionEnd) | 425 void InputMethodController::setCompositionFromExistingText(const Vector<Composit
ionUnderline>& underlines, unsigned compositionStart, unsigned compositionEnd) |
| 426 { | 426 { |
| 427 Element* editable = frame().selection().rootEditableElement(); | 427 Element* editable = frame().selection().rootEditableElement(); |
| 428 if (!editable) | 428 if (!editable) |
| 429 return; | 429 return; |
| 430 | 430 |
| 431 // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets n
eeds to be audited. | 431 DCHECK(!editable->document().needsLayoutTreeUpdate()); |
| 432 // see http://crbug.com/590369 for more details. | |
| 433 editable->document().updateStyleAndLayoutIgnorePendingStylesheets(); | |
| 434 | 432 |
| 435 const EphemeralRange range = PlainTextRange(compositionStart, compositionEnd
).createRange(*editable); | 433 const EphemeralRange range = PlainTextRange(compositionStart, compositionEnd
).createRange(*editable); |
| 436 if (range.isNull()) | 434 if (range.isNull()) |
| 437 return; | 435 return; |
| 438 | 436 |
| 439 const Position start = range.startPosition(); | 437 const Position start = range.startPosition(); |
| 440 if (rootEditableElementOf(start) != editable) | 438 if (rootEditableElementOf(start) != editable) |
| 441 return; | 439 return; |
| 442 | 440 |
| 443 const Position end = range.endPosition(); | 441 const Position end = range.endPosition(); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 TypingCommand::deleteSelection(*frame().document()); | 578 TypingCommand::deleteSelection(*frame().document()); |
| 581 } | 579 } |
| 582 | 580 |
| 583 DEFINE_TRACE(InputMethodController) | 581 DEFINE_TRACE(InputMethodController) |
| 584 { | 582 { |
| 585 visitor->trace(m_frame); | 583 visitor->trace(m_frame); |
| 586 visitor->trace(m_compositionRange); | 584 visitor->trace(m_compositionRange); |
| 587 } | 585 } |
| 588 | 586 |
| 589 } // namespace blink | 587 } // namespace blink |
| OLD | NEW |