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 ObjectPainter_h | 5 #ifndef ObjectPainter_h |
6 #define ObjectPainter_h | 6 #define ObjectPainter_h |
7 | 7 |
8 #include "core/style/ComputedStyleConstants.h" | 8 #include "core/style/ComputedStyleConstants.h" |
9 #include "wtf/Vector.h" | 9 #include "wtf/Vector.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class Color; | 13 class Color; |
14 class GraphicsContext; | 14 class GraphicsContext; |
15 class LayoutPoint; | 15 class LayoutPoint; |
16 class LayoutRect; | 16 class LayoutRect; |
17 class LayoutSize; | 17 class LayoutSize; |
18 struct PaintInfo; | 18 struct PaintInfo; |
19 class LayoutObject; | 19 class LayoutObject; |
20 class ComputedStyle; | 20 class ComputedStyle; |
21 | 21 |
22 class ObjectPainter { | 22 class ObjectPainter { |
23 public: | 23 public: |
24 ObjectPainter(LayoutObject& layoutObject) : m_layoutObject(layoutObject) { } | 24 ObjectPainter(LayoutObject& layoutObject) : m_layoutObject(layoutObject) { } |
25 | 25 |
26 void paintOutline(const PaintInfo&, const LayoutRect& visualOverflowRect, co
nst LayoutSize& objectSize, const LayoutPoint& paintOffset); | 26 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset); |
27 void paintFocusRing(const PaintInfo&, const ComputedStyle&, const Vector<Lay
outRect>& focusRingRects); | 27 void paintInlineChildrenOutlines(const PaintInfo&, const LayoutPoint& paintO
ffset); |
28 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset)
; | 28 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset)
; |
29 | 29 |
30 static void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals
e); | 30 static void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals
e); |
31 | 31 |
32 private: | 32 private: |
33 static void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int
x2, int y2, | 33 static void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int
x2, int y2, |
34 BoxSide, Color, int thickness, EBorderStyle, bool antialias); | 34 BoxSide, Color, int thickness, EBorderStyle, bool antialias); |
35 static void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, | 35 static void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, |
36 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac
entWidth2, bool antialias); | 36 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac
entWidth2, bool antialias); |
37 static void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x
2, int y2, | 37 static void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x
2, int y2, |
38 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); | 38 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); |
39 static void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y
2, | 39 static void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y
2, |
40 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); | 40 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); |
41 | 41 |
42 LayoutObject& m_layoutObject; | 42 LayoutObject& m_layoutObject; |
43 }; | 43 }; |
44 | 44 |
45 } // namespace blink | 45 } // namespace blink |
46 | 46 |
47 #endif | 47 #endif |
OLD | NEW |