| 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 "core/paint/ListMarkerPainter.h" | 5 #include "core/paint/ListMarkerPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutListItem.h" | 7 #include "core/layout/LayoutListItem.h" |
| 8 #include "core/layout/LayoutListMarker.h" | 8 #include "core/layout/LayoutListMarker.h" |
| 9 #include "core/layout/ListMarkerText.h" | 9 #include "core/layout/ListMarkerText.h" |
| 10 #include "core/layout/TextRunConstructor.h" | |
| 11 #include "core/layout/api/SelectionState.h" | 10 #include "core/layout/api/SelectionState.h" |
| 12 #include "core/paint/BlockPainter.h" | |
| 13 #include "core/paint/LayoutObjectDrawingRecorder.h" | 11 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 14 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 15 #include "platform/RuntimeEnabledFeatures.h" | |
| 16 #include "platform/geometry/LayoutPoint.h" | 13 #include "platform/geometry/LayoutPoint.h" |
| 17 #include "platform/graphics/GraphicsContextStateSaver.h" | 14 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 18 #include "wtf/text/CharacterNames.h" | |
| 19 | 15 |
| 20 namespace blink { | 16 namespace blink { |
| 21 | 17 |
| 22 static inline void paintSymbol(GraphicsContext& context, const Color& color, | 18 static inline void paintSymbol(GraphicsContext& context, const Color& color, |
| 23 const IntRect& marker, EListStyleType listStyle) | 19 const IntRect& marker, EListStyleType listStyle) |
| 24 { | 20 { |
| 25 context.setStrokeColor(color); | 21 context.setStrokeColor(color); |
| 26 context.setStrokeStyle(SolidStroke); | 22 context.setStrokeStyle(SolidStroke); |
| 27 context.setStrokeThickness(1.0f); | 23 context.setStrokeThickness(1.0f); |
| 28 switch (listStyle) { | 24 switch (listStyle) { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 if (m_layoutListMarker.style()->isLeftToRightDirection()) { | 133 if (m_layoutListMarker.style()->isLeftToRightDirection()) { |
| 138 context.drawText(font, textRunPaintInfo, textOrigin); | 134 context.drawText(font, textRunPaintInfo, textOrigin); |
| 139 context.drawText(font, suffixRunInfo, textOrigin + IntSize(font.width(te
xtRun), 0)); | 135 context.drawText(font, suffixRunInfo, textOrigin + IntSize(font.width(te
xtRun), 0)); |
| 140 } else { | 136 } else { |
| 141 context.drawText(font, suffixRunInfo, textOrigin); | 137 context.drawText(font, suffixRunInfo, textOrigin); |
| 142 context.drawText(font, textRunPaintInfo, textOrigin + IntSize(font.width
(suffixRun), 0)); | 138 context.drawText(font, textRunPaintInfo, textOrigin + IntSize(font.width
(suffixRun), 0)); |
| 143 } | 139 } |
| 144 } | 140 } |
| 145 | 141 |
| 146 } // namespace blink | 142 } // namespace blink |
| OLD | NEW |