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/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 #include "wtf/Vector.h" | 10 #include "wtf/Vector.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 static void drawLineForBoxSide(GraphicsContext&, int x1, int y1, int x2, int
y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals
e); | 32 static void drawLineForBoxSide(GraphicsContext&, int x1, int y1, int x2, int
y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals
e); |
33 | 33 |
34 // Paints the object atomically as if it created a new stacking context, for
: | 34 // Paints the object atomically as if it created a new stacking context, for
: |
35 // - inline blocks, inline tables, inline-level replaced elements (Section 7
.2.1.4 in | 35 // - inline blocks, inline tables, inline-level replaced elements (Section 7
.2.1.4 in |
36 // http://www.w3.org/TR/CSS2/zindex.html#painting-order), | 36 // http://www.w3.org/TR/CSS2/zindex.html#painting-order), |
37 // - non-positioned floating objects (Section 5 in http://www.w3.org/TR/CSS2
/zindex.html#painting-order), | 37 // - non-positioned floating objects (Section 5 in http://www.w3.org/TR/CSS2
/zindex.html#painting-order), |
38 // - flex items (http://www.w3.org/TR/css-flexbox-1/#painting), | 38 // - flex items (http://www.w3.org/TR/css-flexbox-1/#painting), |
39 // - grid items (http://www.w3.org/TR/css-grid-1/#z-order), | 39 // - grid items (http://www.w3.org/TR/css-grid-1/#z-order), |
40 // - custom scrollbar parts. | 40 // - custom scrollbar parts. |
| 41 // Also see https://chromium.googlesource.com/chromium/src.git/+/master/thir
d_party/WebKit/Source/core/paint/README.md. |
| 42 // |
41 // It is expected that the caller will call this function independent of the
value of paintInfo.phase, | 43 // It is expected that the caller will call this function independent of the
value of paintInfo.phase, |
42 // and this function will do atomic paint (for PaintPhaseForeground), normal
paint (for PaintPhaseSelection | 44 // and this function will do atomic paint (for PaintPhaseForeground), normal
paint (for PaintPhaseSelection |
43 // and PaintPhaseTextClip) or nothing (other paint phases) according to pain
tInfo.phase. | 45 // and PaintPhaseTextClip) or nothing (other paint phases) according to pain
tInfo.phase. |
44 void paintAsPseudoStackingContext(const PaintInfo&, const LayoutPoint& paint
Offset); | 46 void paintAllPhasesAtomically(const PaintInfo&, const LayoutPoint& paintOffs
et); |
45 | 47 |
46 private: | 48 private: |
47 static void drawDashedOrDottedBoxSide(GraphicsContext&, int x1, int y1, int
x2, int y2, | 49 static void drawDashedOrDottedBoxSide(GraphicsContext&, int x1, int y1, int
x2, int y2, |
48 BoxSide, Color, int thickness, EBorderStyle, bool antialias); | 50 BoxSide, Color, int thickness, EBorderStyle, bool antialias); |
49 static void drawDoubleBoxSide(GraphicsContext&, int x1, int y1, int x2, int
y2, | 51 static void drawDoubleBoxSide(GraphicsContext&, int x1, int y1, int x2, int
y2, |
50 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac
entWidth2, bool antialias); | 52 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac
entWidth2, bool antialias); |
51 static void drawRidgeOrGrooveBoxSide(GraphicsContext&, int x1, int y1, int x
2, int y2, | 53 static void drawRidgeOrGrooveBoxSide(GraphicsContext&, int x1, int y1, int x
2, int y2, |
52 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); | 54 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); |
53 static void drawSolidBoxSide(GraphicsContext&, int x1, int y1, int x2, int y
2, | 55 static void drawSolidBoxSide(GraphicsContext&, int x1, int y1, int x2, int y
2, |
54 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); | 56 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); |
55 | 57 |
56 const LayoutObject& m_layoutObject; | 58 const LayoutObject& m_layoutObject; |
57 }; | 59 }; |
58 | 60 |
59 } // namespace blink | 61 } // namespace blink |
60 | 62 |
61 #endif | 63 #endif |
OLD | NEW |