| 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
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights
reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 if (!checkAcceptChild(newChild, child, exceptionState)) { | 393 if (!checkAcceptChild(newChild, child, exceptionState)) { |
| 394 if (exceptionState.hadException()) | 394 if (exceptionState.hadException()) |
| 395 return nullptr; | 395 return nullptr; |
| 396 return child; | 396 return child; |
| 397 } | 397 } |
| 398 | 398 |
| 399 NodeVector targets; | 399 NodeVector targets; |
| 400 collectChildrenAndRemoveFromOldParent(*newChild, targets, exceptionState); | 400 collectChildrenAndRemoveFromOldParent(*newChild, targets, exceptionState); |
| 401 if (exceptionState.hadException()) | 401 if (exceptionState.hadException()) |
| 402 return nullptr; | 402 return nullptr; |
| 403 if (targets.isEmpty()) |
| 404 return child; |
| 403 | 405 |
| 404 // Does this yet another check because collectChildrenAndRemoveFromOldParent
() fires a MutationEvent. | 406 // Does this yet another check because collectChildrenAndRemoveFromOldParent
() fires a MutationEvent. |
| 405 if (!checkAcceptChild(newChild, child, exceptionState)) { | 407 if (!checkAcceptChild(newChild, child, exceptionState)) { |
| 406 if (exceptionState.hadException()) | 408 if (exceptionState.hadException()) |
| 407 return nullptr; | 409 return nullptr; |
| 408 return child; | 410 return child; |
| 409 } | 411 } |
| 410 | 412 |
| 411 if (next) | 413 if (next) |
| 412 insertNodeVector(targets, next, AdoptAndInsertBefore()); | 414 insertNodeVector(targets, next, AdoptAndInsertBefore()); |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1380 return true; | 1382 return true; |
| 1381 | 1383 |
| 1382 if (node->isElementNode() && toElement(node)->shadow()) | 1384 if (node->isElementNode() && toElement(node)->shadow()) |
| 1383 return true; | 1385 return true; |
| 1384 | 1386 |
| 1385 return false; | 1387 return false; |
| 1386 } | 1388 } |
| 1387 #endif | 1389 #endif |
| 1388 | 1390 |
| 1389 } // namespace blink | 1391 } // namespace blink |
| OLD | NEW |