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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 if (!object->hasOverflowClip()) | 735 if (!object->hasOverflowClip()) |
736 return false; | 736 return false; |
737 | 737 |
738 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height(
).isIntrinsicOrAuto() || object->style()->height().hasPercent()) | 738 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height(
).isIntrinsicOrAuto() || object->style()->height().hasPercent()) |
739 return false; | 739 return false; |
740 | 740 |
741 // Table parts can't be relayout roots since the table is responsible for la
youting all the parts. | 741 // Table parts can't be relayout roots since the table is responsible for la
youting all the parts. |
742 if (object->isTablePart()) | 742 if (object->isTablePart()) |
743 return false; | 743 return false; |
744 | 744 |
| 745 // Inside multicol it's generally problematic to allow relayout roots. The m
ulticol container |
| 746 // itself may be scheduled for relayout as well (due to other changes that m
ay have happened |
| 747 // since the previous layout pass), which might affect the column heights, w
hich may affect how |
| 748 // this object breaks across columns). Spanners may also have been added or
removed since the |
| 749 // previous layout pass, which is just another way of affecting the column h
eights (and the |
| 750 // number of rows). Instead of identifying cases where it's safe to allow re
layout roots, just |
| 751 // disallow them inside multicol. |
| 752 if (object->isInsideFlowThread()) |
| 753 return false; |
| 754 |
745 return true; | 755 return true; |
746 } | 756 } |
747 | 757 |
748 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
outScope* layouter) | 758 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
outScope* layouter) |
749 { | 759 { |
750 ASSERT(!isSetNeedsLayoutForbidden()); | 760 ASSERT(!isSetNeedsLayoutForbidden()); |
751 ASSERT(!layouter || this != layouter->root()); | 761 ASSERT(!layouter || this != layouter->root()); |
752 | 762 |
753 LayoutObject* object = container(); | 763 LayoutObject* object = container(); |
754 LayoutObject* last = this; | 764 LayoutObject* last = this; |
(...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3367 const blink::LayoutObject* root = object1; | 3377 const blink::LayoutObject* root = object1; |
3368 while (root->parent()) | 3378 while (root->parent()) |
3369 root = root->parent(); | 3379 root = root->parent(); |
3370 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3380 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3371 } else { | 3381 } else { |
3372 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3382 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3373 } | 3383 } |
3374 } | 3384 } |
3375 | 3385 |
3376 #endif | 3386 #endif |
OLD | NEW |