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

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

Issue 2046813002: [css] Don't let table parts be layout boundaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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) 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 706
707 static inline bool objectIsRelayoutBoundary(const LayoutObject* object) 707 static inline bool objectIsRelayoutBoundary(const LayoutObject* object)
708 { 708 {
709 // FIXME: In future it may be possible to broaden these conditions in order to improve performance. 709 // FIXME: In future it may be possible to broaden these conditions in order to improve performance.
710 if (object->isTextControl()) 710 if (object->isTextControl())
711 return true; 711 return true;
712 712
713 if (object->isSVGRoot()) 713 if (object->isSVGRoot())
714 return true; 714 return true;
715 715
716 // Table parts can't be relayout roots since the table is responsible for la youting all the parts.
717 if (object->isTablePart())
718 return false;
719
716 if (object->style()->containsLayout() && object->style()->containsSize()) 720 if (object->style()->containsLayout() && object->style()->containsSize())
717 return true; 721 return true;
718 722
719 if (!object->hasOverflowClip()) 723 if (!object->hasOverflowClip())
720 return false; 724 return false;
721 725
722 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().hasPercent()) 726 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().hasPercent())
723 return false; 727 return false;
724 728
725 // Table parts can't be relayout roots since the table is responsible for la youting all the parts.
726 if (object->isTablePart())
727 return false;
728
729 // Scrollbar parts can be removed during layout. Avoid the complexity of hav ing to deal with that. 729 // Scrollbar parts can be removed during layout. Avoid the complexity of hav ing to deal with that.
730 if (object->isLayoutScrollbarPart()) 730 if (object->isLayoutScrollbarPart())
731 return false; 731 return false;
732 732
733 // Inside multicol it's generally problematic to allow relayout roots. The m ulticol container 733 // Inside multicol it's generally problematic to allow relayout roots. The m ulticol container
734 // itself may be scheduled for relayout as well (due to other changes that m ay have happened 734 // itself may be scheduled for relayout as well (due to other changes that m ay have happened
735 // since the previous layout pass), which might affect the column heights, w hich may affect how 735 // since the previous layout pass), which might affect the column heights, w hich may affect how
736 // this object breaks across columns). Spanners may also have been added or removed since the 736 // this object breaks across columns). Spanners may also have been added or removed since the
737 // previous layout pass, which is just another way of affecting the column h eights (and the 737 // previous layout pass, which is just another way of affecting the column h eights (and the
738 // number of rows). Instead of identifying cases where it's safe to allow re layout roots, just 738 // number of rows). Instead of identifying cases where it's safe to allow re layout roots, just
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
3687 const blink::LayoutObject* root = object1; 3687 const blink::LayoutObject* root = object1;
3688 while (root->parent()) 3688 while (root->parent())
3689 root = root->parent(); 3689 root = root->parent();
3690 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3690 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3691 } else { 3691 } else {
3692 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3692 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3693 } 3693 }
3694 } 3694 }
3695 3695
3696 #endif 3696 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698