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

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

Issue 1530303003: Implement Layout Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to Ahem. Created 4 years, 9 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 725
726 static inline bool objectIsRelayoutBoundary(const LayoutObject* object) 726 static inline bool objectIsRelayoutBoundary(const LayoutObject* object)
727 { 727 {
728 // FIXME: In future it may be possible to broaden these conditions in order to improve performance. 728 // FIXME: In future it may be possible to broaden these conditions in order to improve performance.
729 if (object->isTextControl()) 729 if (object->isTextControl())
730 return true; 730 return true;
731 731
732 if (object->isSVGRoot()) 732 if (object->isSVGRoot())
733 return true; 733 return true;
734 734
735 if (object->style()->containsLayout())
736 return true;
737
735 if (!object->hasOverflowClip()) 738 if (!object->hasOverflowClip())
736 return false; 739 return false;
737 740
738 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().hasPercent()) 741 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().hasPercent())
739 return false; 742 return false;
740 743
741 // Table parts can't be relayout roots since the table is responsible for la youting all the parts. 744 // Table parts can't be relayout roots since the table is responsible for la youting all the parts.
742 if (object->isTablePart()) 745 if (object->isTablePart())
743 return false; 746 return false;
744 747
(...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after
3639 const blink::LayoutObject* root = object1; 3642 const blink::LayoutObject* root = object1;
3640 while (root->parent()) 3643 while (root->parent())
3641 root = root->parent(); 3644 root = root->parent();
3642 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3645 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3643 } else { 3646 } else {
3644 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3647 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3645 } 3648 }
3646 } 3649 }
3647 3650
3648 #endif 3651 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698