| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 #endif | 86 #endif |
| 87 return node->parentNodeGuaranteedHostFree(); | 87 return node->parentNodeGuaranteedHostFree(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 return parentSlow(node, details); | 90 return parentSlow(node, details); |
| 91 } | 91 } |
| 92 | 92 |
| 93 inline Node* nextSibling(const Node* node) | 93 inline Node* nextSibling(const Node* node) |
| 94 { | 94 { |
| 95 if (!node->needsShadowTreeWalker()) { | 95 if (!node->needsShadowTreeWalker()) { |
| 96 ASSERT(nextSiblingSlow(node) == node->nextSibling()); | 96 Node* next = node->nextSibling(); |
| 97 return node->nextSibling(); | 97 if (!next || !next->isInsertionPoint()) { |
| 98 ASSERT(nextSiblingSlow(node) == next); |
| 99 return next; |
| 100 } |
| 98 } | 101 } |
| 99 | 102 |
| 100 return nextSiblingSlow(node); | 103 return nextSiblingSlow(node); |
| 101 } | 104 } |
| 102 | 105 |
| 103 inline Node* previousSibling(const Node* node) | 106 inline Node* previousSibling(const Node* node) |
| 104 { | 107 { |
| 105 if (!node->needsShadowTreeWalker()) { | 108 if (!node->needsShadowTreeWalker()) { |
| 106 ASSERT(previousSiblingSlow(node) == node->previousSibling()); | 109 Node* prev = node->previousSibling(); |
| 107 return node->previousSibling(); | 110 if (!prev || !prev->isInsertionPoint()) { |
| 111 ASSERT(previousSiblingSlow(node) == prev); |
| 112 return prev; |
| 113 } |
| 108 } | 114 } |
| 109 | 115 |
| 110 return previousSiblingSlow(node); | 116 return previousSiblingSlow(node); |
| 111 } | 117 } |
| 112 | 118 |
| 113 } | 119 } |
| 114 | 120 |
| 115 } // namespace WebCore | 121 } // namespace WebCore |
| 116 | 122 |
| 117 #endif | 123 #endif |
| OLD | NEW |