Home | History | Annotate | Download | only in paint
      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 
     11 namespace blink {
     12 
     13 class Color;
     14 class FillLayer;
     15 class InlineFlowBox;
     16 class LayoutPoint;
     17 class LayoutRect;
     18 class LayoutUnit;
     19 struct PaintInfo;
     20 class RenderStyle;
     21 
     22 class InlineFlowBoxPainter {
     23 public:
     24     InlineFlowBoxPainter(InlineFlowBox& inlineFlowBox) : m_inlineFlowBox(inlineFlowBox) { }
     25     void paint(PaintInfo&, const LayoutPoint&, const LayoutUnit lineTop, const LayoutUnit lineBottom);
     26 
     27 private:
     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