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

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

Issue 1043643002: Switch line layout to LayoutUnit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More TestExpectations tweaks Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutBoxModelObject.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | 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 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 if (!leftToRight) 911 if (!leftToRight)
912 continue; 912 continue;
913 913
914 LayoutUnit blockRightEdge = destBlock.logicalRightOffsetForLine(lastVisi bleLine->y(), false); 914 LayoutUnit blockRightEdge = destBlock.logicalRightOffsetForLine(lastVisi bleLine->y(), false);
915 if (!lastVisibleLine->lineCanAccommodateEllipsis(leftToRight, blockRight Edge, lastVisibleLine->x() + lastVisibleLine->logicalWidth(), totalWidth)) 915 if (!lastVisibleLine->lineCanAccommodateEllipsis(leftToRight, blockRight Edge, lastVisibleLine->x() + lastVisibleLine->logicalWidth(), totalWidth))
916 continue; 916 continue;
917 917
918 // Let the truncation code kick in. 918 // Let the truncation code kick in.
919 // FIXME: the text alignment should be recomputed after the width change s due to truncation. 919 // FIXME: the text alignment should be recomputed after the width change s due to truncation.
920 LayoutUnit blockLeftEdge = destBlock.logicalLeftOffsetForLine(lastVisibl eLine->y(), false); 920 LayoutUnit blockLeftEdge = destBlock.logicalLeftOffsetForLine(lastVisibl eLine->y(), false);
921 lastVisibleLine->placeEllipsis(ellipsisStr, leftToRight, blockLeftEdge.t oFloat(), blockRightEdge.toFloat(), totalWidth); 921 lastVisibleLine->placeEllipsis(ellipsisStr, leftToRight, blockLeftEdge, blockRightEdge, totalWidth);
922 destBlock.setHasMarkupTruncation(true); 922 destBlock.setHasMarkupTruncation(true);
923 } 923 }
924 } 924 }
925 925
926 void LayoutDeprecatedFlexibleBox::clearLineClamp() 926 void LayoutDeprecatedFlexibleBox::clearLineClamp()
927 { 927 {
928 FlexBoxIterator iterator(this); 928 FlexBoxIterator iterator(this);
929 for (LayoutBox* child = iterator.first(); child; child = iterator.next()) { 929 for (LayoutBox* child = iterator.first(); child; child = iterator.next()) {
930 if (childDoesNotAffectWidthOrFlexing(child)) 930 if (childDoesNotAffectWidthOrFlexing(child))
931 continue; 931 continue;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 if (minHeight.isFixed() || minHeight.isAuto()) { 1002 if (minHeight.isFixed() || minHeight.isAuto()) {
1003 LayoutUnit minHeight = child->style()->minHeight().value(); 1003 LayoutUnit minHeight = child->style()->minHeight().value();
1004 LayoutUnit height = contentHeightForChild(child); 1004 LayoutUnit height = contentHeightForChild(child);
1005 LayoutUnit allowedShrinkage = std::min<LayoutUnit>(0, minHeight - height ); 1005 LayoutUnit allowedShrinkage = std::min<LayoutUnit>(0, minHeight - height );
1006 return allowedShrinkage; 1006 return allowedShrinkage;
1007 } 1007 }
1008 return 0; 1008 return 0;
1009 } 1009 }
1010 1010
1011 } // namespace blink 1011 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBoxModelObject.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698