| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 LayoutSize LayoutListMarker::imageBulletSize() const | 67 LayoutSize LayoutListMarker::imageBulletSize() const |
| 68 { | 68 { |
| 69 ASSERT(isImage()); | 69 ASSERT(isImage()); |
| 70 | 70 |
| 71 // FIXME: This is a somewhat arbitrary default width. Generated images for m
arkers really won't | 71 // FIXME: This is a somewhat arbitrary default width. Generated images for m
arkers really won't |
| 72 // become particularly useful until we support the CSS3 marker pseudoclass t
o allow control over | 72 // become particularly useful until we support the CSS3 marker pseudoclass t
o allow control over |
| 73 // the width and height of the marker box. | 73 // the width and height of the marker box. |
| 74 LayoutUnit bulletWidth = style()->fontMetrics().ascent() / LayoutUnit(2); | 74 LayoutUnit bulletWidth = style()->fontMetrics().ascent() / LayoutUnit(2); |
| 75 LayoutSize defaultBulletSize(bulletWidth, bulletWidth); | 75 return m_image->imageSize(this, style()->effectiveZoom(), LayoutSize(bulletW
idth, bulletWidth)); |
| 76 return calculateImageIntrinsicDimensions(m_image.get(), defaultBulletSize, D
oNotScaleByEffectiveZoom); | |
| 77 } | 76 } |
| 78 | 77 |
| 79 void LayoutListMarker::styleWillChange(StyleDifference diff, const ComputedStyle
& newStyle) | 78 void LayoutListMarker::styleWillChange(StyleDifference diff, const ComputedStyle
& newStyle) |
| 80 { | 79 { |
| 81 if (style() && (newStyle.listStylePosition() != style()->listStylePosition()
|| newStyle.listStyleType() != style()->listStyleType())) | 80 if (style() && (newStyle.listStylePosition() != style()->listStylePosition()
|| newStyle.listStyleType() != style()->listStyleType())) |
| 82 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalida
tionReason::StyleChange); | 81 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalida
tionReason::StyleChange); |
| 83 | 82 |
| 84 LayoutBox::styleWillChange(diff, newStyle); | 83 LayoutBox::styleWillChange(diff, newStyle); |
| 85 } | 84 } |
| 86 | 85 |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 if (style()) { | 464 if (style()) { |
| 466 // Reuse the current margins. Otherwise resetting the margins to initial
values | 465 // Reuse the current margins. Otherwise resetting the margins to initial
values |
| 467 // would trigger unnecessary layout. | 466 // would trigger unnecessary layout. |
| 468 newStyle->setMarginStart(style()->marginStart()); | 467 newStyle->setMarginStart(style()->marginStart()); |
| 469 newStyle->setMarginEnd(style()->marginRight()); | 468 newStyle->setMarginEnd(style()->marginRight()); |
| 470 } | 469 } |
| 471 setStyle(newStyle.release()); | 470 setStyle(newStyle.release()); |
| 472 } | 471 } |
| 473 | 472 |
| 474 } // namespace blink | 473 } // namespace blink |
| OLD | NEW |