| 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 // When we have a layouter, it means that we're in layout and we're marking | 758 // When we have a layouter, it means that we're in layout and we're marking |
| 759 // a descendant as needing layout with the intention of visiting it during | 759 // a descendant as needing layout with the intention of visiting it during |
| 760 // this layout. We shouldn't be scheduling it to be laid out later. | 760 // this layout. We shouldn't be scheduling it to be laid out later. |
| 761 markContainerChainForLayout(!layouter, layouter); | 761 markContainerChainForLayout(!layouter, layouter); |
| 762 } | 762 } |
| 763 | 763 |
| 764 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
outScope* layouter) | 764 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
outScope* layouter) |
| 765 { | 765 { |
| 766 ASSERT(!isSetNeedsLayoutForbidden()); | 766 ASSERT(!isSetNeedsLayoutForbidden()); |
| 767 ASSERT(!layouter || this != layouter->root()); | 767 ASSERT(!layouter || this != layouter->root()); |
| 768 ASSERT(!scheduleRelayout || !layouter); | 768 // When we're in layout, we're marking a descendant as needing layout with |
| 769 // the intention of visiting it during this layout. We shouldn't be |
| 770 // scheduling it to be laid out later. |
| 771 // Also, scheduleRelayout() must not be called while iterating |
| 772 // FrameView::m_layoutSubtreeRootList. |
| 773 scheduleRelayout &= !frameView()->isInPerformLayout(); |
| 769 | 774 |
| 770 LayoutObject* object = container(); | 775 LayoutObject* object = container(); |
| 771 LayoutObject* last = this; | 776 LayoutObject* last = this; |
| 772 | 777 |
| 773 bool simplifiedNormalFlowLayout = needsSimplifiedNormalFlowLayout() && !self
NeedsLayout() && !normalChildNeedsLayout(); | 778 bool simplifiedNormalFlowLayout = needsSimplifiedNormalFlowLayout() && !self
NeedsLayout() && !normalChildNeedsLayout(); |
| 774 | 779 |
| 775 while (object) { | 780 while (object) { |
| 776 if (object->selfNeedsLayout()) | 781 if (object->selfNeedsLayout()) |
| 777 return; | 782 return; |
| 778 | 783 |
| (...skipping 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3679 const blink::LayoutObject* root = object1; | 3684 const blink::LayoutObject* root = object1; |
| 3680 while (root->parent()) | 3685 while (root->parent()) |
| 3681 root = root->parent(); | 3686 root = root->parent(); |
| 3682 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3687 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3683 } else { | 3688 } else { |
| 3684 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3689 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3685 } | 3690 } |
| 3686 } | 3691 } |
| 3687 | 3692 |
| 3688 #endif | 3693 #endif |
| OLD | NEW |