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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
604 if (LayoutState* layoutState = view()->layoutState()) { | 604 if (LayoutState* layoutState = view()->layoutState()) { |
605 if (LayoutFlowThread* flowThread = layoutState->flowThread()) | 605 if (LayoutFlowThread* flowThread = layoutState->flowThread()) |
606 return flowThread; | 606 return flowThread; |
607 } | 607 } |
608 | 608 |
609 // Not in the middle of layout so have to find the thread the slow way. | 609 // Not in the middle of layout so have to find the thread the slow way. |
610 LayoutObject* curr = const_cast<LayoutObject*>(this); | 610 LayoutObject* curr = const_cast<LayoutObject*>(this); |
611 while (curr) { | 611 while (curr) { |
612 if (curr->isLayoutFlowThread()) | 612 if (curr->isLayoutFlowThread()) |
613 return toLayoutFlowThread(curr); | 613 return toLayoutFlowThread(curr); |
614 curr = curr->containingBlock(); | 614 LayoutObject* containingBlock = curr->containingBlock(); |
615 curr = curr->parent(); | |
616 while (curr != containingBlock) { | |
617 if (curr->isLayoutFlowThread()) { | |
618 // The nearest ancestor flow thread isn't in our containing bloc k chain. Then we | |
619 // aren't really part of any flow thread, and we should stop loo king. This happens | |
620 // when there are out-of-flow objects or column spanners. | |
621 return 0; | |
dsinclair
2015/04/27 14:45:24
nit: nullptr
mstensho (USE GERRIT)
2015/04/27 16:08:26
Done.
Fixed the one a few lines below this one as
| |
622 } | |
623 curr = curr->parent(); | |
624 } | |
615 } | 625 } |
616 return 0; | 626 return 0; |
617 } | 627 } |
618 | 628 |
619 // FIXME: This could be used when changing the size of a renderer without childr en to skip some invalidations. | 629 // FIXME: This could be used when changing the size of a renderer without childr en to skip some invalidations. |
620 // FIXME: This is incorrect for document element. Remove this when we enable sli mming paint. | 630 // FIXME: This is incorrect for document element. Remove this when we enable sli mming paint. |
621 static inline bool rendererHasNoBoxEffectObsolete(const LayoutObject& object) | 631 static inline bool rendererHasNoBoxEffectObsolete(const LayoutObject& object) |
622 { | 632 { |
623 return !object.style()->hasVisualOverflowingEffect() && !object.style()->has Border() && !object.style()->hasBackground(); | 633 return !object.style()->hasVisualOverflowingEffect() && !object.style()->has Border() && !object.style()->hasBackground(); |
624 } | 634 } |
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2455 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { | 2465 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { |
2456 if (!layer) | 2466 if (!layer) |
2457 layer = parent()->enclosingLayer(); | 2467 layer = parent()->enclosingLayer(); |
2458 if (layer) | 2468 if (layer) |
2459 layer->dirtyVisibleContentStatus(); | 2469 layer->dirtyVisibleContentStatus(); |
2460 } | 2470 } |
2461 | 2471 |
2462 if (!isFloating() && parent()->childrenInline()) | 2472 if (!isFloating() && parent()->childrenInline()) |
2463 parent()->dirtyLinesFromChangedChild(this); | 2473 parent()->dirtyLinesFromChangedChild(this); |
2464 | 2474 |
2465 if (LayoutFlowThread* flowThread = parent()->flowThreadContainingBlock()) | 2475 if (LayoutFlowThread* flowThread = flowThreadContainingBlock()) |
2466 flowThread->flowThreadDescendantWasInserted(this); | 2476 flowThread->flowThreadDescendantWasInserted(this); |
2467 } | 2477 } |
2468 | 2478 |
2469 void LayoutObject::willBeRemovedFromTree() | 2479 void LayoutObject::willBeRemovedFromTree() |
2470 { | 2480 { |
2471 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first. | 2481 // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removal s which would need to be fixed first. |
2472 | 2482 |
2473 // If we remove a visible child from an invisible parent, we don't know the layer visibility any more. | 2483 // If we remove a visible child from an invisible parent, we don't know the layer visibility any more. |
2474 DeprecatedPaintLayer* layer = 0; | 2484 DeprecatedPaintLayer* layer = 0; |
2475 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { | 2485 if (parent()->style()->visibility() != VISIBLE && style()->visibility() == V ISIBLE && !hasLayer()) { |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3294 { | 3304 { |
3295 if (object1) { | 3305 if (object1) { |
3296 const blink::LayoutObject* root = object1; | 3306 const blink::LayoutObject* root = object1; |
3297 while (root->parent()) | 3307 while (root->parent()) |
3298 root = root->parent(); | 3308 root = root->parent(); |
3299 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3309 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3300 } | 3310 } |
3301 } | 3311 } |
3302 | 3312 |
3303 #endif | 3313 #endif |
OLD | NEW |