Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 24 STACK_ALLOCATED(); | 24 STACK_ALLOCATED(); |
| 25 public: | 25 public: |
| 26 ObjectPainter(const LayoutObject& layoutObject) : m_layoutObject(layoutObjec t) { } | 26 ObjectPainter(const LayoutObject& layoutObject) : m_layoutObject(layoutObjec t) { } |
| 27 | 27 |
| 28 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset); | 28 void paintOutline(const PaintInfo&, const LayoutPoint& paintOffset); |
| 29 void paintInlineChildrenOutlines(const PaintInfo&, const LayoutPoint& paintO ffset); | 29 void paintInlineChildrenOutlines(const PaintInfo&, const LayoutPoint& paintO ffset); |
| 30 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset) ; | 30 void addPDFURLRectIfNeeded(const PaintInfo&, const LayoutPoint& paintOffset) ; |
| 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 all phases atomically if needed as if the element established its own stacking context. | |
| 35 // (See Appendix E.2, section 7.2.1.4 on inline block/table/replaced element s in the CSS2.1 specification.) | |
| 36 // This is used to paint inline-block elements, flex items, grid items, floa ts, etc. | |
| 37 // It is expected that the caller will call this function independent of the value of paintInfo.phase, | |
| 38 // and this function will do atomic paint, normal paint or nothing according to paintInfo.phase. | |
| 39 void paintAsStackingContext(const PaintInfo&, const LayoutPoint& paintOffset ); | |
|
chrishtr
2016/01/07 01:51:26
Similarly: paintAsPseudoStackingContext?
Xianzhu
2016/01/07 17:02:40
Done.
| |
| 40 | |
| 34 private: | 41 private: |
| 35 static void drawDashedOrDottedBoxSide(GraphicsContext&, int x1, int y1, int x2, int y2, | 42 static void drawDashedOrDottedBoxSide(GraphicsContext&, int x1, int y1, int x2, int y2, |
| 36 BoxSide, Color, int thickness, EBorderStyle, bool antialias); | 43 BoxSide, Color, int thickness, EBorderStyle, bool antialias); |
| 37 static void drawDoubleBoxSide(GraphicsContext&, int x1, int y1, int x2, int y2, | 44 static void drawDoubleBoxSide(GraphicsContext&, int x1, int y1, int x2, int y2, |
| 38 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias); | 45 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias); |
| 39 static void drawRidgeOrGrooveBoxSide(GraphicsContext&, int x1, int y1, int x 2, int y2, | 46 static void drawRidgeOrGrooveBoxSide(GraphicsContext&, int x1, int y1, int x 2, int y2, |
| 40 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias); | 47 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias); |
| 41 static void drawSolidBoxSide(GraphicsContext&, int x1, int y1, int x2, int y 2, | 48 static void drawSolidBoxSide(GraphicsContext&, int x1, int y1, int x2, int y 2, |
| 42 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); | 49 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); |
| 43 | 50 |
| 44 const LayoutObject& m_layoutObject; | 51 const LayoutObject& m_layoutObject; |
| 45 }; | 52 }; |
| 46 | 53 |
| 47 } // namespace blink | 54 } // namespace blink |
| 48 | 55 |
| 49 #endif | 56 #endif |
| OLD | NEW |