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/InlinePainter.h" | 6 #include "core/paint/InlinePainter.h" |
7 | 7 |
8 #include "core/layout/LayoutBlock.h" | 8 #include "core/layout/LayoutBlock.h" |
9 #include "core/layout/LayoutInline.h" | 9 #include "core/layout/LayoutInline.h" |
10 #include "core/layout/LayoutTheme.h" | 10 #include "core/layout/LayoutTheme.h" |
11 #include "core/layout/line/RootInlineBox.h" | 11 #include "core/layout/line/RootInlineBox.h" |
12 #include "core/paint/BoxPainter.h" | 12 #include "core/paint/BoxPainter.h" |
13 #include "core/paint/GraphicsContextAnnotator.h" | |
14 #include "core/paint/LayoutObjectDrawingRecorder.h" | 13 #include "core/paint/LayoutObjectDrawingRecorder.h" |
15 #include "core/paint/LineBoxListPainter.h" | 14 #include "core/paint/LineBoxListPainter.h" |
16 #include "core/paint/ObjectPainter.h" | 15 #include "core/paint/ObjectPainter.h" |
17 #include "core/paint/PaintInfo.h" | 16 #include "core/paint/PaintInfo.h" |
18 #include "platform/geometry/LayoutPoint.h" | 17 #include "platform/geometry/LayoutPoint.h" |
19 #include <limits> | 18 #include <limits> |
20 | 19 |
21 namespace blink { | 20 namespace blink { |
22 | 21 |
23 void InlinePainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) | 22 void InlinePainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) |
24 { | 23 { |
25 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_layoutInline); | |
26 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(&m_layoutInline, paint
Info, paintOffset); | 24 LineBoxListPainter(*m_layoutInline.lineBoxes()).paint(&m_layoutInline, paint
Info, paintOffset); |
27 } | 25 } |
28 | 26 |
29 void InlinePainter::paintOutline(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) | 27 void InlinePainter::paintOutline(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) |
30 { | 28 { |
31 const ComputedStyle& styleToUse = m_layoutInline.styleRef(); | 29 const ComputedStyle& styleToUse = m_layoutInline.styleRef(); |
32 if (!styleToUse.hasOutline()) | 30 if (!styleToUse.hasOutline()) |
33 return; | 31 return; |
34 | 32 |
35 if (styleToUse.outlineStyleIsAuto()) { | 33 if (styleToUse.outlineStyleIsAuto()) { |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 pixelSnappedBox.maxX() + outlineWidth, | 205 pixelSnappedBox.maxX() + outlineWidth, |
208 pixelSnappedBox.maxY() + outlineWidth, | 206 pixelSnappedBox.maxY() + outlineWidth, |
209 BSBottom, outlineColor, outlineStyle, | 207 BSBottom, outlineColor, outlineStyle, |
210 outlineWidth, | 208 outlineWidth, |
211 outlineWidth, | 209 outlineWidth, |
212 antialias); | 210 antialias); |
213 } | 211 } |
214 } | 212 } |
215 | 213 |
216 } // namespace blink | 214 } // namespace blink |
OLD | NEW |