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.
5 #ifndef InlineFlowBoxPainter_h
6 #define InlineFlowBoxPainter_h
8 #include "core/style/ShadowData.h"
9 #include "platform/graphics/GraphicsTypes.h"
10 #include "platform/text/TextDirection.h"
11 #include "wtf/Allocator.h"
26 class InlineFlowBoxPainter
{
29 InlineFlowBoxPainter(InlineFlowBox
& inlineFlowBox
) : m_inlineFlowBox(inlineFlowBox
) { }
30 void paint(const PaintInfo
&, const LayoutPoint
& paintOffset
, const LayoutUnit lineTop
, const LayoutUnit lineBottom
);
32 LayoutRect
frameRectClampedToLineTopAndBottomIfNeeded() const;
35 void paintBoxDecorationBackground(const PaintInfo
&, const LayoutPoint
& paintOffset
, const LayoutRect
& cullRect
);
36 void paintMask(const PaintInfo
&, const LayoutPoint
& paintOffset
);
37 void paintFillLayers(const PaintInfo
&, const Color
&, const FillLayer
&, const LayoutRect
&, SkXfermode::Mode op
= SkXfermode::kSrcOver_Mode
);
38 void paintFillLayer(const PaintInfo
&, const Color
&, const FillLayer
&, const LayoutRect
&, SkXfermode::Mode op
);
39 void paintBoxShadow(const PaintInfo
&, const ComputedStyle
&, ShadowStyle
, const LayoutRect
& paintRect
);
40 LayoutRect
paintRectForImageStrip(const LayoutPoint
& paintOffset
, const LayoutSize
& frameSize
, TextDirection
) const;
42 enum BorderPaintingType
{
44 PaintBordersWithoutClip
,
47 BorderPaintingType
getBorderPaintType(const LayoutRect
& adjustedFrameRect
, IntRect
& adjustedClipRect
) const;
49 InlineFlowBox
& m_inlineFlowBox
;
54 #endif // InlineFlowBoxPainter_h