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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 { | 1073 { |
1074 Document& document = item->document(); | 1074 Document& document = item->document(); |
1075 RenderListMarker* renderer = new RenderListMarker(item); | 1075 RenderListMarker* renderer = new RenderListMarker(item); |
1076 renderer->setDocumentForAnonymous(&document); | 1076 renderer->setDocumentForAnonymous(&document); |
1077 return renderer; | 1077 return renderer; |
1078 } | 1078 } |
1079 | 1079 |
1080 void RenderListMarker::styleWillChange(StyleDifference diff, const RenderStyle&
newStyle) | 1080 void RenderListMarker::styleWillChange(StyleDifference diff, const RenderStyle&
newStyle) |
1081 { | 1081 { |
1082 if (style() && (newStyle.listStylePosition() != style()->listStylePosition()
|| newStyle.listStyleType() != style()->listStyleType())) | 1082 if (style() && (newStyle.listStylePosition() != style()->listStylePosition()
|| newStyle.listStyleType() != style()->listStyleType())) |
1083 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 1083 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
1084 | 1084 |
1085 RenderBox::styleWillChange(diff, newStyle); | 1085 RenderBox::styleWillChange(diff, newStyle); |
1086 } | 1086 } |
1087 | 1087 |
1088 void RenderListMarker::styleDidChange(StyleDifference diff, const RenderStyle* o
ldStyle) | 1088 void RenderListMarker::styleDidChange(StyleDifference diff, const RenderStyle* o
ldStyle) |
1089 { | 1089 { |
1090 RenderBox::styleDidChange(diff, oldStyle); | 1090 RenderBox::styleDidChange(diff, oldStyle); |
1091 | 1091 |
1092 if (m_image != style()->listStyleImage()) { | 1092 if (m_image != style()->listStyleImage()) { |
1093 if (m_image) | 1093 if (m_image) |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 clearNeedsLayout(); | 1343 clearNeedsLayout(); |
1344 } | 1344 } |
1345 | 1345 |
1346 void RenderListMarker::imageChanged(WrappedImagePtr o, const IntRect*) | 1346 void RenderListMarker::imageChanged(WrappedImagePtr o, const IntRect*) |
1347 { | 1347 { |
1348 // A list marker can't have a background or border image, so no need to call
the base class method. | 1348 // A list marker can't have a background or border image, so no need to call
the base class method. |
1349 if (o != m_image->data()) | 1349 if (o != m_image->data()) |
1350 return; | 1350 return; |
1351 | 1351 |
1352 if (width() != m_image->imageSize(this, style()->effectiveZoom()).width() ||
height() != m_image->imageSize(this, style()->effectiveZoom()).height() || m_im
age->errorOccurred()) | 1352 if (width() != m_image->imageSize(this, style()->effectiveZoom()).width() ||
height() != m_image->imageSize(this, style()->effectiveZoom()).height() || m_im
age->errorOccurred()) |
1353 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 1353 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
1354 else | 1354 else |
1355 paintInvalidationForWholeRenderer(); | 1355 paintInvalidationForWholeRenderer(); |
1356 } | 1356 } |
1357 | 1357 |
1358 void RenderListMarker::updateMarginsAndContent() | 1358 void RenderListMarker::updateMarginsAndContent() |
1359 { | 1359 { |
1360 updateContent(); | 1360 updateContent(); |
1361 updateMargins(); | 1361 updateMargins(); |
1362 } | 1362 } |
1363 | 1363 |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 | 1820 |
1821 void RenderListMarker::setSelectionState(SelectionState state) | 1821 void RenderListMarker::setSelectionState(SelectionState state) |
1822 { | 1822 { |
1823 // The selection state for our containing block hierarchy is updated by the
base class call. | 1823 // The selection state for our containing block hierarchy is updated by the
base class call. |
1824 RenderBox::setSelectionState(state); | 1824 RenderBox::setSelectionState(state); |
1825 | 1825 |
1826 if (inlineBoxWrapper() && canUpdateSelectionOnRootLineBoxes()) | 1826 if (inlineBoxWrapper() && canUpdateSelectionOnRootLineBoxes()) |
1827 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); | 1827 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); |
1828 } | 1828 } |
1829 | 1829 |
1830 LayoutRect RenderListMarker::selectionRectForRepaint(const RenderLayerModelObjec
t* repaintContainer, bool clipToVisibleContent) | 1830 LayoutRect RenderListMarker::selectionRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, bool clipToVisibleContent) |
1831 { | 1831 { |
1832 ASSERT(!needsLayout()); | 1832 ASSERT(!needsLayout()); |
1833 | 1833 |
1834 if (selectionState() == SelectionNone || !inlineBoxWrapper()) | 1834 if (selectionState() == SelectionNone || !inlineBoxWrapper()) |
1835 return LayoutRect(); | 1835 return LayoutRect(); |
1836 | 1836 |
1837 RootInlineBox& root = inlineBoxWrapper()->root(); | 1837 RootInlineBox& root = inlineBoxWrapper()->root(); |
1838 LayoutRect rect(0, root.selectionTop() - y(), width(), root.selectionHeight(
)); | 1838 LayoutRect rect(0, root.selectionTop() - y(), width(), root.selectionHeight(
)); |
1839 | 1839 |
1840 if (clipToVisibleContent) | 1840 if (clipToVisibleContent) |
1841 mapRectToRepaintBacking(repaintContainer, rect); | 1841 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect); |
1842 else | 1842 else |
1843 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing
BoundingBox(); | 1843 rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer)
.enclosingBoundingBox(); |
1844 | 1844 |
1845 return rect; | 1845 return rect; |
1846 } | 1846 } |
1847 | 1847 |
1848 } // namespace WebCore | 1848 } // namespace WebCore |
OLD | NEW |