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

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

Issue 2286543002: Add Length::isPercent and use it in tables. (Closed)
Patch Set: rebase Created 4 years, 3 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 // Table parts can't be relayout roots since the table is responsible for la youting all the parts. 698 // Table parts can't be relayout roots since the table is responsible for la youting all the parts.
699 if (object->isTablePart()) 699 if (object->isTablePart())
700 return false; 700 return false;
701 701
702 if (object->style()->containsLayout() && object->style()->containsSize()) 702 if (object->style()->containsLayout() && object->style()->containsSize())
703 return true; 703 return true;
704 704
705 if (!object->hasOverflowClip()) 705 if (!object->hasOverflowClip())
706 return false; 706 return false;
707 707
708 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().hasPercent()) 708 if (object->style()->width().isIntrinsicOrAuto() || object->style()->height( ).isIntrinsicOrAuto() || object->style()->height().isPercentOrCalc())
709 return false; 709 return false;
710 710
711 // Scrollbar parts can be removed during layout. Avoid the complexity of hav ing to deal with that. 711 // Scrollbar parts can be removed during layout. Avoid the complexity of hav ing to deal with that.
712 if (object->isLayoutScrollbarPart()) 712 if (object->isLayoutScrollbarPart())
713 return false; 713 return false;
714 714
715 // In general we can't relayout a flex item independently of its container; not only is the result 715 // In general we can't relayout a flex item independently of its container; not only is the result
716 // incorrect due to the override size that's set, it also messes with the ca ched main size on the flexbox. 716 // incorrect due to the override size that's set, it also messes with the ca ched main size on the flexbox.
717 if (object->isBox() && toLayoutBox(object)->isFlexItem()) 717 if (object->isBox() && toLayoutBox(object)->isFlexItem())
718 return false; 718 return false;
(...skipping 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after
3233 const blink::LayoutObject* root = object1; 3233 const blink::LayoutObject* root = object1;
3234 while (root->parent()) 3234 while (root->parent())
3235 root = root->parent(); 3235 root = root->parent();
3236 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3236 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3237 } else { 3237 } else {
3238 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3238 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3239 } 3239 }
3240 } 3240 }
3241 3241
3242 #endif 3242 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMenuList.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698