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

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

Issue 1583783002: Use IndentTextOrNot instead of a bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@568851-2
Patch Set: Update Created 4 years, 11 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 * This file is part of the layout object implementation for KHTML. 2 * This file is part of the layout 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 LayoutBlockFlow& srcBlock = lastLine->block(); 905 LayoutBlockFlow& srcBlock = lastLine->block();
906 906
907 // FIXME: Directions of src/destBlock could be different from our direct ion and from one another. 907 // FIXME: Directions of src/destBlock could be different from our direct ion and from one another.
908 if (!srcBlock.style()->isLeftToRightDirection()) 908 if (!srcBlock.style()->isLeftToRightDirection())
909 continue; 909 continue;
910 910
911 bool leftToRight = destBlock.style()->isLeftToRightDirection(); 911 bool leftToRight = destBlock.style()->isLeftToRightDirection();
912 if (!leftToRight) 912 if (!leftToRight)
913 continue; 913 continue;
914 914
915 LayoutUnit blockRightEdge = destBlock.logicalRightOffsetForLine(lastVisi bleLine->y(), false); 915 LayoutUnit blockRightEdge = destBlock.logicalRightOffsetForLine(lastVisi bleLine->y(), DoNotIndentText);
916 if (!lastVisibleLine->lineCanAccommodateEllipsis(leftToRight, blockRight Edge, lastVisibleLine->x() + lastVisibleLine->logicalWidth(), totalWidth)) 916 if (!lastVisibleLine->lineCanAccommodateEllipsis(leftToRight, blockRight Edge, lastVisibleLine->x() + lastVisibleLine->logicalWidth(), totalWidth))
917 continue; 917 continue;
918 918
919 // Let the truncation code kick in. 919 // Let the truncation code kick in.
920 // FIXME: the text alignment should be recomputed after the width change s due to truncation. 920 // FIXME: the text alignment should be recomputed after the width change s due to truncation.
921 LayoutUnit blockLeftEdge = destBlock.logicalLeftOffsetForLine(lastVisibl eLine->y(), false); 921 LayoutUnit blockLeftEdge = destBlock.logicalLeftOffsetForLine(lastVisibl eLine->y(), DoNotIndentText);
922 lastVisibleLine->placeEllipsis(ellipsisStr, leftToRight, blockLeftEdge, blockRightEdge, totalWidth); 922 lastVisibleLine->placeEllipsis(ellipsisStr, leftToRight, blockLeftEdge, blockRightEdge, totalWidth);
923 destBlock.setHasMarkupTruncation(true); 923 destBlock.setHasMarkupTruncation(true);
924 } 924 }
925 } 925 }
926 926
927 void LayoutDeprecatedFlexibleBox::clearLineClamp() 927 void LayoutDeprecatedFlexibleBox::clearLineClamp()
928 { 928 {
929 FlexBoxIterator iterator(this); 929 FlexBoxIterator iterator(this);
930 for (LayoutBox* child = iterator.first(); child; child = iterator.next()) { 930 for (LayoutBox* child = iterator.first(); child; child = iterator.next()) {
931 if (childDoesNotAffectWidthOrFlexing(child)) 931 if (childDoesNotAffectWidthOrFlexing(child))
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 if (minHeight.isFixed() || minHeight.isAuto()) { 995 if (minHeight.isFixed() || minHeight.isAuto()) {
996 LayoutUnit minHeight = child->style()->minHeight().value(); 996 LayoutUnit minHeight = child->style()->minHeight().value();
997 LayoutUnit height = contentHeightForChild(child); 997 LayoutUnit height = contentHeightForChild(child);
998 LayoutUnit allowedShrinkage = std::min<LayoutUnit>(0, minHeight - height ); 998 LayoutUnit allowedShrinkage = std::min<LayoutUnit>(0, minHeight - height );
999 return allowedShrinkage; 999 return allowedShrinkage;
1000 } 1000 }
1001 return 0; 1001 return 0;
1002 } 1002 }
1003 1003
1004 } // namespace blink 1004 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutListItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698