Chromium Code Reviews| 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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 745 if (object->isInsideFlowThread()) | 745 if (object->isInsideFlowThread()) |
| 746 return false; | 746 return false; |
| 747 | 747 |
| 748 return true; | 748 return true; |
| 749 } | 749 } |
| 750 | 750 |
| 751 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay outScope* layouter) | 751 void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay outScope* layouter) |
| 752 { | 752 { |
| 753 ASSERT(!isSetNeedsLayoutForbidden()); | 753 ASSERT(!isSetNeedsLayoutForbidden()); |
| 754 ASSERT(!layouter || this != layouter->root()); | 754 ASSERT(!layouter || this != layouter->root()); |
| 755 // When we have a layouter, it means that we're in layout and we're marking | 755 // When we're in layout, we're marking a descendant as needing layout with |
| 756 // a descendant as needing layout with the intention of visiting it during | 756 // the intention of visiting it during this layout. We shouldn't be |
| 757 // this layout. We shouldn't be scheduling it to be laid out later. | 757 // scheduling it to be laid out later. |
| 758 ASSERT(!scheduleRelayout || !layouter); | 758 // Also, schedduleRelayout() must not be called while iterating |
|
cbiesinger
2016/04/26 02:04:30
scheddule -> schedule
| |
| 759 // FrameView::m_layoutSubtreeRootList. | |
| 760 scheduleRelayout &= !frameView()->isInPerformLayout(); | |
| 759 | 761 |
| 760 LayoutObject* object = container(); | 762 LayoutObject* object = container(); |
| 761 LayoutObject* last = this; | 763 LayoutObject* last = this; |
| 762 | 764 |
| 763 bool simplifiedNormalFlowLayout = needsSimplifiedNormalFlowLayout() && !self NeedsLayout() && !normalChildNeedsLayout(); | 765 bool simplifiedNormalFlowLayout = needsSimplifiedNormalFlowLayout() && !self NeedsLayout() && !normalChildNeedsLayout(); |
| 764 | 766 |
| 765 while (object) { | 767 while (object) { |
| 766 if (object->selfNeedsLayout()) | 768 if (object->selfNeedsLayout()) |
| 767 return; | 769 return; |
| 768 | 770 |
| (...skipping 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3685 const blink::LayoutObject* root = object1; | 3687 const blink::LayoutObject* root = object1; |
| 3686 while (root->parent()) | 3688 while (root->parent()) |
| 3687 root = root->parent(); | 3689 root = root->parent(); |
| 3688 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3690 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3689 } else { | 3691 } else { |
| 3690 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3692 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3691 } | 3693 } |
| 3692 } | 3694 } |
| 3693 | 3695 |
| 3694 #endif | 3696 #endif |
| OLD | NEW |