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

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

Issue 2216903004: [css-flexbox] Correctly implement contain: size on a flex item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 4 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/layout/LayoutFlexibleBox.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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 if (!object->hasOverflowClip()) 703 if (!object->hasOverflowClip())
704 return false; 704 return false;
705 705
706 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().hasPercent()) 706 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().hasPercent())
707 return false; 707 return false;
708 708
709 // Scrollbar parts can be removed during layout. Avoid the complexity of hav ing to deal with that. 709 // Scrollbar parts can be removed during layout. Avoid the complexity of hav ing to deal with that.
710 if (object->isLayoutScrollbarPart()) 710 if (object->isLayoutScrollbarPart())
711 return false; 711 return false;
712 712
713 // In general we can't relayout a flex item independently of its container; not only is the result
714 // incorrect due to the override size that's set, it also messes with the ca ched main size on the flexbox.
715 if (object->isBox() && toLayoutBox(object)->isFlexItem())
716 return false;
717
713 // Inside multicol it's generally problematic to allow relayout roots. The m ulticol container 718 // Inside multicol it's generally problematic to allow relayout roots. The m ulticol container
714 // itself may be scheduled for relayout as well (due to other changes that m ay have happened 719 // itself may be scheduled for relayout as well (due to other changes that m ay have happened
715 // since the previous layout pass), which might affect the column heights, w hich may affect how 720 // since the previous layout pass), which might affect the column heights, w hich may affect how
716 // this object breaks across columns). Spanners may also have been added or removed since the 721 // this object breaks across columns). Spanners may also have been added or removed since the
717 // previous layout pass, which is just another way of affecting the column h eights (and the 722 // previous layout pass, which is just another way of affecting the column h eights (and the
718 // number of rows). Instead of identifying cases where it's safe to allow re layout roots, just 723 // number of rows). Instead of identifying cases where it's safe to allow re layout roots, just
719 // disallow them inside multicol. 724 // disallow them inside multicol.
720 if (object->isInsideFlowThread()) 725 if (object->isInsideFlowThread())
721 return false; 726 return false;
722 727
(...skipping 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after
3645 const blink::LayoutObject* root = object1; 3650 const blink::LayoutObject* root = object1;
3646 while (root->parent()) 3651 while (root->parent())
3647 root = root->parent(); 3652 root = root->parent();
3648 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3653 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3649 } else { 3654 } else {
3650 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3655 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3651 } 3656 }
3652 } 3657 }
3653 3658
3654 #endif 3659 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698