| 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 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 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 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 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 * | 10 * |
| (...skipping 3284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3295 m_nodeIterators.add(ni); | 3295 m_nodeIterators.add(ni); |
| 3296 } | 3296 } |
| 3297 | 3297 |
| 3298 void Document::detachNodeIterator(NodeIterator* ni) | 3298 void Document::detachNodeIterator(NodeIterator* ni) |
| 3299 { | 3299 { |
| 3300 // The node iterator can be detached without having been attached if its roo
t node didn't have a document | 3300 // The node iterator can be detached without having been attached if its roo
t node didn't have a document |
| 3301 // when the iterator was created, but has it now. | 3301 // when the iterator was created, but has it now. |
| 3302 m_nodeIterators.remove(ni); | 3302 m_nodeIterators.remove(ni); |
| 3303 } | 3303 } |
| 3304 | 3304 |
| 3305 void Document::moveNodeIteratorsToNewDocument(Node* node, Document* newDocument) |
| 3306 { |
| 3307 HashSet<NodeIterator*> nodeIteratorsList = m_nodeIterators; |
| 3308 HashSet<NodeIterator*>::const_iterator nodeIteratorsEnd = nodeIteratorsList.
end(); |
| 3309 for (HashSet<NodeIterator*>::const_iterator it = nodeIteratorsList.begin();
it != nodeIteratorsEnd; ++it) { |
| 3310 if ((*it)->referenceNode() == node) { |
| 3311 detachNodeIterator(*it); |
| 3312 newDocument->attachNodeIterator(*it); |
| 3313 } |
| 3314 } |
| 3315 } |
| 3316 |
| 3305 void Document::nodeChildrenChanged(ContainerNode* container) | 3317 void Document::nodeChildrenChanged(ContainerNode* container) |
| 3306 { | 3318 { |
| 3307 if (!disableRangeMutation(page())) { | 3319 if (!disableRangeMutation(page())) { |
| 3308 HashSet<Range*>::const_iterator end = m_ranges.end(); | 3320 HashSet<Range*>::const_iterator end = m_ranges.end(); |
| 3309 for (HashSet<Range*>::const_iterator it = m_ranges.begin(); it != end; +
+it) | 3321 for (HashSet<Range*>::const_iterator it = m_ranges.begin(); it != end; +
+it) |
| 3310 (*it)->nodeChildrenChanged(container); | 3322 (*it)->nodeChildrenChanged(container); |
| 3311 } | 3323 } |
| 3312 } | 3324 } |
| 3313 | 3325 |
| 3314 void Document::nodeChildrenWillBeRemoved(ContainerNode* container) | 3326 void Document::nodeChildrenWillBeRemoved(ContainerNode* container) |
| (...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4910 // This functions is used for checking such possibility of FOUCs. | 4922 // This functions is used for checking such possibility of FOUCs. |
| 4911 // Note that the implementation considers only empty or <head> only contents
as a FOUC cause | 4923 // Note that the implementation considers only empty or <head> only contents
as a FOUC cause |
| 4912 // rather than missing <body>, because non-HTML document like SVG and arbitr
ary XML from foreign namespace | 4924 // rather than missing <body>, because non-HTML document like SVG and arbitr
ary XML from foreign namespace |
| 4913 // should be painted even if there is no <body>. | 4925 // should be painted even if there is no <body>. |
| 4914 if (didLayoutWithPendingStylesheets()) | 4926 if (didLayoutWithPendingStylesheets()) |
| 4915 return true; | 4927 return true; |
| 4916 return !hasHeadSibling(this); | 4928 return !hasHeadSibling(this); |
| 4917 } | 4929 } |
| 4918 | 4930 |
| 4919 } // namespace WebCore | 4931 } // namespace WebCore |
| OLD | NEW |