| Index: third_party/WebKit/Source/core/paint/NGBoxFragmentPainter.h
|
| diff --git a/third_party/WebKit/Source/core/paint/NGBoxFragmentPainter.h b/third_party/WebKit/Source/core/paint/NGBoxFragmentPainter.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c544649d6e6217c35a63158ba34e15ca28bae8e7
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/paint/NGBoxFragmentPainter.h
|
| @@ -0,0 +1,88 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef NGBoxFragmentPainter_h
|
| +#define NGBoxFragmentPainter_h
|
| +
|
| +#include "core/layout/BackgroundBleedAvoidance.h"
|
| +#include "core/paint/BoxPainterBase.h"
|
| +#include "platform/geometry/LayoutSize.h"
|
| +#include "platform/graphics/GraphicsTypes.h"
|
| +#include "platform/wtf/Allocator.h"
|
| +#include "third_party/skia/include/core/SkBlendMode.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class ComputedStyle;
|
| +class FillLayer;
|
| +class LayoutPoint;
|
| +class LayoutRect;
|
| +class NGPhysicalBoxFragment;
|
| +class NGPhysicalLineBoxFragment;
|
| +class NGPhysicalFragment;
|
| +struct PaintInfo;
|
| +class Document;
|
| +
|
| +class NGBoxFragmentPainter : public BoxPainterBase {
|
| + STACK_ALLOCATED();
|
| +
|
| + public:
|
| + NGBoxFragmentPainter(const NGPhysicalBoxFragment* box_fragment)
|
| + : box_fragment_(box_fragment) {}
|
| + ~NGBoxFragmentPainter() {}
|
| + void Paint(const PaintInfo&, const LayoutPoint&);
|
| +
|
| + void PaintChildren(const PaintInfo&, const LayoutPoint&);
|
| + void PaintLineBox(const NGPhysicalLineBoxFragment*,
|
| + const PaintInfo&,
|
| + const LayoutPoint& paint_offset);
|
| +
|
| + void PaintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&);
|
| +
|
| + void PaintFillLayers(const PaintInfo&,
|
| + const Color&,
|
| + const FillLayer&,
|
| + const LayoutRect&,
|
| + BackgroundBleedAvoidance = kBackgroundBleedNone,
|
| + SkBlendMode = SkBlendMode::kSrcOver,
|
| + const NGPhysicalFragment* bg_fragment = nullptr);
|
| +
|
| + void PaintBoxDecorationBackgroundWithRect(const PaintInfo&,
|
| + const LayoutPoint&,
|
| + const LayoutRect&);
|
| + static void PaintFillLayer(const NGPhysicalBoxFragment*,
|
| + const PaintInfo&,
|
| + const Color&,
|
| + const FillLayer&,
|
| + const LayoutRect&,
|
| + BackgroundBleedAvoidance,
|
| + const NGPhysicalFragment* = nullptr,
|
| + const LayoutSize& = LayoutSize(),
|
| + SkBlendMode = SkBlendMode::kSrcOver,
|
| + const NGPhysicalFragment* bg_object = nullptr);
|
| +
|
| + static void PaintBorder(const NGPhysicalBoxFragment*,
|
| + const PaintInfo&,
|
| + const LayoutRect&,
|
| + const ComputedStyle&,
|
| + BackgroundBleedAvoidance = kBackgroundBleedNone,
|
| + bool include_logical_left_edge = true,
|
| + bool include_logical_right_edge = true);
|
| +
|
| + LayoutRect BoundsForDrawingRecorder(const PaintInfo&,
|
| + const LayoutPoint& adjusted_paint_offset);
|
| +
|
| + private:
|
| + const Document& GetDocument() const;
|
| + void PaintBackground(const PaintInfo&,
|
| + const LayoutRect&,
|
| + const Color& background_color,
|
| + BackgroundBleedAvoidance = kBackgroundBleedNone);
|
| +
|
| + const NGPhysicalBoxFragment* box_fragment_;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // NGBoxFragmentPainter_h
|
|
|