| OLD | NEW |
| 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 Loading... |
| 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 = lastEditableVisiblePositionBeforePositionInRoot(end, highestEditab
leRoot(start)).deepEquivalent(); | 169 end = lastEditablePositionBeforePositionInRoot(end, highestEditableRoot(
start)); |
| 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 Loading... |
| 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 |
| OLD | NEW |