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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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
« no previous file with comments | « Source/core/editing/DeleteFromTextNodeCommand.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 , m_startsAtEmptyLine(false) 79 , m_startsAtEmptyLine(false)
80 , m_sanitizeMarkup(sanitizeMarkup) 80 , m_sanitizeMarkup(sanitizeMarkup)
81 , m_startBlock(0) 81 , m_startBlock(0)
82 , m_endBlock(0) 82 , m_endBlock(0)
83 , m_typingStyle(0) 83 , m_typingStyle(0)
84 , m_deleteIntoBlockquoteStyle(0) 84 , m_deleteIntoBlockquoteStyle(0)
85 { 85 {
86 } 86 }
87 87
88 DeleteSelectionCommand::DeleteSelectionCommand(const VisibleSelection& selection , bool smartDelete, bool mergeBlocksAfterDelete, bool replace, bool expandForSpe cialElements, bool sanitizeMarkup) 88 DeleteSelectionCommand::DeleteSelectionCommand(const VisibleSelection& selection , bool smartDelete, bool mergeBlocksAfterDelete, bool replace, bool expandForSpe cialElements, bool sanitizeMarkup)
89 : CompositeEditCommand(selection.start().anchorNode()->document()) 89 : CompositeEditCommand(&selection.start().anchorNode()->document())
90 , m_hasSelectionToDelete(true) 90 , m_hasSelectionToDelete(true)
91 , m_smartDelete(smartDelete) 91 , m_smartDelete(smartDelete)
92 , m_mergeBlocksAfterDelete(mergeBlocksAfterDelete) 92 , m_mergeBlocksAfterDelete(mergeBlocksAfterDelete)
93 , m_needPlaceholder(false) 93 , m_needPlaceholder(false)
94 , m_replace(replace) 94 , m_replace(replace)
95 , m_expandForSpecialElements(expandForSpecialElements) 95 , m_expandForSpecialElements(expandForSpecialElements)
96 , m_pruneStartBlockIfNecessary(false) 96 , m_pruneStartBlockIfNecessary(false)
97 , m_startsAtEmptyLine(false) 97 , m_startsAtEmptyLine(false)
98 , m_sanitizeMarkup(sanitizeMarkup) 98 , m_sanitizeMarkup(sanitizeMarkup)
99 , m_selectionToDelete(selection) 99 , m_selectionToDelete(selection)
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 851
852 // Normally deletion doesn't preserve the typing style that was present before i t. For example, 852 // Normally deletion doesn't preserve the typing style that was present before i t. For example,
853 // type a character, Bold, then delete the character and start typing. The Bold typing style shouldn't 853 // type a character, Bold, then delete the character and start typing. The Bold typing style shouldn't
854 // stick around. Deletion should preserve a typing style that *it* sets, howeve r. 854 // stick around. Deletion should preserve a typing style that *it* sets, howeve r.
855 bool DeleteSelectionCommand::preservesTypingStyle() const 855 bool DeleteSelectionCommand::preservesTypingStyle() const
856 { 856 {
857 return m_typingStyle; 857 return m_typingStyle;
858 } 858 }
859 859
860 } // namespace WebCore 860 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/DeleteFromTextNodeCommand.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698