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

Side by Side Diff: Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

Issue 10915102: Merge 125635 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/rendering/EllipsisBox.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 * This file is part of the render object implementation for KHTML. 2 * This file is part of the render object implementation for KHTML.
3 * 3 *
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) 5 * (C) 1999 Antti Koivisto (koivisto@kde.org)
6 * Copyright (C) 2003 Apple Computer, Inc. 6 * Copyright (C) 2003 Apple Computer, Inc.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 setHeight(oldHeight); 878 setHeight(oldHeight);
879 } 879 }
880 880
881 void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool relayoutChildren) 881 void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool relayoutChildren)
882 { 882 {
883 int maxLineCount = 0; 883 int maxLineCount = 0;
884 for (RenderBox* child = iterator.first(); child; child = iterator.next()) { 884 for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
885 if (childDoesNotAffectWidthOrFlexing(child)) 885 if (childDoesNotAffectWidthOrFlexing(child))
886 continue; 886 continue;
887 887
888 child->clearOverrideSize();
888 if (relayoutChildren || (child->isReplaced() && (child->style()->width() .isPercent() || child->style()->height().isPercent())) 889 if (relayoutChildren || (child->isReplaced() && (child->style()->width() .isPercent() || child->style()->height().isPercent()))
889 || (child->style()->height().isAuto() && child->isBlockFlow())) { 890 || (child->style()->height().isAuto() && child->isBlockFlow())) {
890 child->setChildNeedsLayout(true, MarkOnlyThis); 891 child->setChildNeedsLayout(true, MarkOnlyThis);
891 892
892 // Dirty all the positioned objects. 893 // Dirty all the positioned objects.
893 if (child->isRenderBlock()) { 894 if (child->isRenderBlock()) {
894 toRenderBlock(child)->markPositionedObjectsForLayout(); 895 toRenderBlock(child)->markPositionedObjectsForLayout();
895 toRenderBlock(child)->clearTruncation(); 896 toRenderBlock(child)->clearTruncation();
896 } 897 }
897 } 898 }
(...skipping 20 matching lines...) Expand all
918 919
919 LayoutUnit newHeight = blockChild->heightForLineCount(numVisibleLines); 920 LayoutUnit newHeight = blockChild->heightForLineCount(numVisibleLines);
920 if (newHeight == child->height()) 921 if (newHeight == child->height())
921 continue; 922 continue;
922 923
923 child->setChildNeedsLayout(true, MarkOnlyThis); 924 child->setChildNeedsLayout(true, MarkOnlyThis);
924 child->setOverrideLogicalContentHeight(newHeight - child->borderAndPaddi ngHeight()); 925 child->setOverrideLogicalContentHeight(newHeight - child->borderAndPaddi ngHeight());
925 m_flexingChildren = true; 926 m_flexingChildren = true;
926 child->layoutIfNeeded(); 927 child->layoutIfNeeded();
927 m_flexingChildren = false; 928 m_flexingChildren = false;
928 child->clearOverrideSize();
929 929
930 // FIXME: For now don't support RTL. 930 // FIXME: For now don't support RTL.
931 if (style()->direction() != LTR) 931 if (style()->direction() != LTR)
932 continue; 932 continue;
933 933
934 // Get the last line 934 // Get the last line
935 RootInlineBox* lastLine = blockChild->lineAtIndex(lineCount - 1); 935 RootInlineBox* lastLine = blockChild->lineAtIndex(lineCount - 1);
936 if (!lastLine) 936 if (!lastLine)
937 continue; 937 continue;
938 938
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 } 981 }
982 } 982 }
983 983
984 void RenderDeprecatedFlexibleBox::clearLineClamp() 984 void RenderDeprecatedFlexibleBox::clearLineClamp()
985 { 985 {
986 FlexBoxIterator iterator(this); 986 FlexBoxIterator iterator(this);
987 for (RenderBox* child = iterator.first(); child; child = iterator.next()) { 987 for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
988 if (childDoesNotAffectWidthOrFlexing(child)) 988 if (childDoesNotAffectWidthOrFlexing(child))
989 continue; 989 continue;
990 990
991 child->clearOverrideSize();
991 if ((child->isReplaced() && (child->style()->width().isPercent() || chil d->style()->height().isPercent())) 992 if ((child->isReplaced() && (child->style()->width().isPercent() || chil d->style()->height().isPercent()))
992 || (child->style()->height().isAuto() && child->isBlockFlow())) { 993 || (child->style()->height().isAuto() && child->isBlockFlow())) {
993 child->setChildNeedsLayout(true); 994 child->setChildNeedsLayout(true);
994 995
995 if (child->isRenderBlock()) { 996 if (child->isRenderBlock()) {
996 toRenderBlock(child)->markPositionedObjectsForLayout(); 997 toRenderBlock(child)->markPositionedObjectsForLayout();
997 toRenderBlock(child)->clearTruncation(); 998 toRenderBlock(child)->clearTruncation();
998 } 999 }
999 } 1000 }
1000 } 1001 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 if (isOutOfFlowPositioned()) 1081 if (isOutOfFlowPositioned())
1081 return "RenderDeprecatedFlexibleBox (positioned)"; 1082 return "RenderDeprecatedFlexibleBox (positioned)";
1082 if (isAnonymous()) 1083 if (isAnonymous())
1083 return "RenderDeprecatedFlexibleBox (generated)"; 1084 return "RenderDeprecatedFlexibleBox (generated)";
1084 if (isRelPositioned()) 1085 if (isRelPositioned())
1085 return "RenderDeprecatedFlexibleBox (relative positioned)"; 1086 return "RenderDeprecatedFlexibleBox (relative positioned)";
1086 return "RenderDeprecatedFlexibleBox"; 1087 return "RenderDeprecatedFlexibleBox";
1087 } 1088 }
1088 1089
1089 } // namespace WebCore 1090 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/EllipsisBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698