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