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

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

Issue 1551573002: Clear box from percentage descendants when it is split off from the ancestor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 4 years, 11 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
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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 4676 matching lines...) Expand 10 before | Expand all | Expand 10 after
4687 // We need to invalidate the |parentBox| before inserting the new no de 4687 // We need to invalidate the |parentBox| before inserting the new no de
4688 // so that the table paint invalidation logic knows the structure is dirty. 4688 // so that the table paint invalidation logic knows the structure is dirty.
4689 // See for example LayoutTableCell:clippedOverflowRectForPaintInvali dation. 4689 // See for example LayoutTableCell:clippedOverflowRectForPaintInvali dation.
4690 markBoxForRelayoutAfterSplit(parentBox); 4690 markBoxForRelayoutAfterSplit(parentBox);
4691 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo xToSplit->nextSibling()); 4691 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo xToSplit->nextSibling());
4692 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true); 4692 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true);
4693 4693
4694 markBoxForRelayoutAfterSplit(boxToSplit); 4694 markBoxForRelayoutAfterSplit(boxToSplit);
4695 markBoxForRelayoutAfterSplit(postBox); 4695 markBoxForRelayoutAfterSplit(postBox);
4696 4696
4697 // Splitting the box means the left side of the container chain will lose any percent height descendants
4698 // below |postBox| in the right hand side.
4699 if (LayoutBlock::hasPercentHeightContainerMap())
4700 LayoutBlock::clearPercentHeightDescendantsFrom(postBox);
mstensho (USE GERRIT) 2016/01/25 09:17:07 This will process the entire postBox subtree, whic
rhogan 2016/01/25 19:14:55 :$ Updated this and the test. Thanks.
4701
4697 beforeChild = postBox; 4702 beforeChild = postBox;
4698 } else { 4703 } else {
4699 beforeChild = boxToSplit; 4704 beforeChild = boxToSplit;
4700 } 4705 }
4701 } 4706 }
4702 4707
4703 if (didSplitParentAnonymousBoxes) 4708 if (didSplitParentAnonymousBoxes)
4704 markBoxForRelayoutAfterSplit(this); 4709 markBoxForRelayoutAfterSplit(this);
4705 4710
4706 ASSERT(beforeChild->parent() == this); 4711 ASSERT(beforeChild->parent() == this);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
4904 } 4909 }
4905 4910
4906 void LayoutBox::clearPreviousPaintInvalidationRects() 4911 void LayoutBox::clearPreviousPaintInvalidationRects()
4907 { 4912 {
4908 LayoutBoxModelObject::clearPreviousPaintInvalidationRects(); 4913 LayoutBoxModelObject::clearPreviousPaintInvalidationRects();
4909 if (PaintLayerScrollableArea* scrollableArea = this->scrollableArea()) 4914 if (PaintLayerScrollableArea* scrollableArea = this->scrollableArea())
4910 scrollableArea->clearPreviousPaintInvalidationRects(); 4915 scrollableArea->clearPreviousPaintInvalidationRects();
4911 } 4916 }
4912 4917
4913 } // namespace blink 4918 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698