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 #ifndef InlinePainter_h | 5 #ifndef InlinePainter_h |
6 #define InlinePainter_h | 6 #define InlinePainter_h |
7 | 7 |
8 #include "core/style/ComputedStyleConstants.h" | 8 #include "core/style/ComputedStyleConstants.h" |
| 9 #include "wtf/Vector.h" |
9 | 10 |
10 namespace blink { | 11 namespace blink { |
11 | 12 |
12 class Color; | 13 class Color; |
13 class GraphicsContext; | 14 class GraphicsContext; |
14 class LayoutPoint; | 15 class LayoutPoint; |
15 class LayoutRect; | 16 class LayoutRect; |
16 struct PaintInfo; | 17 struct PaintInfo; |
17 class LayoutInline; | 18 class LayoutInline; |
18 | 19 |
19 class InlinePainter { | 20 class InlinePainter { |
20 public: | 21 public: |
21 InlinePainter(LayoutInline& layoutInline) : m_layoutInline(layoutInline) { } | 22 InlinePainter(LayoutInline& layoutInline) : m_layoutInline(layoutInline) { } |
22 | 23 |
23 void paint(const PaintInfo&, const LayoutPoint& paintOffset); | 24 void paint(const PaintInfo&, const LayoutPoint& paintOffset); |
24 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset); | 25 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset); |
25 | 26 |
26 private: | 27 private: |
| 28 LayoutRect outlinePaintRect(const Vector<LayoutRect>&, const LayoutPoint& pa
intOffset) const; |
27 void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutR
ect& prevLine, const LayoutRect& thisLine, | 29 void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutR
ect& prevLine, const LayoutRect& thisLine, |
28 const LayoutRect& nextLine, const Color); | 30 const LayoutRect& nextLine, const Color); |
29 LayoutInline& m_layoutInline; | 31 LayoutInline& m_layoutInline; |
30 }; | 32 }; |
31 | 33 |
32 } // namespace blink | 34 } // namespace blink |
33 | 35 |
34 #endif // InlinePainter_h | 36 #endif // InlinePainter_h |
OLD | NEW |