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

Side by Side Diff: Source/WebCore/editing/htmlediting.cpp

Issue 7866016: Merge 94832 - Crashes in WebCore::InsertNodeBeforeCommand constructor. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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 | « LayoutTests/editing/inserting/insert-paragraph-selection-outside-contenteditable-expected.txt ('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) 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
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
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
OLDNEW
« no previous file with comments | « LayoutTests/editing/inserting/insert-paragraph-selection-outside-contenteditable-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698