Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: WebCore/dom/Document.cpp

Issue 5787002: Merge 73620 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/dom/node-iterator-reference-node-moved-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3289 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) 3305 void Document::moveNodeIteratorsToNewDocument(Node* node, Document* newDocument)
3306 { 3306 {
3307 HashSet<NodeIterator*> nodeIteratorsList = m_nodeIterators; 3307 HashSet<NodeIterator*> nodeIteratorsList = m_nodeIterators;
3308 HashSet<NodeIterator*>::const_iterator nodeIteratorsEnd = nodeIteratorsList. end(); 3308 HashSet<NodeIterator*>::const_iterator nodeIteratorsEnd = nodeIteratorsList. end();
3309 for (HashSet<NodeIterator*>::const_iterator it = nodeIteratorsList.begin(); it != nodeIteratorsEnd; ++it) { 3309 for (HashSet<NodeIterator*>::const_iterator it = nodeIteratorsList.begin(); it != nodeIteratorsEnd; ++it) {
3310 if ((*it)->referenceNode() == node) { 3310 if ((*it)->root() == node) {
3311 detachNodeIterator(*it); 3311 detachNodeIterator(*it);
3312 newDocument->attachNodeIterator(*it); 3312 newDocument->attachNodeIterator(*it);
3313 } 3313 }
3314 } 3314 }
3315 } 3315 }
3316 3316
3317 void Document::nodeChildrenChanged(ContainerNode* container) 3317 void Document::nodeChildrenChanged(ContainerNode* container)
3318 { 3318 {
3319 if (!disableRangeMutation(page())) { 3319 if (!disableRangeMutation(page())) {
3320 HashSet<Range*>::const_iterator end = m_ranges.end(); 3320 HashSet<Range*>::const_iterator end = m_ranges.end();
(...skipping 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after
4922 // This functions is used for checking such possibility of FOUCs. 4922 // This functions is used for checking such possibility of FOUCs.
4923 // 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
4924 // 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
4925 // should be painted even if there is no <body>. 4925 // should be painted even if there is no <body>.
4926 if (didLayoutWithPendingStylesheets()) 4926 if (didLayoutWithPendingStylesheets())
4927 return true; 4927 return true;
4928 return !hasHeadSibling(this); 4928 return !hasHeadSibling(this);
4929 } 4929 }
4930 4930
4931 } // namespace WebCore 4931 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/node-iterator-reference-node-moved-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698