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

Side by Side Diff: Source/WebCore/rendering/RenderObjectChildList.cpp

Issue 12703031: Revert 146726 "AXObjectCache gets recreated during document tear..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 9 months 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 | « Source/WebCore/rendering/RenderObject.cpp ('k') | Source/WebCore/rendering/RenderText.cpp » ('j') | 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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 oldChild->setPreviousSibling(0); 103 oldChild->setPreviousSibling(0);
104 oldChild->setNextSibling(0); 104 oldChild->setNextSibling(0);
105 oldChild->setParent(0); 105 oldChild->setParent(0);
106 106
107 // rendererRemovedFromTree walks the whole subtree. We can improve performan ce 107 // rendererRemovedFromTree walks the whole subtree. We can improve performan ce
108 // by skipping this step when destroying the entire tree. 108 // by skipping this step when destroying the entire tree.
109 if (!owner->documentBeingDestroyed()) 109 if (!owner->documentBeingDestroyed())
110 RenderCounter::rendererRemovedFromTree(oldChild); 110 RenderCounter::rendererRemovedFromTree(oldChild);
111 111
112 if (AXObjectCache* cache = owner->document()->existingAXObjectCache()) 112 if (AXObjectCache::accessibilityEnabled())
113 cache->childrenChanged(owner); 113 owner->document()->axObjectCache()->childrenChanged(owner);
114 114
115 return oldChild; 115 return oldChild;
116 } 116 }
117 117
118 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n ewChild, RenderObject* beforeChild, bool notifyRenderer) 118 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* n ewChild, RenderObject* beforeChild, bool notifyRenderer)
119 { 119 {
120 ASSERT(!newChild->parent()); 120 ASSERT(!newChild->parent());
121 ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->i sTableRow() && !newChild->isTableCell())); 121 ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->i sTableRow() && !newChild->isTableCell()));
122 122
123 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne r) 123 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owne r)
(...skipping 30 matching lines...) Expand all
154 newChild->insertedIntoTree(); 154 newChild->insertedIntoTree();
155 155
156 if (!owner->documentBeingDestroyed()) { 156 if (!owner->documentBeingDestroyed()) {
157 RenderCounter::rendererSubtreeAttached(newChild); 157 RenderCounter::rendererSubtreeAttached(newChild);
158 } 158 }
159 159
160 newChild->setNeedsLayoutAndPrefWidthsRecalc(); 160 newChild->setNeedsLayoutAndPrefWidthsRecalc();
161 if (!owner->normalChildNeedsLayout()) 161 if (!owner->normalChildNeedsLayout())
162 owner->setChildNeedsLayout(true); // We may supply the static position f or an absolute positioned child. 162 owner->setChildNeedsLayout(true); // We may supply the static position f or an absolute positioned child.
163 163
164 if (AXObjectCache* cache = owner->document()->axObjectCache()) 164 if (AXObjectCache::accessibilityEnabled())
165 cache->childrenChanged(owner); 165 owner->document()->axObjectCache()->childrenChanged(owner);
166 } 166 }
167 167
168 } // namespace WebCore 168 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | Source/WebCore/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698