Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: third_party/WebKit/Source/core/paint/BoxPainter.h

Issue 2942123002: Break LayoutObject dependency for NinePieceImagePainter (Closed)
Patch Set: Pass document explicitly Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 BoxPainter_h 5 #ifndef BoxPainter_h
6 #define BoxPainter_h 6 #define BoxPainter_h
7 7
8 #include "core/layout/BackgroundBleedAvoidance.h" 8 #include "core/layout/BackgroundBleedAvoidance.h"
9 #include "core/paint/BoxPainterBase.h" 9 #include "core/paint/BoxPainterBase.h"
10 #include "core/paint/RoundedInnerRectClipper.h" 10 #include "core/paint/RoundedInnerRectClipper.h"
11 #include "platform/geometry/LayoutSize.h" 11 #include "platform/geometry/LayoutSize.h"
12 #include "platform/graphics/GraphicsTypes.h" 12 #include "platform/graphics/GraphicsTypes.h"
13 #include "platform/wtf/Allocator.h" 13 #include "platform/wtf/Allocator.h"
14 #include "platform/wtf/Optional.h"
15 #include "third_party/skia/include/core/SkBlendMode.h"
16 14
17 namespace blink { 15 namespace blink {
18 16
19 class ComputedStyle;
20 class FillLayer; 17 class FillLayer;
21 class GraphicsContext;
22 class InlineFlowBox; 18 class InlineFlowBox;
23 class LayoutPoint; 19 class LayoutPoint;
24 class LayoutRect; 20 class LayoutRect;
25 class NinePieceImage;
26 struct PaintInfo; 21 struct PaintInfo;
27 class LayoutBox; 22 class LayoutBox;
28 class LayoutObject; 23 class LayoutObject;
29 class LayoutBoxModelObject; 24 class LayoutBoxModelObject;
30 25
31 class BoxPainter : public BoxPainterBase { 26 class BoxPainter : public BoxPainterBase {
32 STACK_ALLOCATED(); 27 STACK_ALLOCATED();
33 28
34 public: 29 public:
35 BoxPainter(const LayoutBox& layout_box) : layout_box_(layout_box) {} 30 BoxPainter(const LayoutBox& layout_box) : layout_box_(layout_box) {}
(...skipping 18 matching lines...) Expand all
54 static void PaintFillLayer(const LayoutBoxModelObject&, 49 static void PaintFillLayer(const LayoutBoxModelObject&,
55 const PaintInfo&, 50 const PaintInfo&,
56 const Color&, 51 const Color&,
57 const FillLayer&, 52 const FillLayer&,
58 const LayoutRect&, 53 const LayoutRect&,
59 BackgroundBleedAvoidance, 54 BackgroundBleedAvoidance,
60 const InlineFlowBox* = nullptr, 55 const InlineFlowBox* = nullptr,
61 const LayoutSize& = LayoutSize(), 56 const LayoutSize& = LayoutSize(),
62 SkBlendMode = SkBlendMode::kSrcOver, 57 SkBlendMode = SkBlendMode::kSrcOver,
63 const LayoutObject* background_object = nullptr); 58 const LayoutObject* background_object = nullptr);
64 static bool PaintNinePieceImage(const LayoutBoxModelObject&,
65 GraphicsContext&,
66 const LayoutRect&,
67 const ComputedStyle&,
68 const NinePieceImage&,
69 SkBlendMode = SkBlendMode::kSrcOver);
70 static void PaintBorder(const LayoutBoxModelObject&,
71 const PaintInfo&,
72 const LayoutRect&,
73 const ComputedStyle&,
74 BackgroundBleedAvoidance = kBackgroundBleedNone,
75 bool include_logical_left_edge = true,
76 bool include_logical_right_edge = true);
77
78 LayoutRect BoundsForDrawingRecorder(const PaintInfo&, 59 LayoutRect BoundsForDrawingRecorder(const PaintInfo&,
79 const LayoutPoint& adjusted_paint_offset); 60 const LayoutPoint& adjusted_paint_offset);
80 61
81 static bool IsPaintingBackgroundOfPaintContainerIntoScrollingContentsLayer( 62 static bool IsPaintingBackgroundOfPaintContainerIntoScrollingContentsLayer(
82 const LayoutBoxModelObject*, 63 const LayoutBoxModelObject*,
83 const PaintInfo&); 64 const PaintInfo&);
84 65
85 private: 66 private:
86 void PaintBackground(const PaintInfo&, 67 void PaintBackground(const PaintInfo&,
87 const LayoutRect&, 68 const LayoutRect&,
88 const Color& background_color, 69 const Color& background_color,
89 BackgroundBleedAvoidance = kBackgroundBleedNone); 70 BackgroundBleedAvoidance = kBackgroundBleedNone);
71 Node* GetNode();
90 72
91 const LayoutBox& layout_box_; 73 const LayoutBox& layout_box_;
92 }; 74 };
93 75
94 } // namespace blink 76 } // namespace blink
95 77
96 #endif 78 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp ('k') | third_party/WebKit/Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698