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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp

Issue 2089993003: Get rid of EUpdateStyle parameter from isEditablePosition() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-27T14:42:23 Created 4 years, 5 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 | « third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp ('k') | no next file » | 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 VisiblePosition newExtent = createVisiblePosition(isBaseFirst ? end : start) ; 160 VisiblePosition newExtent = createVisiblePosition(isBaseFirst ? end : start) ;
161 setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection( ).isDirectional())); 161 setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection( ).isDirectional()));
162 } 162 }
163 163
164 void DeleteSelectionCommand::initializePositionData(EditingState* editingState) 164 void DeleteSelectionCommand::initializePositionData(EditingState* editingState)
165 { 165 {
166 Position start, end; 166 Position start, end;
167 initializeStartEnd(start, end); 167 initializeStartEnd(start, end);
168 DCHECK(start.isNotNull()); 168 DCHECK(start.isNotNull());
169 DCHECK(end.isNotNull()); 169 DCHECK(end.isNotNull());
170 if (!isEditablePosition(start, ContentIsEditable, DoNotUpdateStyle)) { 170 if (!isEditablePosition(start, ContentIsEditable)) {
171 editingState->abort(); 171 editingState->abort();
172 return; 172 return;
173 } 173 }
174 if (!isEditablePosition(end, ContentIsEditable, DoNotUpdateStyle)) { 174 if (!isEditablePosition(end, ContentIsEditable)) {
175 Node* highestRoot = highestEditableRoot(start); 175 Node* highestRoot = highestEditableRoot(start);
176 DCHECK(highestRoot); 176 DCHECK(highestRoot);
177 end = lastEditablePositionBeforePositionInRoot(end, *highestRoot); 177 end = lastEditablePositionBeforePositionInRoot(end, *highestRoot);
178 } 178 }
179 179
180 m_upstreamStart = mostBackwardCaretPosition(start); 180 m_upstreamStart = mostBackwardCaretPosition(start);
181 m_downstreamStart = mostForwardCaretPosition(start); 181 m_downstreamStart = mostForwardCaretPosition(start);
182 m_upstreamEnd = mostBackwardCaretPosition(end); 182 m_upstreamEnd = mostBackwardCaretPosition(end);
183 m_downstreamEnd = mostForwardCaretPosition(end); 183 m_downstreamEnd = mostForwardCaretPosition(end);
184 184
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 visitor->trace(m_deleteIntoBlockquoteStyle); 961 visitor->trace(m_deleteIntoBlockquoteStyle);
962 visitor->trace(m_startRoot); 962 visitor->trace(m_startRoot);
963 visitor->trace(m_endRoot); 963 visitor->trace(m_endRoot);
964 visitor->trace(m_startTableRow); 964 visitor->trace(m_startTableRow);
965 visitor->trace(m_endTableRow); 965 visitor->trace(m_endTableRow);
966 visitor->trace(m_temporaryPlaceholder); 966 visitor->trace(m_temporaryPlaceholder);
967 CompositeEditCommand::trace(visitor); 967 CompositeEditCommand::trace(visitor);
968 } 968 }
969 969
970 } // namespace blink 970 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698