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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 // this object breaks across columns). Spanners may also have been added or
removed since the | 752 // this object breaks across columns). Spanners may also have been added or
removed since the |
753 // previous layout pass, which is just another way of affecting the column h
eights (and the | 753 // previous layout pass, which is just another way of affecting the column h
eights (and the |
754 // number of rows). Instead of identifying cases where it's safe to allow re
layout roots, just | 754 // number of rows). Instead of identifying cases where it's safe to allow re
layout roots, just |
755 // disallow them inside multicol. | 755 // disallow them inside multicol. |
756 if (object->isInsideFlowThread()) | 756 if (object->isInsideFlowThread()) |
757 return false; | 757 return false; |
758 | 758 |
759 return true; | 759 return true; |
760 } | 760 } |
761 | 761 |
| 762 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout) |
| 763 { |
| 764 markContainerChainForLayout(scheduleRelayout, nullptr); |
| 765 } |
| 766 |
| 767 void LayoutObject::markContainerChainForLayout(SubtreeLayoutScope* layouter) |
| 768 { |
| 769 // When we have a layouter, it means that we're in layout and we're marking |
| 770 // a descendant as needing layout with the intention of visiting it during |
| 771 // this layout. We shouldn't be scheduling it to be laid out later. |
| 772 markContainerChainForLayout(!layouter, layouter); |
| 773 } |
| 774 |
762 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
outScope* layouter) | 775 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
outScope* layouter) |
763 { | 776 { |
764 ASSERT(!isSetNeedsLayoutForbidden()); | 777 ASSERT(!isSetNeedsLayoutForbidden()); |
765 ASSERT(!layouter || this != layouter->root()); | 778 ASSERT(!layouter || this != layouter->root()); |
| 779 ASSERT(!scheduleRelayout || !layouter); |
766 | 780 |
767 LayoutObject* object = container(); | 781 LayoutObject* object = container(); |
768 LayoutObject* last = this; | 782 LayoutObject* last = this; |
769 | 783 |
770 bool simplifiedNormalFlowLayout = needsSimplifiedNormalFlowLayout() && !self
NeedsLayout() && !normalChildNeedsLayout(); | 784 bool simplifiedNormalFlowLayout = needsSimplifiedNormalFlowLayout() && !self
NeedsLayout() && !normalChildNeedsLayout(); |
771 | 785 |
772 while (object) { | 786 while (object) { |
773 if (object->selfNeedsLayout()) | 787 if (object->selfNeedsLayout()) |
774 return; | 788 return; |
775 | 789 |
(...skipping 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3712 const blink::LayoutObject* root = object1; | 3726 const blink::LayoutObject* root = object1; |
3713 while (root->parent()) | 3727 while (root->parent()) |
3714 root = root->parent(); | 3728 root = root->parent(); |
3715 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3729 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3716 } else { | 3730 } else { |
3717 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3731 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3718 } | 3732 } |
3719 } | 3733 } |
3720 | 3734 |
3721 #endif | 3735 #endif |
OLD | NEW |