Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1906803002: Prevent markContainerChainForLayout to scheduleRelayout() if isInPerformLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: leviw/cbiesinger reviews Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698