| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 bool upstreamStartIsBR = nodeAfterUpstreamStart->hasTagName(brTag); | 317 bool upstreamStartIsBR = nodeAfterUpstreamStart->hasTagName(brTag); |
| 318 bool downstreamStartIsBR = nodeAfterDownstreamStart->hasTagName(brTag); | 318 bool downstreamStartIsBR = nodeAfterDownstreamStart->hasTagName(brTag); |
| 319 bool isBROnLineByItself = upstreamStartIsBR && downstreamStartIsBR && nodeAf
terDownstreamStart == nodeAfterUpstreamEnd; | 319 bool isBROnLineByItself = upstreamStartIsBR && downstreamStartIsBR && nodeAf
terDownstreamStart == nodeAfterUpstreamEnd; |
| 320 if (isBROnLineByItself) { | 320 if (isBROnLineByItself) { |
| 321 removeNode(nodeAfterDownstreamStart); | 321 removeNode(nodeAfterDownstreamStart); |
| 322 return true; | 322 return true; |
| 323 } | 323 } |
| 324 | 324 |
| 325 // FIXME: This code doesn't belong in here. | 325 // FIXME: This code doesn't belong in here. |
| 326 // We detect the case where the start is an empty line consisting of BR not
wrapped in a block element. | 326 // We detect the case where the start is an empty line consisting of BR not
wrapped in a block element. |
| 327 if (upstreamStartIsBR && downstreamStartIsBR && !(isStartOfBlock(positionBef
oreNode(nodeAfterUpstreamStart)) && isEndOfBlock(positionAfterNode(nodeAfterUpst
reamStart)))) { | 327 if (upstreamStartIsBR && downstreamStartIsBR && !(isStartOfBlock(positionBef
oreNode(nodeAfterUpstreamStart)) && isEndOfBlock(positionAfterNode(nodeAfterUpst
reamStart))) && (!nodeAfterUpstreamEnd || !(nodeAfterUpstreamEnd->previousSiblin
g() == nodeAfterUpstreamStart))) { |
| 328 m_startsAtEmptyLine = true; | 328 m_startsAtEmptyLine = true; |
| 329 m_endingPosition = m_downstreamEnd; | 329 m_endingPosition = m_downstreamEnd; |
| 330 } | 330 } |
| 331 | 331 |
| 332 return false; | 332 return false; |
| 333 } | 333 } |
| 334 | 334 |
| 335 static Position firstEditablePositionInNode(Node* node) | 335 static Position firstEditablePositionInNode(Node* node) |
| 336 { | 336 { |
| 337 ASSERT(node); | 337 ASSERT(node); |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 | 848 |
| 849 // Normally deletion doesn't preserve the typing style that was present before i
t. For example, | 849 // Normally deletion doesn't preserve the typing style that was present before i
t. For example, |
| 850 // type a character, Bold, then delete the character and start typing. The Bold
typing style shouldn't | 850 // type a character, Bold, then delete the character and start typing. The Bold
typing style shouldn't |
| 851 // stick around. Deletion should preserve a typing style that *it* sets, howeve
r. | 851 // stick around. Deletion should preserve a typing style that *it* sets, howeve
r. |
| 852 bool DeleteSelectionCommand::preservesTypingStyle() const | 852 bool DeleteSelectionCommand::preservesTypingStyle() const |
| 853 { | 853 { |
| 854 return m_typingStyle; | 854 return m_typingStyle; |
| 855 } | 855 } |
| 856 | 856 |
| 857 } // namespace WebCore | 857 } // namespace WebCore |
| OLD | NEW |