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 3// found in the LICENSE file. 4 5#ifndef InlineFlowBoxPainter_h 6#define InlineFlowBoxPainter_h 7 8#include "core/rendering/style/ShadowData.h" 9#include "platform/graphics/GraphicsTypes.h" 10 11namespace blink { 12 13class Color; 14class FillLayer; 15class InlineFlowBox; 16class LayoutPoint; 17class LayoutRect; 18class LayoutUnit; 19struct PaintInfo; 20class RenderStyle; 21 22class InlineFlowBoxPainter { 23public: 24 InlineFlowBoxPainter(InlineFlowBox& inlineFlowBox) : m_inlineFlowBox(inlineFlowBox) { } 25 void paint(PaintInfo&, const LayoutPoint&, const LayoutUnit lineTop, const LayoutUnit lineBottom); 26 27private: 28 void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&); 29 void paintMask(PaintInfo&, const LayoutPoint&); 30 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, CompositeOperator = CompositeSourceOver); 31 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, CompositeOperator); 32 void paintBoxShadow(const PaintInfo&, RenderStyle*, ShadowStyle, const LayoutRect&); 33 LayoutRect roundedFrameRectClampedToLineTopAndBottomIfNeeded() const; 34 35 InlineFlowBox& m_inlineFlowBox; 36}; 37 38} // namespace blink 39 40#endif // InlineFlowBoxPainter_h 41