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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
599 } | 599 } |
600 | 600 |
601 void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node& ol dChild) | 601 void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node& ol dChild) |
602 { | 602 { |
603 EventDispatchForbiddenScope assertNoEventDispatch; | 603 EventDispatchForbiddenScope assertNoEventDispatch; |
604 | 604 |
605 ASSERT(oldChild.parentNode() == this); | 605 ASSERT(oldChild.parentNode() == this); |
606 | 606 |
607 AttachContext context; | 607 AttachContext context; |
608 context.clearInvalidation = true; | 608 context.clearInvalidation = true; |
609 if (!needsAttach() || !oldChild.needsAttach()) | 609 if (!oldChild.needsAttach()) |
610 oldChild.detach(context); | 610 oldChild.detach(context); |
611 else if (oldChild.needsStyleInvalidation()) | |
612 document().styleEngine().styleInvalidator().clearInvalidation(toElement( oldChild)); | |
esprehn
2016/01/15 00:31:45
can Element::removedFrom do this? It seems like it
rune
2016/01/15 09:42:41
Yeah, I think so. It means it'll check needsStyleI
rune
2016/01/15 13:25:41
Done.
| |
611 | 613 |
612 if (nextChild) | 614 if (nextChild) |
613 nextChild->setPreviousSibling(previousChild); | 615 nextChild->setPreviousSibling(previousChild); |
614 if (previousChild) | 616 if (previousChild) |
615 previousChild->setNextSibling(nextChild); | 617 previousChild->setNextSibling(nextChild); |
616 if (m_firstChild == &oldChild) | 618 if (m_firstChild == &oldChild) |
617 m_firstChild = nextChild; | 619 m_firstChild = nextChild; |
618 if (m_lastChild == &oldChild) | 620 if (m_lastChild == &oldChild) |
619 m_lastChild = previousChild; | 621 m_lastChild = previousChild; |
620 | 622 |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1543 return true; | 1545 return true; |
1544 | 1546 |
1545 if (node->isElementNode() && toElement(node)->shadow()) | 1547 if (node->isElementNode() && toElement(node)->shadow()) |
1546 return true; | 1548 return true; |
1547 | 1549 |
1548 return false; | 1550 return false; |
1549 } | 1551 } |
1550 #endif | 1552 #endif |
1551 | 1553 |
1552 } // namespace blink | 1554 } // namespace blink |
OLD | NEW |