OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 return false; | 169 return false; |
170 | 170 |
171 if (node->renderer() && node->renderer()->isTable()) | 171 if (node->renderer() && node->renderer()->isTable()) |
172 node = node->parentNode(); | 172 node = node->parentNode(); |
173 | 173 |
174 return node->rendererIsRichlyEditable(); | 174 return node->rendererIsRichlyEditable(); |
175 } | 175 } |
176 | 176 |
177 Element* editableRootForPosition(const Position& p) | 177 Element* editableRootForPosition(const Position& p) |
178 { | 178 { |
179 Node* node = p.deprecatedNode(); | 179 Node* node = p.containerNode(); |
180 if (!node) | 180 if (!node) |
181 return 0; | 181 return 0; |
182 | 182 |
183 if (node->renderer() && node->renderer()->isTable()) | 183 if (node->renderer() && node->renderer()->isTable()) |
184 node = node->parentNode(); | 184 node = node->parentNode(); |
185 | 185 |
186 return node->rootEditableElement(); | 186 return node->rootEditableElement(); |
187 } | 187 } |
188 | 188 |
189 // Finds the enclosing element until which the tree can be split. | 189 // Finds the enclosing element until which the tree can be split. |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 | 1131 |
1132 if (extent == node || extent->isDescendantOf(node)) { | 1132 if (extent == node || extent->isDescendantOf(node)) { |
1133 ASSERT(node->parentNode()); | 1133 ASSERT(node->parentNode()); |
1134 updatedSelection.setExtent(positionInParentBeforeNode(node)); | 1134 updatedSelection.setExtent(positionInParentBeforeNode(node)); |
1135 } | 1135 } |
1136 | 1136 |
1137 return updatedSelection; | 1137 return updatedSelection; |
1138 } | 1138 } |
1139 | 1139 |
1140 } // namespace WebCore | 1140 } // namespace WebCore |
OLD | NEW |