OLD | NEW |
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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 | 888 |
889 // Get the last line | 889 // Get the last line |
890 RootInlineBox* lastLine = blockChild->lineAtIndex(lineCount - 1); | 890 RootInlineBox* lastLine = blockChild->lineAtIndex(lineCount - 1); |
891 if (!lastLine) | 891 if (!lastLine) |
892 continue; | 892 continue; |
893 | 893 |
894 RootInlineBox* lastVisibleLine = blockChild->lineAtIndex(numVisibleLines
- 1); | 894 RootInlineBox* lastVisibleLine = blockChild->lineAtIndex(numVisibleLines
- 1); |
895 if (!lastVisibleLine) | 895 if (!lastVisibleLine) |
896 continue; | 896 continue; |
897 | 897 |
898 DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1))
; | 898 DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsisChara
cter, 1)); |
899 const Font& font = style(numVisibleLines == 1)->font(); | 899 const Font& font = style(numVisibleLines == 1)->font(); |
900 float totalWidth = font.width(constructTextRun(this, font, &horizontalEl
lipsis, 1, styleRef(), style()->direction())); | 900 float totalWidth = font.width(constructTextRun(this, font, &horizontalEl
lipsisCharacter, 1, styleRef(), style()->direction())); |
901 | 901 |
902 // See if this width can be accommodated on the last visible line | 902 // See if this width can be accommodated on the last visible line |
903 LayoutBlockFlow& destBlock = lastVisibleLine->block(); | 903 LayoutBlockFlow& destBlock = lastVisibleLine->block(); |
904 LayoutBlockFlow& srcBlock = lastLine->block(); | 904 LayoutBlockFlow& srcBlock = lastLine->block(); |
905 | 905 |
906 // FIXME: Directions of src/destBlock could be different from our direct
ion and from one another. | 906 // FIXME: Directions of src/destBlock could be different from our direct
ion and from one another. |
907 if (!srcBlock.style()->isLeftToRightDirection()) | 907 if (!srcBlock.style()->isLeftToRightDirection()) |
908 continue; | 908 continue; |
909 | 909 |
910 bool leftToRight = destBlock.style()->isLeftToRightDirection(); | 910 bool leftToRight = destBlock.style()->isLeftToRightDirection(); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |