| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 Node* highestRoot = highestEditableRoot(start); | 173 Node* highestRoot = highestEditableRoot(start); |
| 174 ASSERT(highestRoot); | 174 ASSERT(highestRoot); |
| 175 end = lastEditablePositionBeforePositionInRoot(end, *highestRoot); | 175 end = lastEditablePositionBeforePositionInRoot(end, *highestRoot); |
| 176 } | 176 } |
| 177 | 177 |
| 178 m_upstreamStart = mostBackwardCaretPosition(start); | 178 m_upstreamStart = mostBackwardCaretPosition(start); |
| 179 m_downstreamStart = mostForwardCaretPosition(start); | 179 m_downstreamStart = mostForwardCaretPosition(start); |
| 180 m_upstreamEnd = mostBackwardCaretPosition(end); | 180 m_upstreamEnd = mostBackwardCaretPosition(end); |
| 181 m_downstreamEnd = mostForwardCaretPosition(end); | 181 m_downstreamEnd = mostForwardCaretPosition(end); |
| 182 | 182 |
| 183 m_startRoot = editableRootElementForPosition(start); | 183 m_startRoot = rootEditableElementOf(start); |
| 184 m_endRoot = editableRootElementForPosition(end); | 184 m_endRoot = rootEditableElementOf(end); |
| 185 | 185 |
| 186 m_startTableRow = toHTMLTableRowElement(enclosingNodeOfType(start, &isHTMLTa
bleRowElement)); | 186 m_startTableRow = toHTMLTableRowElement(enclosingNodeOfType(start, &isHTMLTa
bleRowElement)); |
| 187 m_endTableRow = toHTMLTableRowElement(enclosingNodeOfType(end, &isHTMLTableR
owElement)); | 187 m_endTableRow = toHTMLTableRowElement(enclosingNodeOfType(end, &isHTMLTableR
owElement)); |
| 188 | 188 |
| 189 // Don't move content out of a table cell. | 189 // Don't move content out of a table cell. |
| 190 // If the cell is non-editable, enclosingNodeOfType won't return it by defau
lt, so | 190 // If the cell is non-editable, enclosingNodeOfType won't return it by defau
lt, so |
| 191 // tell that function that we don't care if it returns non-editable nodes. | 191 // tell that function that we don't care if it returns non-editable nodes. |
| 192 Node* startCell = enclosingNodeOfType(m_upstreamStart, &isTableCell, CanCros
sEditingBoundary); | 192 Node* startCell = enclosingNodeOfType(m_upstreamStart, &isTableCell, CanCros
sEditingBoundary); |
| 193 Node* endCell = enclosingNodeOfType(m_downstreamEnd, &isTableCell, CanCrossE
ditingBoundary); | 193 Node* endCell = enclosingNodeOfType(m_downstreamEnd, &isTableCell, CanCrossE
ditingBoundary); |
| 194 // FIXME: This isn't right. A borderless table with two rows and a single c
olumn would appear as two paragraphs. | 194 // FIXME: This isn't right. A borderless table with two rows and a single c
olumn would appear as two paragraphs. |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 visitor->trace(m_deleteIntoBlockquoteStyle); | 903 visitor->trace(m_deleteIntoBlockquoteStyle); |
| 904 visitor->trace(m_startRoot); | 904 visitor->trace(m_startRoot); |
| 905 visitor->trace(m_endRoot); | 905 visitor->trace(m_endRoot); |
| 906 visitor->trace(m_startTableRow); | 906 visitor->trace(m_startTableRow); |
| 907 visitor->trace(m_endTableRow); | 907 visitor->trace(m_endTableRow); |
| 908 visitor->trace(m_temporaryPlaceholder); | 908 visitor->trace(m_temporaryPlaceholder); |
| 909 CompositeEditCommand::trace(visitor); | 909 CompositeEditCommand::trace(visitor); |
| 910 } | 910 } |
| 911 | 911 |
| 912 } // namespace blink | 912 } // namespace blink |
| OLD | NEW |