OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/paint/ListMarkerPainter.h" | 6 #include "core/paint/ListMarkerPainter.h" |
7 | 7 |
8 #include "core/layout/LayoutListItem.h" | 8 #include "core/layout/LayoutListItem.h" |
9 #include "core/layout/LayoutListMarker.h" | 9 #include "core/layout/LayoutListMarker.h" |
10 #include "core/layout/ListMarkerText.h" | 10 #include "core/layout/ListMarkerText.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutListMarker,
paintInfo.phase, pixelSnappedOverflowRect, paintOffset); | 67 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutListMarker,
paintInfo.phase, pixelSnappedOverflowRect, paintOffset); |
68 | 68 |
69 LayoutRect box(boxOrigin, m_layoutListMarker.size()); | 69 LayoutRect box(boxOrigin, m_layoutListMarker.size()); |
70 | 70 |
71 IntRect marker = m_layoutListMarker.getRelativeMarkerRect(); | 71 IntRect marker = m_layoutListMarker.getRelativeMarkerRect(); |
72 marker.moveBy(roundedIntPoint(boxOrigin)); | 72 marker.moveBy(roundedIntPoint(boxOrigin)); |
73 | 73 |
74 GraphicsContext* context = paintInfo.context; | 74 GraphicsContext* context = paintInfo.context; |
75 | 75 |
76 if (m_layoutListMarker.isImage()) { | 76 if (m_layoutListMarker.isImage()) { |
77 context->drawImage(m_layoutListMarker.image()->image(&m_layoutListMarker
, marker.size()).get(), marker); | 77 context->drawImage(m_layoutListMarker.image()->image( |
| 78 &m_layoutListMarker, marker.size(), m_layoutListMarker.styleRef().ef
fectiveZoom()).get(), marker); |
78 if (m_layoutListMarker.selectionState() != SelectionNone) { | 79 if (m_layoutListMarker.selectionState() != SelectionNone) { |
79 LayoutRect selRect = m_layoutListMarker.localSelectionRect(); | 80 LayoutRect selRect = m_layoutListMarker.localSelectionRect(); |
80 selRect.moveBy(boxOrigin); | 81 selRect.moveBy(boxOrigin); |
81 context->fillRect(pixelSnappedIntRect(selRect), m_layoutListMarker.l
istItem()->selectionBackgroundColor()); | 82 context->fillRect(pixelSnappedIntRect(selRect), m_layoutListMarker.l
istItem()->selectionBackgroundColor()); |
82 } | 83 } |
83 return; | 84 return; |
84 } | 85 } |
85 | 86 |
86 if (!RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled() | 87 if (!RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled() |
87 && m_layoutListMarker.selectionState() != SelectionNone) { | 88 && m_layoutListMarker.selectionState() != SelectionNone) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 if (m_layoutListMarker.style()->isLeftToRightDirection()) { | 148 if (m_layoutListMarker.style()->isLeftToRightDirection()) { |
148 context->drawText(font, textRunPaintInfo, textOrigin); | 149 context->drawText(font, textRunPaintInfo, textOrigin); |
149 context->drawText(font, suffixRunInfo, textOrigin + IntSize(font.width(t
extRun), 0)); | 150 context->drawText(font, suffixRunInfo, textOrigin + IntSize(font.width(t
extRun), 0)); |
150 } else { | 151 } else { |
151 context->drawText(font, suffixRunInfo, textOrigin); | 152 context->drawText(font, suffixRunInfo, textOrigin); |
152 context->drawText(font, textRunPaintInfo, textOrigin + IntSize(font.widt
h(suffixRun), 0)); | 153 context->drawText(font, textRunPaintInfo, textOrigin + IntSize(font.widt
h(suffixRun), 0)); |
153 } | 154 } |
154 } | 155 } |
155 | 156 |
156 } // namespace blink | 157 } // namespace blink |
OLD | NEW |