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

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

Issue 340013002: Rename {first,last}EditablePosition{After,Before}Position... to denote them returned VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/core/editing/SpellChecker.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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection( ).isDirectional())); 159 setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection( ).isDirectional()));
160 } 160 }
161 161
162 void DeleteSelectionCommand::initializePositionData() 162 void DeleteSelectionCommand::initializePositionData()
163 { 163 {
164 Position start, end; 164 Position start, end;
165 initializeStartEnd(start, end); 165 initializeStartEnd(start, end);
166 166
167 ASSERT(isEditablePosition(start, ContentIsEditable, DoNotUpdateStyle)); 167 ASSERT(isEditablePosition(start, ContentIsEditable, DoNotUpdateStyle));
168 if (!isEditablePosition(end, ContentIsEditable, DoNotUpdateStyle)) 168 if (!isEditablePosition(end, ContentIsEditable, DoNotUpdateStyle))
169 end = lastEditablePositionBeforePositionInRoot(end, highestEditableRoot( start)).deepEquivalent(); 169 end = lastEditableVisiblePositionBeforePositionInRoot(end, highestEditab leRoot(start)).deepEquivalent();
170 170
171 m_upstreamStart = start.upstream(); 171 m_upstreamStart = start.upstream();
172 m_downstreamStart = start.downstream(); 172 m_downstreamStart = start.downstream();
173 m_upstreamEnd = end.upstream(); 173 m_upstreamEnd = end.upstream();
174 m_downstreamEnd = end.downstream(); 174 m_downstreamEnd = end.downstream();
175 175
176 m_startRoot = editableRootForPosition(start); 176 m_startRoot = editableRootForPosition(start);
177 m_endRoot = editableRootForPosition(end); 177 m_endRoot = editableRootForPosition(end);
178 178
179 m_startTableRow = enclosingNodeOfType(start, &isHTMLTableRowElement); 179 m_startTableRow = enclosingNodeOfType(start, &isHTMLTableRowElement);
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 visitor->trace(m_deleteIntoBlockquoteStyle); 884 visitor->trace(m_deleteIntoBlockquoteStyle);
885 visitor->trace(m_startRoot); 885 visitor->trace(m_startRoot);
886 visitor->trace(m_endRoot); 886 visitor->trace(m_endRoot);
887 visitor->trace(m_startTableRow); 887 visitor->trace(m_startTableRow);
888 visitor->trace(m_endTableRow); 888 visitor->trace(m_endTableRow);
889 visitor->trace(m_temporaryPlaceholder); 889 visitor->trace(m_temporaryPlaceholder);
890 CompositeEditCommand::trace(visitor); 890 CompositeEditCommand::trace(visitor);
891 } 891 }
892 892
893 } // namespace WebCore 893 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698