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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 LayoutUnit newLogicalTop = root->block()->style()->isFlippedBlocksWritingMod
e() ? m_inlineBoxWrapper->logicalBottom() - root->selectionBottom() : root->sele
ctionTop() - m_inlineBoxWrapper->logicalTop(); | 1118 LayoutUnit newLogicalTop = root->block()->style()->isFlippedBlocksWritingMod
e() ? m_inlineBoxWrapper->logicalBottom() - root->selectionBottom() : root->sele
ctionTop() - m_inlineBoxWrapper->logicalTop(); |
1119 if (root->block()->style()->isHorizontalWritingMode()) | 1119 if (root->block()->style()->isHorizontalWritingMode()) |
1120 return LayoutRect(0, newLogicalTop, width(), root->selectionHeight()); | 1120 return LayoutRect(0, newLogicalTop, width(), root->selectionHeight()); |
1121 return LayoutRect(newLogicalTop, 0, root->selectionHeight(), height()); | 1121 return LayoutRect(newLogicalTop, 0, root->selectionHeight(), height()); |
1122 } | 1122 } |
1123 | 1123 |
1124 void RenderListMarker::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
t) | 1124 void RenderListMarker::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse
t) |
1125 { | 1125 { |
1126 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 1126 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
1127 | 1127 |
1128 if (paintInfo.phase != PaintPhaseForeground) | 1128 if (paintInfo.getPhase() != PaintPhaseForeground) |
1129 return; | 1129 return; |
1130 | 1130 |
1131 if (style()->visibility() != VISIBLE) | 1131 if (style()->visibility() != VISIBLE) |
1132 return; | 1132 return; |
1133 | 1133 |
1134 LayoutPoint boxOrigin(paintOffset + location()); | 1134 LayoutPoint boxOrigin(paintOffset + location()); |
1135 LayoutRect overflowRect(visualOverflowRect()); | 1135 LayoutRect overflowRect(visualOverflowRect()); |
1136 overflowRect.moveBy(boxOrigin); | 1136 overflowRect.moveBy(boxOrigin); |
1137 overflowRect.inflate(maximalOutlineSize(paintInfo.phase)); | 1137 overflowRect.inflate(maximalOutlineSize(paintInfo.getPhase())); |
1138 | 1138 |
1139 if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect))) | 1139 if (!paintInfo.getRect().intersects(pixelSnappedIntRect(overflowRect))) |
1140 return; | 1140 return; |
1141 | 1141 |
1142 LayoutRect box(boxOrigin, size()); | 1142 LayoutRect box(boxOrigin, size()); |
1143 | 1143 |
1144 IntRect marker = getRelativeMarkerRect(); | 1144 IntRect marker = getRelativeMarkerRect(); |
1145 marker.moveBy(roundedIntPoint(boxOrigin)); | 1145 marker.moveBy(roundedIntPoint(boxOrigin)); |
1146 | 1146 |
1147 GraphicsContext* context = paintInfo.context; | 1147 GraphicsContext* context = paintInfo.getContext(); |
1148 | 1148 |
1149 if (isImage()) { | 1149 if (isImage()) { |
1150 context->drawImage(m_image->image(this, marker.size()).get(), marker); | 1150 context->drawImage(m_image->image(this, marker.size()).get(), marker); |
1151 if (selectionState() != SelectionNone) { | 1151 if (selectionState() != SelectionNone) { |
1152 LayoutRect selRect = localSelectionRect(); | 1152 LayoutRect selRect = localSelectionRect(); |
1153 selRect.moveBy(boxOrigin); | 1153 selRect.moveBy(boxOrigin); |
1154 context->fillRect(pixelSnappedIntRect(selRect), selectionBackgroundC
olor()); | 1154 context->fillRect(pixelSnappedIntRect(selRect), selectionBackgroundC
olor()); |
1155 } | 1155 } |
1156 return; | 1156 return; |
1157 } | 1157 } |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 | 1841 |
1842 if (clipToVisibleContent) | 1842 if (clipToVisibleContent) |
1843 computeRectForRepaint(repaintContainer, rect); | 1843 computeRectForRepaint(repaintContainer, rect); |
1844 else | 1844 else |
1845 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing
BoundingBox(); | 1845 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing
BoundingBox(); |
1846 | 1846 |
1847 return rect; | 1847 return rect; |
1848 } | 1848 } |
1849 | 1849 |
1850 } // namespace WebCore | 1850 } // namespace WebCore |
OLD | NEW |