Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: Source/core/editing/CompositeEditCommand.cpp

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/editing/AppendNodeCommand.cpp ('k') | Source/core/editing/DeleteFromTextNodeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698