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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3763 | 3763 |
3764 void Document::updateRangesAfterChildrenChanged(ContainerNode* container) | 3764 void Document::updateRangesAfterChildrenChanged(ContainerNode* container) |
3765 { | 3765 { |
3766 if (!m_ranges.isEmpty()) { | 3766 if (!m_ranges.isEmpty()) { |
3767 AttachedRangeSet::const_iterator end = m_ranges.end(); | 3767 AttachedRangeSet::const_iterator end = m_ranges.end(); |
3768 for (AttachedRangeSet::const_iterator it = m_ranges.begin(); it != end; ++it) | 3768 for (AttachedRangeSet::const_iterator it = m_ranges.begin(); it != end; ++it) |
3769 (*it)->nodeChildrenChanged(container); | 3769 (*it)->nodeChildrenChanged(container); |
3770 } | 3770 } |
3771 } | 3771 } |
3772 | 3772 |
3773 void Document::updateRangesAfterNodeMovedToAnotherDocument(const Node& node) | |
3774 { | |
3775 ASSERT(node.document() != this); | |
3776 if (!m_ranges.isEmpty()) { | |
Yuta Kitamura
2014/06/18 09:30:29
nit: Early exit is better here.
yosin_UTC9
2014/06/18 09:52:33
Done.
| |
3777 AttachedRangeSet ranges = m_ranges; | |
3778 AttachedRangeSet::const_iterator end = ranges.end(); | |
3779 for (AttachedRangeSet::const_iterator it = ranges.begin(); it != end; ++ it) | |
3780 (*it)->updateOwnerDocumentIfNeeded(); | |
3781 } | |
3782 } | |
3783 | |
3773 void Document::nodeChildrenWillBeRemoved(ContainerNode& container) | 3784 void Document::nodeChildrenWillBeRemoved(ContainerNode& container) |
3774 { | 3785 { |
3775 NoEventDispatchAssertion assertNoEventDispatch; | 3786 NoEventDispatchAssertion assertNoEventDispatch; |
3776 if (!m_ranges.isEmpty()) { | 3787 if (!m_ranges.isEmpty()) { |
3777 AttachedRangeSet::const_iterator end = m_ranges.end(); | 3788 AttachedRangeSet::const_iterator end = m_ranges.end(); |
3778 for (AttachedRangeSet::const_iterator it = m_ranges.begin(); it != end; ++it) | 3789 for (AttachedRangeSet::const_iterator it = m_ranges.begin(); it != end; ++it) |
3779 (*it)->nodeChildrenWillBeRemoved(container); | 3790 (*it)->nodeChildrenWillBeRemoved(container); |
3780 } | 3791 } |
3781 | 3792 |
3782 WillBeHeapHashSet<RawPtrWillBeWeakMember<NodeIterator> >::const_iterator nod eIteratorsEnd = m_nodeIterators.end(); | 3793 WillBeHeapHashSet<RawPtrWillBeWeakMember<NodeIterator> >::const_iterator nod eIteratorsEnd = m_nodeIterators.end(); |
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5854 visitor->trace(m_compositorPendingAnimations); | 5865 visitor->trace(m_compositorPendingAnimations); |
5855 visitor->trace(m_contextDocument); | 5866 visitor->trace(m_contextDocument); |
5856 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5867 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5857 DocumentSupplementable::trace(visitor); | 5868 DocumentSupplementable::trace(visitor); |
5858 TreeScope::trace(visitor); | 5869 TreeScope::trace(visitor); |
5859 ContainerNode::trace(visitor); | 5870 ContainerNode::trace(visitor); |
5860 ExecutionContext::trace(visitor); | 5871 ExecutionContext::trace(visitor); |
5861 } | 5872 } |
5862 | 5873 |
5863 } // namespace WebCore | 5874 } // namespace WebCore |
OLD | NEW |