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

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

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutBoxModelObject.cpp » ('j') | 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) 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 4520 matching lines...) Expand 10 before | Expand all | Expand 10 after
4531 // FIXME: The table code should handle that automatically. If not, 4531 // FIXME: The table code should handle that automatically. If not,
4532 // we should fix it and remove the table part checks. 4532 // we should fix it and remove the table part checks.
4533 if (box->isTable()) { 4533 if (box->isTable()) {
4534 // Because we may have added some sections with already computed column structures, we need to 4534 // Because we may have added some sections with already computed column structures, we need to
4535 // sync the table structure with them now. This avoids crashes when addi ng new cells to the table. 4535 // sync the table structure with them now. This avoids crashes when addi ng new cells to the table.
4536 toLayoutTable(box)->forceSectionsRecalc(); 4536 toLayoutTable(box)->forceSectionsRecalc();
4537 } else if (box->isTableSection()) { 4537 } else if (box->isTableSection()) {
4538 toLayoutTableSection(box)->setNeedsCellRecalc(); 4538 toLayoutTableSection(box)->setNeedsCellRecalc();
4539 } 4539 }
4540 4540
4541 box->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 4541 box->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalid ationReason::AnonymousBlockChange);
4542 } 4542 }
4543 4543
4544 LayoutObject* LayoutBox::splitAnonymousBoxesAroundChild(LayoutObject* beforeChil d) 4544 LayoutObject* LayoutBox::splitAnonymousBoxesAroundChild(LayoutObject* beforeChil d)
4545 { 4545 {
4546 bool didSplitParentAnonymousBoxes = false; 4546 bool didSplitParentAnonymousBoxes = false;
4547 4547
4548 while (beforeChild->parent() != this) { 4548 while (beforeChild->parent() != this) {
4549 LayoutBox* boxToSplit = toLayoutBox(beforeChild->parent()); 4549 LayoutBox* boxToSplit = toLayoutBox(beforeChild->parent());
4550 if (boxToSplit->slowFirstChild() != beforeChild && boxToSplit->isAnonymo us()) { 4550 if (boxToSplit->slowFirstChild() != beforeChild && boxToSplit->isAnonymo us()) {
4551 didSplitParentAnonymousBoxes = true; 4551 didSplitParentAnonymousBoxes = true;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
4645 computedValues.m_margins.m_end = marginEnd(); 4645 computedValues.m_margins.m_end = marginEnd();
4646 4646
4647 setLogicalTop(oldLogicalTop); 4647 setLogicalTop(oldLogicalTop);
4648 setLogicalWidth(oldLogicalWidth); 4648 setLogicalWidth(oldLogicalWidth);
4649 setLogicalLeft(oldLogicalLeft); 4649 setLogicalLeft(oldLogicalLeft);
4650 setMarginLeft(oldMarginLeft); 4650 setMarginLeft(oldMarginLeft);
4651 setMarginRight(oldMarginRight); 4651 setMarginRight(oldMarginRight);
4652 } 4652 }
4653 4653
4654 } // namespace blink 4654 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698