OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005 Apple Computer, 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // compute the style at the start of the selection after deletion (see the | 277 // compute the style at the start of the selection after deletion (see the |
278 // early return in calculateTypingStyleAfterDelete). | 278 // early return in calculateTypingStyleAfterDelete). |
279 if (m_upstreamStart.deprecatedNode() == m_downstreamEnd.deprecatedNode() &&
m_upstreamStart.deprecatedNode()->isTextNode()) | 279 if (m_upstreamStart.deprecatedNode() == m_downstreamEnd.deprecatedNode() &&
m_upstreamStart.deprecatedNode()->isTextNode()) |
280 return; | 280 return; |
281 | 281 |
282 if (shouldNotInheritStyleFrom(*m_selectionToDelete.start().anchorNode())) | 282 if (shouldNotInheritStyleFrom(*m_selectionToDelete.start().anchorNode())) |
283 return; | 283 return; |
284 | 284 |
285 // Figure out the typing style in effect before the delete is done. | 285 // Figure out the typing style in effect before the delete is done. |
286 m_typingStyle = EditingStyle::create(m_selectionToDelete.start(), EditingSty
le::EditingPropertiesInEffect); | 286 m_typingStyle = EditingStyle::create(m_selectionToDelete.start(), EditingSty
le::EditingPropertiesInEffect); |
287 m_typingStyle->removeStyleAddedByNode(enclosingAnchorElement(m_selectionToDe
lete.start())); | 287 m_typingStyle->removeStyleAddedByElement(enclosingAnchorElement(m_selectionT
oDelete.start())); |
288 | 288 |
289 // If we're deleting into a Mail blockquote, save the style at end() instead
of start() | 289 // If we're deleting into a Mail blockquote, save the style at end() instead
of start() |
290 // We'll use this later in computeTypingStyleAfterDelete if we end up outsid
e of a Mail blockquote | 290 // We'll use this later in computeTypingStyleAfterDelete if we end up outsid
e of a Mail blockquote |
291 if (enclosingNodeOfType(m_selectionToDelete.start(), isMailBlockquote)) | 291 if (enclosingNodeOfType(m_selectionToDelete.start(), isMailBlockquote)) |
292 m_deleteIntoBlockquoteStyle = EditingStyle::create(m_selectionToDelete.e
nd()); | 292 m_deleteIntoBlockquoteStyle = EditingStyle::create(m_selectionToDelete.e
nd()); |
293 else | 293 else |
294 m_deleteIntoBlockquoteStyle = nullptr; | 294 m_deleteIntoBlockquoteStyle = nullptr; |
295 } | 295 } |
296 | 296 |
297 bool DeleteSelectionCommand::handleSpecialCaseBRDelete() | 297 bool DeleteSelectionCommand::handleSpecialCaseBRDelete() |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 visitor->trace(m_deleteIntoBlockquoteStyle); | 885 visitor->trace(m_deleteIntoBlockquoteStyle); |
886 visitor->trace(m_startRoot); | 886 visitor->trace(m_startRoot); |
887 visitor->trace(m_endRoot); | 887 visitor->trace(m_endRoot); |
888 visitor->trace(m_startTableRow); | 888 visitor->trace(m_startTableRow); |
889 visitor->trace(m_endTableRow); | 889 visitor->trace(m_endTableRow); |
890 visitor->trace(m_temporaryPlaceholder); | 890 visitor->trace(m_temporaryPlaceholder); |
891 CompositeEditCommand::trace(visitor); | 891 CompositeEditCommand::trace(visitor); |
892 } | 892 } |
893 | 893 |
894 } // namespace blink | 894 } // namespace blink |
OLD | NEW |