| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 return !isTable(); | 317 return !isTable(); |
| 318 else if (newChild->isTableSection()) | 318 else if (newChild->isTableSection()) |
| 319 return !isTable(); | 319 return !isTable(); |
| 320 else if (newChild->isTableRow()) | 320 else if (newChild->isTableRow()) |
| 321 return !isTableSection(); | 321 return !isTableSection(); |
| 322 else if (newChild->isTableCell()) | 322 else if (newChild->isTableCell()) |
| 323 return !isTableRow(); | 323 return !isTableRow(); |
| 324 return false; | 324 return false; |
| 325 } | 325 } |
| 326 | 326 |
| 327 bool RenderObject::isValidColumnSpanAll() const |
| 328 { |
| 329 ASSERT(style()->columnSpan() == ColumnSpanAll); |
| 330 RenderFlowThread* flowThread = flowThreadContainingBlock(); |
| 331 return flowThread && flowThread->isColumnSpanner(this); |
| 332 } |
| 333 |
| 327 void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild) | 334 void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild) |
| 328 { | 335 { |
| 329 ASSERT(isAllowedToModifyRenderTreeStructure(document())); | 336 ASSERT(isAllowedToModifyRenderTreeStructure(document())); |
| 330 | 337 |
| 331 RenderObjectChildList* children = virtualChildren(); | 338 RenderObjectChildList* children = virtualChildren(); |
| 332 ASSERT(children); | 339 ASSERT(children); |
| 333 if (!children) | 340 if (!children) |
| 334 return; | 341 return; |
| 335 | 342 |
| 336 if (requiresAnonymousTableWrappers(newChild)) { | 343 if (requiresAnonymousTableWrappers(newChild)) { |
| (...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2384 // that needs to be drawn and layer visibility optimization can't be used | 2391 // that needs to be drawn and layer visibility optimization can't be used |
| 2385 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V
ISIBLE && !hasLayer()) { | 2392 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V
ISIBLE && !hasLayer()) { |
| 2386 if (!layer) | 2393 if (!layer) |
| 2387 layer = parent()->enclosingLayer(); | 2394 layer = parent()->enclosingLayer(); |
| 2388 if (layer) | 2395 if (layer) |
| 2389 layer->dirtyVisibleContentStatus(); | 2396 layer->dirtyVisibleContentStatus(); |
| 2390 } | 2397 } |
| 2391 | 2398 |
| 2392 if (!isFloating() && parent()->childrenInline()) | 2399 if (!isFloating() && parent()->childrenInline()) |
| 2393 parent()->dirtyLinesFromChangedChild(this); | 2400 parent()->dirtyLinesFromChangedChild(this); |
| 2401 |
| 2402 if (RenderFlowThread* flowThread = parent()->flowThreadContainingBlock()) |
| 2403 flowThread->flowThreadDescendantInserted(this); |
| 2394 } | 2404 } |
| 2395 | 2405 |
| 2396 void RenderObject::willBeRemovedFromTree() | 2406 void RenderObject::willBeRemovedFromTree() |
| 2397 { | 2407 { |
| 2398 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal
s which would need to be fixed first. | 2408 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal
s which would need to be fixed first. |
| 2399 | 2409 |
| 2400 // If we remove a visible child from an invisible parent, we don't know the
layer visibility any more. | 2410 // If we remove a visible child from an invisible parent, we don't know the
layer visibility any more. |
| 2401 RenderLayer* layer = 0; | 2411 RenderLayer* layer = 0; |
| 2402 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V
ISIBLE && !hasLayer()) { | 2412 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V
ISIBLE && !hasLayer()) { |
| 2403 layer = parent()->enclosingLayer(); | 2413 layer = parent()->enclosingLayer(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2434 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock()); | 2444 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock()); |
| 2435 } | 2445 } |
| 2436 | 2446 |
| 2437 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF
lowThread) | 2447 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF
lowThread) |
| 2438 { | 2448 { |
| 2439 if (const RenderObjectChildList* children = virtualChildren()) { | 2449 if (const RenderObjectChildList* children = virtualChildren()) { |
| 2440 for (RenderObject* child = children->firstChild(); child; child = child-
>nextSibling()) | 2450 for (RenderObject* child = children->firstChild(); child; child = child-
>nextSibling()) |
| 2441 child->removeFromRenderFlowThreadRecursive(renderFlowThread); | 2451 child->removeFromRenderFlowThreadRecursive(renderFlowThread); |
| 2442 } | 2452 } |
| 2443 | 2453 |
| 2454 if (renderFlowThread && renderFlowThread != this) |
| 2455 renderFlowThread->flowThreadDescendantWillBeRemoved(this); |
| 2444 setFlowThreadState(NotInsideFlowThread); | 2456 setFlowThreadState(NotInsideFlowThread); |
| 2445 } | 2457 } |
| 2446 | 2458 |
| 2447 void RenderObject::destroyAndCleanupAnonymousWrappers() | 2459 void RenderObject::destroyAndCleanupAnonymousWrappers() |
| 2448 { | 2460 { |
| 2449 // If the tree is destroyed, there is no need for a clean-up phase. | 2461 // If the tree is destroyed, there is no need for a clean-up phase. |
| 2450 if (documentBeingDestroyed()) { | 2462 if (documentBeingDestroyed()) { |
| 2451 destroy(); | 2463 destroy(); |
| 2452 return; | 2464 return; |
| 2453 } | 2465 } |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3173 { | 3185 { |
| 3174 if (object1) { | 3186 if (object1) { |
| 3175 const blink::RenderObject* root = object1; | 3187 const blink::RenderObject* root = object1; |
| 3176 while (root->parent()) | 3188 while (root->parent()) |
| 3177 root = root->parent(); | 3189 root = root->parent(); |
| 3178 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3190 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3179 } | 3191 } |
| 3180 } | 3192 } |
| 3181 | 3193 |
| 3182 #endif | 3194 #endif |
| OLD | NEW |