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

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

Issue 2842983002: [LayoutNG] Paint inlines from the fragment tree
Patch Set: Rebase w/HEAD 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NGBoxFragmentPainter_h
6 #define NGBoxFragmentPainter_h
7
8 #include "core/layout/BackgroundBleedAvoidance.h"
9 #include "core/paint/BoxPainterBase.h"
10 #include "platform/geometry/LayoutSize.h"
11 #include "platform/graphics/GraphicsTypes.h"
12 #include "platform/wtf/Allocator.h"
13 #include "third_party/skia/include/core/SkBlendMode.h"
14
15 namespace blink {
16
17 class ComputedStyle;
18 class FillLayer;
19 class LayoutPoint;
20 class LayoutRect;
21 class NGPhysicalBoxFragment;
22 class NGPhysicalLineBoxFragment;
23 class NGPhysicalFragment;
24 struct PaintInfo;
25 class Document;
26
27 class NGBoxFragmentPainter : public BoxPainterBase {
28 STACK_ALLOCATED();
29
30 public:
31 NGBoxFragmentPainter(const NGPhysicalBoxFragment* box_fragment)
32 : box_fragment_(box_fragment) {}
33 ~NGBoxFragmentPainter() {}
34 void Paint(const PaintInfo&, const LayoutPoint&);
35
36 void PaintChildren(const PaintInfo&, const LayoutPoint&);
37 void PaintLineBox(const NGPhysicalLineBoxFragment*,
38 const PaintInfo&,
39 const LayoutPoint& paint_offset);
40
41 void PaintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&);
42
43 void PaintFillLayers(const PaintInfo&,
44 const Color&,
45 const FillLayer&,
46 const LayoutRect&,
47 BackgroundBleedAvoidance = kBackgroundBleedNone,
48 SkBlendMode = SkBlendMode::kSrcOver,
49 const NGPhysicalFragment* bg_fragment = nullptr);
50
51 void PaintBoxDecorationBackgroundWithRect(const PaintInfo&,
52 const LayoutPoint&,
53 const LayoutRect&);
54 static void PaintFillLayer(const NGPhysicalBoxFragment*,
55 const PaintInfo&,
56 const Color&,
57 const FillLayer&,
58 const LayoutRect&,
59 BackgroundBleedAvoidance,
60 const NGPhysicalFragment* = nullptr,
61 const LayoutSize& = LayoutSize(),
62 SkBlendMode = SkBlendMode::kSrcOver,
63 const NGPhysicalFragment* bg_object = nullptr);
64
65 static void PaintBorder(const NGPhysicalBoxFragment*,
66 const PaintInfo&,
67 const LayoutRect&,
68 const ComputedStyle&,
69 BackgroundBleedAvoidance = kBackgroundBleedNone,
70 bool include_logical_left_edge = true,
71 bool include_logical_right_edge = true);
72
73 LayoutRect BoundsForDrawingRecorder(const PaintInfo&,
74 const LayoutPoint& adjusted_paint_offset);
75
76 private:
77 const Document& GetDocument() const;
78 void PaintBackground(const PaintInfo&,
79 const LayoutRect&,
80 const Color& background_color,
81 BackgroundBleedAvoidance = kBackgroundBleedNone);
82
83 const NGPhysicalBoxFragment* box_fragment_;
84 };
85
86 } // namespace blink
87
88 #endif // NGBoxFragmentPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698