| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 appendImageIfNotNull(images, toImageContentData(contentData)->image()); | 209 appendImageIfNotNull(images, toImageContentData(contentData)->image()); |
| 210 if (blockStyle.boxReflect()) | 210 if (blockStyle.boxReflect()) |
| 211 appendImageIfNotNull(images, blockStyle.boxReflect()->mask().image()); | 211 appendImageIfNotNull(images, blockStyle.boxReflect()->mask().image()); |
| 212 appendImageIfNotNull(images, blockStyle.listStyleImage()); | 212 appendImageIfNotNull(images, blockStyle.listStyleImage()); |
| 213 appendImageIfNotNull(images, blockStyle.borderImageSource()); | 213 appendImageIfNotNull(images, blockStyle.borderImageSource()); |
| 214 appendImageIfNotNull(images, blockStyle.maskBoxImageSource()); | 214 appendImageIfNotNull(images, blockStyle.maskBoxImageSource()); |
| 215 if (blockStyle.shapeOutside()) | 215 if (blockStyle.shapeOutside()) |
| 216 appendImageIfNotNull(images, blockStyle.shapeOutside()->image()); | 216 appendImageIfNotNull(images, blockStyle.shapeOutside()->image()); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void RenderBlock::removeFromGlobalMaps() | 219 RenderBlock::~RenderBlock() |
| 220 { | 220 { |
| 221 if (hasColumns()) | 221 if (hasColumns()) |
| 222 gColumnInfoMap->take(this); | 222 gColumnInfoMap->take(this); |
| 223 if (gPercentHeightDescendantsMap) | 223 if (gPercentHeightDescendantsMap) |
| 224 removeBlockFromDescendantAndContainerMaps(this, gPercentHeightDescendant
sMap, gPercentHeightContainerMap); | 224 removeBlockFromDescendantAndContainerMaps(this, gPercentHeightDescendant
sMap, gPercentHeightContainerMap); |
| 225 if (gPositionedDescendantsMap) | 225 if (gPositionedDescendantsMap) |
| 226 removeBlockFromDescendantAndContainerMaps(this, gPositionedDescendantsMa
p, gPositionedContainerMap); | 226 removeBlockFromDescendantAndContainerMaps(this, gPositionedDescendantsMa
p, gPositionedContainerMap); |
| 227 } | 227 } |
| 228 | 228 |
| 229 RenderBlock::~RenderBlock() | |
| 230 { | |
| 231 #if !ENABLE(OILPAN) | |
| 232 removeFromGlobalMaps(); | |
| 233 #endif | |
| 234 } | |
| 235 | |
| 236 void RenderBlock::destroy() | |
| 237 { | |
| 238 RenderBox::destroy(); | |
| 239 #if ENABLE(OILPAN) | |
| 240 // RenderObject::removeChild called in destory() depends on gColumnInfoMap. | |
| 241 removeFromGlobalMaps(); | |
| 242 #endif | |
| 243 } | |
| 244 | |
| 245 void RenderBlock::willBeDestroyed() | 229 void RenderBlock::willBeDestroyed() |
| 246 { | 230 { |
| 247 // Mark as being destroyed to avoid trouble with merges in removeChild(). | 231 // Mark as being destroyed to avoid trouble with merges in removeChild(). |
| 248 m_beingDestroyed = true; | 232 m_beingDestroyed = true; |
| 249 | 233 |
| 250 // Make sure to destroy anonymous children first while they are still connec
ted to the rest of the tree, so that they will | 234 // Make sure to destroy anonymous children first while they are still connec
ted to the rest of the tree, so that they will |
| 251 // properly dirty line boxes that they are removed from. Effects that do :be
fore/:after only on hover could crash otherwise. | 235 // properly dirty line boxes that they are removed from. Effects that do :be
fore/:after only on hover could crash otherwise. |
| 252 children()->destroyLeftoverChildren(); | 236 children()->destroyLeftoverChildren(); |
| 253 | 237 |
| 254 // Destroy our continuation before anything other than anonymous children. | 238 // Destroy our continuation before anything other than anonymous children. |
| (...skipping 4594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4849 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4833 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 4850 { | 4834 { |
| 4851 showRenderObject(); | 4835 showRenderObject(); |
| 4852 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4836 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 4853 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4837 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 4854 } | 4838 } |
| 4855 | 4839 |
| 4856 #endif | 4840 #endif |
| 4857 | 4841 |
| 4858 } // namespace blink | 4842 } // namespace blink |
| OLD | NEW |