| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 | 417 |
| 418 ChildListMutationScope mutation(*this); | 418 ChildListMutationScope mutation(*this); |
| 419 // 7. Let reference child be child’s next sibling. | 419 // 7. Let reference child be child’s next sibling. |
| 420 Node* next = oldChild->nextSibling(); | 420 Node* next = oldChild->nextSibling(); |
| 421 // 8. If reference child is node, set it to node’s next sibling. | 421 // 8. If reference child is node, set it to node’s next sibling. |
| 422 if (next == newChild) | 422 if (next == newChild) |
| 423 next = newChild->nextSibling(); | 423 next = newChild->nextSibling(); |
| 424 | 424 |
| 425 // TODO(tkent): According to the specification, we should remove |newChild| | 425 // TODO(tkent): According to the specification, we should remove |newChild| |
| 426 // from its parent here, and create a separated mutation record for it. | 426 // from its parent here, and create a separated mutation record for it. |
| 427 // Refer to imported/wpt/dom/nodes/MutationObserver-childList.html. | 427 // Refer to external/wpt/dom/nodes/MutationObserver-childList.html. |
| 428 | 428 |
| 429 // 12. If child’s parent is not null, run these substeps: | 429 // 12. If child’s parent is not null, run these substeps: |
| 430 // 1. Set removedNodes to a list solely containing child. | 430 // 1. Set removedNodes to a list solely containing child. |
| 431 // 2. Remove child from its parent with the suppress observers flag set. | 431 // 2. Remove child from its parent with the suppress observers flag set. |
| 432 removeChild(oldChild, exceptionState); | 432 removeChild(oldChild, exceptionState); |
| 433 if (exceptionState.hadException()) | 433 if (exceptionState.hadException()) |
| 434 return nullptr; | 434 return nullptr; |
| 435 | 435 |
| 436 // Does this one more time because removeChild() fires a MutationEvent. | 436 // Does this one more time because removeChild() fires a MutationEvent. |
| 437 if (!checkAcceptChild(newChild, oldChild, exceptionState)) | 437 if (!checkAcceptChild(newChild, oldChild, exceptionState)) |
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 return true; | 1502 return true; |
| 1503 | 1503 |
| 1504 if (node->isElementNode() && toElement(node)->shadow()) | 1504 if (node->isElementNode() && toElement(node)->shadow()) |
| 1505 return true; | 1505 return true; |
| 1506 | 1506 |
| 1507 return false; | 1507 return false; |
| 1508 } | 1508 } |
| 1509 #endif | 1509 #endif |
| 1510 | 1510 |
| 1511 } // namespace blink | 1511 } // namespace blink |
| OLD | NEW |