OLD | NEW |
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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 if (!lastLine) | 927 if (!lastLine) |
928 continue; | 928 continue; |
929 | 929 |
930 RootInlineBox* lastVisibleLine = blockChild->lineAtIndex(numVisibleLines
- 1); | 930 RootInlineBox* lastVisibleLine = blockChild->lineAtIndex(numVisibleLines
- 1); |
931 if (!lastVisibleLine) | 931 if (!lastVisibleLine) |
932 continue; | 932 continue; |
933 | 933 |
934 const UChar ellipsisAndSpace[2] = { horizontalEllipsis, ' ' }; | 934 const UChar ellipsisAndSpace[2] = { horizontalEllipsis, ' ' }; |
935 DEFINE_STATIC_LOCAL(AtomicString, ellipsisAndSpaceStr, (ellipsisAndSpace
, 2)); | 935 DEFINE_STATIC_LOCAL(AtomicString, ellipsisAndSpaceStr, (ellipsisAndSpace
, 2)); |
936 DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1))
; | 936 DEFINE_STATIC_LOCAL(AtomicString, ellipsisStr, (&horizontalEllipsis, 1))
; |
937 const Font& font = style(numVisibleLines == 1)->font(); | 937 const Font& font = styleOrFirstLineStyle(numVisibleLines == 1)->font(); |
938 | 938 |
939 // Get ellipsis width, and if the last child is an anchor, it will go af
ter the ellipsis, so add in a space and the anchor width too | 939 // Get ellipsis width, and if the last child is an anchor, it will go af
ter the ellipsis, so add in a space and the anchor width too |
940 float totalWidth; | 940 float totalWidth; |
941 InlineBox* anchorBox = lastLine->lastChild(); | 941 InlineBox* anchorBox = lastLine->lastChild(); |
942 if (anchorBox && anchorBox->renderer().style()->isLink()) | 942 if (anchorBox && anchorBox->renderer().style()->isLink()) |
943 totalWidth = anchorBox->logicalWidth() + font.width(RenderBlockFlow:
:constructTextRun(this, font, ellipsisAndSpace, 2, style(), style()->direction()
)); | 943 totalWidth = anchorBox->logicalWidth() + font.width(RenderBlockFlow:
:constructTextRun(this, font, ellipsisAndSpace, 2, style(), style()->direction()
)); |
944 else { | 944 else { |
945 anchorBox = 0; | 945 anchorBox = 0; |
946 totalWidth = font.width(RenderBlockFlow::constructTextRun(this, font
, &horizontalEllipsis, 1, style(), style()->direction())); | 946 totalWidth = font.width(RenderBlockFlow::constructTextRun(this, font
, &horizontalEllipsis, 1, style(), style()->direction())); |
947 } | 947 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 if (isPseudoElement()) | 1068 if (isPseudoElement()) |
1069 return "RenderDeprecatedFlexibleBox (generated)"; | 1069 return "RenderDeprecatedFlexibleBox (generated)"; |
1070 if (isAnonymous()) | 1070 if (isAnonymous()) |
1071 return "RenderDeprecatedFlexibleBox (generated)"; | 1071 return "RenderDeprecatedFlexibleBox (generated)"; |
1072 if (isRelPositioned()) | 1072 if (isRelPositioned()) |
1073 return "RenderDeprecatedFlexibleBox (relative positioned)"; | 1073 return "RenderDeprecatedFlexibleBox (relative positioned)"; |
1074 return "RenderDeprecatedFlexibleBox"; | 1074 return "RenderDeprecatedFlexibleBox"; |
1075 } | 1075 } |
1076 | 1076 |
1077 } // namespace WebCore | 1077 } // namespace WebCore |
OLD | NEW |