| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 m_node(node), | 41 m_node(node), |
| 42 m_offset(offset), | 42 m_offset(offset), |
| 43 m_text(text) { | 43 m_text(text) { |
| 44 DCHECK(m_node); | 44 DCHECK(m_node); |
| 45 DCHECK_LE(m_offset, m_node->length()); | 45 DCHECK_LE(m_offset, m_node->length()); |
| 46 DCHECK(!m_text.isEmpty()); | 46 DCHECK(!m_text.isEmpty()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void InsertIntoTextNodeCommand::doApply(EditingState*) { | 49 void InsertIntoTextNodeCommand::doApply(EditingState*) { |
| 50 bool passwordEchoEnabled = | 50 bool passwordEchoEnabled = |
| 51 document().settings() && document().settings()->passwordEchoEnabled(); | 51 document().settings() && document().settings()->getPasswordEchoEnabled(); |
| 52 if (passwordEchoEnabled) | 52 if (passwordEchoEnabled) |
| 53 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 53 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 54 | 54 |
| 55 if (!hasEditableStyle(*m_node)) | 55 if (!hasEditableStyle(*m_node)) |
| 56 return; | 56 return; |
| 57 | 57 |
| 58 if (passwordEchoEnabled) { | 58 if (passwordEchoEnabled) { |
| 59 LayoutText* layoutText = m_node->layoutObject(); | 59 LayoutText* layoutText = m_node->layoutObject(); |
| 60 if (layoutText && layoutText->isSecure()) | 60 if (layoutText && layoutText->isSecure()) |
| 61 layoutText->momentarilyRevealLastTypedCharacter(m_offset + | 61 layoutText->momentarilyRevealLastTypedCharacter(m_offset + |
| (...skipping 11 matching lines...) Expand all Loading... |
| 73 m_node->deleteData(m_offset, m_text.length(), IGNORE_EXCEPTION); | 73 m_node->deleteData(m_offset, m_text.length(), IGNORE_EXCEPTION); |
| 74 document().updateStyleAndLayout(); | 74 document().updateStyleAndLayout(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 DEFINE_TRACE(InsertIntoTextNodeCommand) { | 77 DEFINE_TRACE(InsertIntoTextNodeCommand) { |
| 78 visitor->trace(m_node); | 78 visitor->trace(m_node); |
| 79 SimpleEditCommand::trace(visitor); | 79 SimpleEditCommand::trace(visitor); |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| OLD | NEW |