Chromium Code Reviews| 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 RenderBlock::~RenderBlock() | 219 void RenderBlock::removeFromGlobalMaps() |
| 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(); | |
|
haraken
2014/08/12 08:08:15
Can't we call removeFromGlobalMaps() in destroy()
tkent
2014/08/12 08:37:51
We can't. |this| is deleted in destroy().
| |
| 233 #endif | |
| 234 } | |
| 235 | |
| 236 void RenderBlock::destroy() | |
| 237 { | |
| 238 RenderBox::destroy(); | |
|
haraken
2014/08/12 08:08:15
Nit: Make the destroy call to the parent class a t
tkent
2014/08/12 08:37:51
We can't do it. destroy() depends on the global m
haraken
2014/08/12 08:47:00
I understand what's going on. Then it seems to me
| |
| 239 #if ENABLE(OILPAN) | |
| 240 // RenderObject::removeChild called in destory() depends on gColumnInfoMap. | |
| 241 removeFromGlobalMaps(); | |
| 242 #endif | |
| 243 } | |
| 244 | |
| 229 void RenderBlock::willBeDestroyed() | 245 void RenderBlock::willBeDestroyed() |
| 230 { | 246 { |
| 231 // Mark as being destroyed to avoid trouble with merges in removeChild(). | 247 // Mark as being destroyed to avoid trouble with merges in removeChild(). |
| 232 m_beingDestroyed = true; | 248 m_beingDestroyed = true; |
| 233 | 249 |
| 234 // Make sure to destroy anonymous children first while they are still connec ted to the rest of the tree, so that they will | 250 // Make sure to destroy anonymous children first while they are still connec ted to the rest of the tree, so that they will |
| 235 // properly dirty line boxes that they are removed from. Effects that do :be fore/:after only on hover could crash otherwise. | 251 // properly dirty line boxes that they are removed from. Effects that do :be fore/:after only on hover could crash otherwise. |
| 236 children()->destroyLeftoverChildren(); | 252 children()->destroyLeftoverChildren(); |
| 237 | 253 |
| 238 // Destroy our continuation before anything other than anonymous children. | 254 // Destroy our continuation before anything other than anonymous children. |
| (...skipping 4594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4833 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const | 4849 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const |
| 4834 { | 4850 { |
| 4835 showRenderObject(); | 4851 showRenderObject(); |
| 4836 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 4852 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) |
| 4837 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 4853 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); |
| 4838 } | 4854 } |
| 4839 | 4855 |
| 4840 #endif | 4856 #endif |
| 4841 | 4857 |
| 4842 } // namespace blink | 4858 } // namespace blink |
| OLD | NEW |