| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 removeNode(p.anchorNode()); | 883 removeNode(p.anchorNode()); |
| 884 return; | 884 return; |
| 885 } | 885 } |
| 886 | 886 |
| 887 deleteTextFromNode(toText(p.anchorNode()), p.offsetInContainerNode(), 1); | 887 deleteTextFromNode(toText(p.anchorNode()), p.offsetInContainerNode(), 1); |
| 888 } | 888 } |
| 889 | 889 |
| 890 PassRefPtr<Node> CompositeEditCommand::insertNewDefaultParagraphElementAt(const
Position& position) | 890 PassRefPtr<Node> CompositeEditCommand::insertNewDefaultParagraphElementAt(const
Position& position) |
| 891 { | 891 { |
| 892 RefPtr<Element> paragraphElement = createDefaultParagraphElement(document())
; | 892 RefPtr<Element> paragraphElement = createDefaultParagraphElement(document())
; |
| 893 paragraphElement->appendChild(createBreakElement(document()), IGNORE_EXCEPTI
ON_STATE); | 893 paragraphElement->appendChild(createBreakElement(document()), IGNORE_EXCEPTI
ON); |
| 894 insertNodeAt(paragraphElement, position); | 894 insertNodeAt(paragraphElement, position); |
| 895 return paragraphElement.release(); | 895 return paragraphElement.release(); |
| 896 } | 896 } |
| 897 | 897 |
| 898 // If the paragraph is not entirely within it's own block, create one and move t
he paragraph into | 898 // If the paragraph is not entirely within it's own block, create one and move t
he paragraph into |
| 899 // it, and return that block. Otherwise return 0. | 899 // it, and return that block. Otherwise return 0. |
| 900 PassRefPtr<Node> CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessar
y(const Position& pos) | 900 PassRefPtr<Node> CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessar
y(const Position& pos) |
| 901 { | 901 { |
| 902 if (pos.isNull()) | 902 if (pos.isNull()) |
| 903 return 0; | 903 return 0; |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 return node.release(); | 1464 return node.release(); |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 PassRefPtr<Element> createBlockPlaceholderElement(Document* document) | 1467 PassRefPtr<Element> createBlockPlaceholderElement(Document* document) |
| 1468 { | 1468 { |
| 1469 RefPtr<Element> breakNode = document->createElement(brTag, false); | 1469 RefPtr<Element> breakNode = document->createElement(brTag, false); |
| 1470 return breakNode.release(); | 1470 return breakNode.release(); |
| 1471 } | 1471 } |
| 1472 | 1472 |
| 1473 } // namespace WebCore | 1473 } // namespace WebCore |
| OLD | NEW |