| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2393 | 2393 |
| 2394 void RenderObject::removeFromRenderFlowThread() | 2394 void RenderObject::removeFromRenderFlowThread() |
| 2395 { | 2395 { |
| 2396 if (flowThreadState() == NotInsideFlowThread) | 2396 if (flowThreadState() == NotInsideFlowThread) |
| 2397 return; | 2397 return; |
| 2398 | 2398 |
| 2399 // Sometimes we remove the element from the flow, but it's not destroyed at
that time. | 2399 // Sometimes we remove the element from the flow, but it's not destroyed at
that time. |
| 2400 // It's only until later when we actually destroy it and remove all the chil
dren from it. | 2400 // It's only until later when we actually destroy it and remove all the chil
dren from it. |
| 2401 // Currently, that happens for firstLetter elements and list markers. | 2401 // Currently, that happens for firstLetter elements and list markers. |
| 2402 // Pass in the flow thread so that we don't have to look it up for all the c
hildren. | 2402 // Pass in the flow thread so that we don't have to look it up for all the c
hildren. |
| 2403 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock()); | 2403 // If we're a column spanner, we need to use our parent to find the flow thr
ead, since a spanner |
| 2404 // doesn't have the flow thread in its containing block chain. We still need
to notify the flow |
| 2405 // thread when the renderer removed happens to be a spanner, so that we get
rid of the spanner |
| 2406 // placeholder, and column sets around the placeholder get merged. |
| 2407 RenderFlowThread* flowThread = isColumnSpanAll() ? parent()->flowThreadConta
iningBlock() : flowThreadContainingBlock(); |
| 2408 removeFromRenderFlowThreadRecursive(flowThread); |
| 2404 } | 2409 } |
| 2405 | 2410 |
| 2406 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF
lowThread) | 2411 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF
lowThread) |
| 2407 { | 2412 { |
| 2408 if (const RenderObjectChildList* children = virtualChildren()) { | 2413 if (const RenderObjectChildList* children = virtualChildren()) { |
| 2409 for (RenderObject* child = children->firstChild(); child; child = child-
>nextSibling()) | 2414 for (RenderObject* child = children->firstChild(); child; child = child-
>nextSibling()) |
| 2410 child->removeFromRenderFlowThreadRecursive(renderFlowThread); | 2415 child->removeFromRenderFlowThreadRecursive(renderFlowThread); |
| 2411 } | 2416 } |
| 2412 | 2417 |
| 2413 if (renderFlowThread && renderFlowThread != this) | 2418 if (renderFlowThread && renderFlowThread != this) |
| 2414 renderFlowThread->flowThreadDescendantWillBeRemoved(this); | 2419 renderFlowThread->flowThreadDescendantWillBeRemoved(this); |
| 2415 setFlowThreadState(NotInsideFlowThread); | 2420 setFlowThreadState(NotInsideFlowThread); |
| 2421 RELEASE_ASSERT(!spannerPlaceholder()); |
| 2416 } | 2422 } |
| 2417 | 2423 |
| 2418 void RenderObject::destroyAndCleanupAnonymousWrappers() | 2424 void RenderObject::destroyAndCleanupAnonymousWrappers() |
| 2419 { | 2425 { |
| 2420 // If the tree is destroyed, there is no need for a clean-up phase. | 2426 // If the tree is destroyed, there is no need for a clean-up phase. |
| 2421 if (documentBeingDestroyed()) { | 2427 if (documentBeingDestroyed()) { |
| 2422 destroy(); | 2428 destroy(); |
| 2423 return; | 2429 return; |
| 2424 } | 2430 } |
| 2425 | 2431 |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3148 { | 3154 { |
| 3149 if (object1) { | 3155 if (object1) { |
| 3150 const blink::RenderObject* root = object1; | 3156 const blink::RenderObject* root = object1; |
| 3151 while (root->parent()) | 3157 while (root->parent()) |
| 3152 root = root->parent(); | 3158 root = root->parent(); |
| 3153 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3159 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3154 } | 3160 } |
| 3155 } | 3161 } |
| 3156 | 3162 |
| 3157 #endif | 3163 #endif |
| OLD | NEW |