| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BoxPainter_h | 5 #ifndef BoxPainter_h |
| 6 #define BoxPainter_h | 6 #define BoxPainter_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/paint/ObjectPainter.h" | 9 #include "core/paint/ObjectPainter.h" |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode =
SkXfermode::kSrcOver_Mode, LayoutObject* backgroundObject = 0); | 28 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, SkXfermode::Mode =
SkXfermode::kSrcOver_Mode, LayoutObject* backgroundObject = 0); |
| 29 void paintMaskImages(const PaintInfo&, const LayoutRect&); | 29 void paintMaskImages(const PaintInfo&, const LayoutRect&); |
| 30 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin
t&, const LayoutRect&); | 30 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin
t&, const LayoutRect&); |
| 31 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&,
const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl
ineFlowBox* = 0, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXfermode
::kSrcOver_Mode, LayoutObject* backgroundObject = 0, bool skipBaseColor = false)
; | 31 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&,
const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl
ineFlowBox* = 0, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXfermode
::kSrcOver_Mode, LayoutObject* backgroundObject = 0, bool skipBaseColor = false)
; |
| 32 static void calculateBackgroundImageGeometry(LayoutBoxModelObject&, const La
youtBoxModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRec
t, BackgroundImageGeometry&, LayoutObject* = 0); | 32 static void calculateBackgroundImageGeometry(LayoutBoxModelObject&, const La
youtBoxModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRec
t, BackgroundImageGeometry&, LayoutObject* = 0); |
| 33 static InterpolationQuality chooseInterpolationQuality(LayoutObject&, Graphi
csContext*, Image*, const void*, const LayoutSize&); | 33 static InterpolationQuality chooseInterpolationQuality(LayoutObject&, Graphi
csContext*, Image*, const void*, const LayoutSize&); |
| 34 static bool paintNinePieceImage(LayoutBoxModelObject&, GraphicsContext*, con
st LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode =
SkXfermode::kSrcOver_Mode); | 34 static bool paintNinePieceImage(LayoutBoxModelObject&, GraphicsContext*, con
st LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode =
SkXfermode::kSrcOver_Mode); |
| 35 static void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const Layou
tRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNone, bo
ol includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); | 35 static void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const Layou
tRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNone, bo
ol includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); |
| 36 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput
edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi
ghtEdge = true); | 36 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput
edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi
ghtEdge = true); |
| 37 static bool shouldAntialiasLines(GraphicsContext*); | 37 static bool shouldAntialiasLines(GraphicsContext*); |
| 38 static bool allCornersClippedOut(const FloatRoundedRect& border, const IntRe
ct& clipRect); |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg
roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); | 41 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg
roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); |
| 41 void paintRootBoxFillLayers(const PaintInfo&); | 42 void paintRootBoxFillLayers(const PaintInfo&); |
| 42 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, LayoutObject* backgroun
dObject, bool skipBaseColor = false); | 43 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, LayoutObject* backgroun
dObject, bool skipBaseColor = false); |
| 43 static void paintRootBackgroundColor(LayoutObject&, const PaintInfo&, const
LayoutRect&, const Color&); | 44 static void paintRootBackgroundColor(LayoutObject&, const PaintInfo&, const
LayoutRect&, const Color&); |
| 44 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou
tObject&, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const Lay
outSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); | 45 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou
tObject&, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const Lay
outSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); |
| 45 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout
Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight, | 46 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout
Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight, |
| 46 bool includeLogicalLeftEdge, bool includeLogicalRightEdge); | 47 bool includeLogicalLeftEdge, bool includeLogicalRightEdge); |
| 47 static bool isDocumentElementWithOpaqueBackground(LayoutObject&); | 48 static bool isDocumentElementWithOpaqueBackground(LayoutObject&); |
| 48 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&); | 49 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&); |
| 49 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&); | 50 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&); |
| 50 static IntSize calculateFillTileSize(const LayoutBoxModelObject&, const Fill
Layer&, const IntSize& scaledPositioningAreaSize); | 51 static IntSize calculateFillTileSize(const LayoutBoxModelObject&, const Fill
Layer&, const IntSize& scaledPositioningAreaSize); |
| 51 static void paintTranslucentBorderSides(GraphicsContext*, const ComputedStyl
e&, const FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, | |
| 52 const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool incl
udeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false); | |
| 53 static void paintOneBorderSide(GraphicsContext*, const ComputedStyle&, const
FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, | |
| 54 const FloatRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjac
entSide2, const BorderEdge[], | |
| 55 const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool
includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0); | |
| 56 static void paintBorderSides(GraphicsContext*, const ComputedStyle&, const F
loatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, | |
| 57 const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool incl
udeLogicalLeftEdge, | |
| 58 bool includeLogicalRightEdge, bool antialias = false, const Color* overr
ideColor = 0); | |
| 59 static void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const P
ath&, const BorderEdge[], | |
| 60 float thickness, float drawThickness, BoxSide, const ComputedStyle&, | |
| 61 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEd
ge, bool includeLogicalRightEdge); | |
| 62 static void clipBorderSidePolygon(GraphicsContext*, const FloatRoundedRect&
outerBorder, const FloatRoundedRect& innerBorder, | |
| 63 BoxSide, bool firstEdgeMatches, bool secondEdgeMatches); | |
| 64 static void clipBorderSideForComplexInnerPath(GraphicsContext*, const FloatR
oundedRect&, const FloatRoundedRect&, BoxSide, const BorderEdge[]); | |
| 65 | 52 |
| 66 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); | 53 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); |
| 67 LayoutRect rootBackgroundRect(); | 54 LayoutRect rootBackgroundRect(); |
| 68 | 55 |
| 69 // FIXME: this should be const. | 56 // FIXME: this should be const. |
| 70 LayoutBox& m_layoutBox; | 57 LayoutBox& m_layoutBox; |
| 71 }; | 58 }; |
| 72 | 59 |
| 73 } // namespace blink | 60 } // namespace blink |
| 74 | 61 |
| 75 #endif | 62 #endif |
| OLD | NEW |