Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / paint / InlineFlowBoxPainter.h
blob23cc4d5da9c24263d1c1dcaf7928942f8dbb0419
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"
13 namespace blink {
15 class Color;
16 class FillLayer;
17 class InlineFlowBox;
18 class IntRect;
19 class LayoutPoint;
20 class LayoutRect;
21 class LayoutSize;
22 class LayoutUnit;
23 struct PaintInfo;
24 class ComputedStyle;
26 class InlineFlowBoxPainter {
27 STACK_ALLOCATED();
28 public:
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;
34 private:
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 {
43 DontPaintBorders,
44 PaintBordersWithoutClip,
45 PaintBordersWithClip
47 BorderPaintingType getBorderPaintType(const LayoutRect& adjustedFrameRect, IntRect& adjustedClipRect) const;
49 InlineFlowBox& m_inlineFlowBox;
52 } // namespace blink
54 #endif // InlineFlowBoxPainter_h