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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 void RenderBox::willBeDestroyed() | 196 void RenderBox::willBeDestroyed() |
197 { | 197 { |
198 clearOverrideSize(); | 198 clearOverrideSize(); |
199 | 199 |
200 if (style() && (style()->logicalHeight().isPercent() || style()->logicalMinH
eight().isPercent() || style()->logicalMaxHeight().isPercent())) | 200 if (style() && (style()->logicalHeight().isPercent() || style()->logicalMinH
eight().isPercent() || style()->logicalMaxHeight().isPercent())) |
201 RenderBlock::removePercentHeightDescendant(this); | 201 RenderBlock::removePercentHeightDescendant(this); |
202 | 202 |
203 // If this renderer is owning renderer for the frameview's custom scrollbars
, | |
204 // we need to clear it from the scrollbar. See webkit bug 64737. | |
205 if (style() && style()->hasPseudoStyle(SCROLLBAR) && frame() && frame()->vie
w()) | |
206 frame()->view()->clearOwningRendererForCustomScrollbars(this); | |
207 | |
208 // If the following assertion fails, logicalHeight()/logicalMinHeight()/ | 203 // If the following assertion fails, logicalHeight()/logicalMinHeight()/ |
209 // logicalMaxHeight() values are changed from a percent value to a non-perce
nt | 204 // logicalMaxHeight() values are changed from a percent value to a non-perce
nt |
210 // value during laying out. It causes a use-after-free bug. | 205 // value during laying out. It causes a use-after-free bug. |
211 ASSERT(!RenderBlock::hasPercentHeightDescendant(this)); | 206 ASSERT(!RenderBlock::hasPercentHeightDescendant(this)); |
212 | 207 |
213 RenderBoxModelObject::willBeDestroyed(); | 208 RenderBoxModelObject::willBeDestroyed(); |
214 } | 209 } |
215 | 210 |
216 void RenderBox::removeFloatingOrPositionedChildFromBlockLists() | 211 void RenderBox::removeFloatingOrPositionedChildFromBlockLists() |
217 { | 212 { |
(...skipping 3277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3495 RenderBlock* containerBlock = containingBlock(); | 3490 RenderBlock* containerBlock = containingBlock(); |
3496 if (!containerBlock || containerBlock == this) | 3491 if (!containerBlock || containerBlock == this) |
3497 return locationOffset(); | 3492 return locationOffset(); |
3498 | 3493 |
3499 IntRect rect(frameRect()); | 3494 IntRect rect(frameRect()); |
3500 containerBlock->flipForWritingMode(rect); // FIXME: This is wrong if we are
an absolutely positioned object enclosed by a relative-positioned inline. | 3495 containerBlock->flipForWritingMode(rect); // FIXME: This is wrong if we are
an absolutely positioned object enclosed by a relative-positioned inline. |
3501 return IntSize(rect.x(), rect.y()); | 3496 return IntSize(rect.x(), rect.y()); |
3502 } | 3497 } |
3503 | 3498 |
3504 } // namespace WebCore | 3499 } // namespace WebCore |
OLD | NEW |