OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) | 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) |
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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 | 1092 |
1093 void LayoutListMarker::updateContent() | 1093 void LayoutListMarker::updateContent() |
1094 { | 1094 { |
1095 // FIXME: This if-statement is just a performance optimization, but it's mes
sy to use the preferredLogicalWidths dirty bit for this. | 1095 // FIXME: This if-statement is just a performance optimization, but it's mes
sy to use the preferredLogicalWidths dirty bit for this. |
1096 // It's unclear if this is a premature optimization. | 1096 // It's unclear if this is a premature optimization. |
1097 if (!preferredLogicalWidthsDirty()) | 1097 if (!preferredLogicalWidthsDirty()) |
1098 return; | 1098 return; |
1099 | 1099 |
1100 m_text = ""; | 1100 m_text = ""; |
1101 | 1101 |
1102 if (isImage()) { | 1102 if (isImage()) |
1103 // FIXME: This is a somewhat arbitrary width. Generated images for mark
ers really won't become particularly useful | |
1104 // until we support the CSS3 marker pseudoclass to allow control over th
e width and height of the marker box. | |
1105 int bulletWidth = style()->fontMetrics().ascent() / 2; | |
1106 IntSize defaultBulletSize(bulletWidth, bulletWidth); | |
1107 IntSize imageSize = calculateImageIntrinsicDimensions(m_image.get(), def
aultBulletSize, DoNotScaleByEffectiveZoom); | |
1108 m_image->setContainerSizeForLayoutObject(this, imageSize, style()->effec
tiveZoom()); | |
1109 return; | 1103 return; |
1110 } | |
1111 | 1104 |
1112 EListStyleType type = style()->listStyleType(); | 1105 EListStyleType type = style()->listStyleType(); |
1113 switch (type) { | 1106 switch (type) { |
1114 case NoneListStyle: | 1107 case NoneListStyle: |
1115 break; | 1108 break; |
1116 case Circle: | 1109 case Circle: |
1117 case Disc: | 1110 case Disc: |
1118 case Square: | 1111 case Square: |
1119 m_text = listMarkerText(type, 0); // value is ignored for these types | 1112 m_text = listMarkerText(type, 0); // value is ignored for these types |
1120 break; | 1113 break; |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 if (style()) { | 1474 if (style()) { |
1482 // Reuse the current margins. Otherwise resetting the margins to initial
values | 1475 // Reuse the current margins. Otherwise resetting the margins to initial
values |
1483 // would trigger unnecessary layout. | 1476 // would trigger unnecessary layout. |
1484 newStyle->setMarginStart(style()->marginStart()); | 1477 newStyle->setMarginStart(style()->marginStart()); |
1485 newStyle->setMarginEnd(style()->marginRight()); | 1478 newStyle->setMarginEnd(style()->marginRight()); |
1486 } | 1479 } |
1487 setStyle(newStyle.release()); | 1480 setStyle(newStyle.release()); |
1488 } | 1481 } |
1489 | 1482 |
1490 } // namespace blink | 1483 } // namespace blink |
OLD | NEW |