Chromium Code Reviews| Index: Source/core/editing/htmlediting.cpp |
| diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp |
| index 69a59f3064ddfba20a4b7531e0de1a07c4889e9d..940b7f5f18f4d25297b6fb24f1c6e98482b51026 100644 |
| --- a/Source/core/editing/htmlediting.cpp |
| +++ b/Source/core/editing/htmlediting.cpp |
| @@ -66,7 +66,16 @@ using namespace HTMLNames; |
| // purposes of editing. |
| bool isAtomicNode(const Node *node) |
| { |
| - return node && (!node->hasChildNodes() || editingIgnoresContent(node)); |
| + if (!node) |
| + return false; |
| + if (!node->hasChildNodes() || editingIgnoresContent(node)) |
| + return true; |
| + RenderObject* renderer = node->renderer(); |
| + if (!renderer) |
| + return false; |
| + if (renderer->isTable() || renderer->isTableRow()) |
|
ojan
2013/05/22 02:25:20
I don't really understand this check. What's speci
yosin_UTC9
2013/05/22 07:54:12
To move position into table cell, we should not ma
ojan
2013/05/22 21:05:45
How is this different from the following?
<div co
|
| + return false; |
| + return renderer->style()->userModify() == READ_ONLY && lowestEditableAncestor(node); |
| } |
| // Compare two positions, taking into account the possibility that one or both |
| @@ -128,7 +137,7 @@ Node* highestEditableRoot(const Position& position, EditableType editableType) |
| return highestRoot; |
| } |
| -Node* lowestEditableAncestor(Node* node) |
| +Node* lowestEditableAncestor(const Node* node) |
| { |
| if (!node) |
| return 0; |