| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 , m_beingDestroyed(false) | 151 , m_beingDestroyed(false) |
| 152 , m_hasMarkupTruncation(false) | 152 , m_hasMarkupTruncation(false) |
| 153 , m_widthAvailableToChildrenChanged(false) | 153 , m_widthAvailableToChildrenChanged(false) |
| 154 , m_hasOnlySelfCollapsingChildren(false) | 154 , m_hasOnlySelfCollapsingChildren(false) |
| 155 , m_descendantsWithFloatsMarkedForLayout(false) | 155 , m_descendantsWithFloatsMarkedForLayout(false) |
| 156 { | 156 { |
| 157 // RenderBlockFlow calls setChildrenInline(true). | 157 // RenderBlockFlow calls setChildrenInline(true). |
| 158 // By default, subclasses do not have inline children. | 158 // By default, subclasses do not have inline children. |
| 159 } | 159 } |
| 160 | 160 |
| 161 void RenderBlock::trace(Visitor* visitor) | |
| 162 { | |
| 163 visitor->trace(m_children); | |
| 164 RenderBox::trace(visitor); | |
| 165 } | |
| 166 | |
| 167 static void removeBlockFromDescendantAndContainerMaps(RenderBlock* block, Tracke
dDescendantsMap*& descendantMap, TrackedContainerMap*& containerMap) | 161 static void removeBlockFromDescendantAndContainerMaps(RenderBlock* block, Tracke
dDescendantsMap*& descendantMap, TrackedContainerMap*& containerMap) |
| 168 { | 162 { |
| 169 if (OwnPtr<TrackedRendererListHashSet> descendantSet = descendantMap->take(b
lock)) { | 163 if (OwnPtr<TrackedRendererListHashSet> descendantSet = descendantMap->take(b
lock)) { |
| 170 TrackedRendererListHashSet::iterator end = descendantSet->end(); | 164 TrackedRendererListHashSet::iterator end = descendantSet->end(); |
| 171 for (TrackedRendererListHashSet::iterator descendant = descendantSet->be
gin(); descendant != end; ++descendant) { | 165 for (TrackedRendererListHashSet::iterator descendant = descendantSet->be
gin(); descendant != end; ++descendant) { |
| 172 TrackedContainerMap::iterator it = containerMap->find(*descendant); | 166 TrackedContainerMap::iterator it = containerMap->find(*descendant); |
| 173 ASSERT(it != containerMap->end()); | 167 ASSERT(it != containerMap->end()); |
| 174 if (it == containerMap->end()) | 168 if (it == containerMap->end()) |
| 175 continue; | 169 continue; |
| 176 HashSet<RenderBlock*>* containerSet = it->value.get(); | 170 HashSet<RenderBlock*>* containerSet = it->value.get(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 if (hasColumns()) | 213 if (hasColumns()) |
| 220 gColumnInfoMap->take(this); | 214 gColumnInfoMap->take(this); |
| 221 if (gPercentHeightDescendantsMap) | 215 if (gPercentHeightDescendantsMap) |
| 222 removeBlockFromDescendantAndContainerMaps(this, gPercentHeightDescendant
sMap, gPercentHeightContainerMap); | 216 removeBlockFromDescendantAndContainerMaps(this, gPercentHeightDescendant
sMap, gPercentHeightContainerMap); |
| 223 if (gPositionedDescendantsMap) | 217 if (gPositionedDescendantsMap) |
| 224 removeBlockFromDescendantAndContainerMaps(this, gPositionedDescendantsMa
p, gPositionedContainerMap); | 218 removeBlockFromDescendantAndContainerMaps(this, gPositionedDescendantsMa
p, gPositionedContainerMap); |
| 225 } | 219 } |
| 226 | 220 |
| 227 RenderBlock::~RenderBlock() | 221 RenderBlock::~RenderBlock() |
| 228 { | 222 { |
| 229 #if !ENABLE(OILPAN) | |
| 230 removeFromGlobalMaps(); | 223 removeFromGlobalMaps(); |
| 231 #endif | |
| 232 } | |
| 233 | |
| 234 void RenderBlock::destroy() | |
| 235 { | |
| 236 RenderBox::destroy(); | |
| 237 #if ENABLE(OILPAN) | |
| 238 // RenderObject::removeChild called in destory() depends on gColumnInfoMap. | |
| 239 removeFromGlobalMaps(); | |
| 240 #endif | |
| 241 } | 224 } |
| 242 | 225 |
| 243 void RenderBlock::willBeDestroyed() | 226 void RenderBlock::willBeDestroyed() |
| 244 { | 227 { |
| 245 // Mark as being destroyed to avoid trouble with merges in removeChild(). | 228 // Mark as being destroyed to avoid trouble with merges in removeChild(). |
| 246 m_beingDestroyed = true; | 229 m_beingDestroyed = true; |
| 247 | 230 |
| 248 // Make sure to destroy anonymous children first while they are still connec
ted to the rest of the tree, so that they will | 231 // Make sure to destroy anonymous children first while they are still connec
ted to the rest of the tree, so that they will |
| 249 // properly dirty line boxes that they are removed from. Effects that do :be
fore/:after only on hover could crash otherwise. | 232 // properly dirty line boxes that they are removed from. Effects that do :be
fore/:after only on hover could crash otherwise. |
| 250 children()->destroyLeftoverChildren(); | 233 children()->destroyLeftoverChildren(); |
| (...skipping 3710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3961 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 3944 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 3962 { | 3945 { |
| 3963 showRenderObject(); | 3946 showRenderObject(); |
| 3964 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 3947 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 3965 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 3948 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 3966 } | 3949 } |
| 3967 | 3950 |
| 3968 #endif | 3951 #endif |
| 3969 | 3952 |
| 3970 } // namespace blink | 3953 } // namespace blink |
| OLD | NEW |