| 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 30 matching lines...) Expand all Loading... |
| 41 void paintRootBoxFillLayers(const PaintInfo&); | 41 void paintRootBoxFillLayers(const PaintInfo&); |
| 42 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, LayoutObject* backgroun
dObject, bool skipBaseColor = false); | 42 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&); | 43 static void paintRootBackgroundColor(LayoutObject&, const PaintInfo&, const
LayoutRect&, const Color&); |
| 44 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou
tObject&, GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance, InlineF
lowBox*, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRigh
tEdge); | 44 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou
tObject&, GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance, InlineF
lowBox*, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRigh
tEdge); |
| 45 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout
Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight, | 45 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout
Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight, |
| 46 bool includeLogicalLeftEdge, bool includeLogicalRightEdge); | 46 bool includeLogicalLeftEdge, bool includeLogicalRightEdge); |
| 47 static bool isDocumentElementWithOpaqueBackground(LayoutObject&); | 47 static bool isDocumentElementWithOpaqueBackground(LayoutObject&); |
| 48 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&); | 48 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&); |
| 49 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&); | 49 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&); |
| 50 static IntSize calculateFillTileSize(const LayoutBoxModelObject&, const Fill
Layer&, const IntSize& scaledPositioningAreaSize); | 50 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, co
nst IntPoint& innerBorderAdjustment, | 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); | 52 const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool incl
udeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false); |
| 53 static LayoutRect borderInnerRectAdjustedForBleedAvoidance(GraphicsContext*,
const LayoutRect&, BackgroundBleedAvoidance); | |
| 54 static void paintOneBorderSide(GraphicsContext*, const ComputedStyle&, const
FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, | 53 static void paintOneBorderSide(GraphicsContext*, const ComputedStyle&, const
FloatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, |
| 55 const FloatRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjac
entSide2, const BorderEdge[], | 54 const FloatRect& sideRect, BoxSide, BoxSide adjacentSide1, BoxSide adjac
entSide2, const BorderEdge[], |
| 56 const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool
includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0); | 55 const Path*, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool
includeLogicalRightEdge, bool antialias, const Color* overrideColor = 0); |
| 57 static void paintBorderSides(GraphicsContext*, const ComputedStyle&, const F
loatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, | 56 static void paintBorderSides(GraphicsContext*, const ComputedStyle&, const F
loatRoundedRect& outerBorder, const FloatRoundedRect& innerBorder, |
| 58 const IntPoint& innerBorderAdjustment, const BorderEdge[], BorderEdgeFla
gs, BackgroundBleedAvoidance, | 57 const BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance, bool incl
udeLogicalLeftEdge, |
| 59 bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialia
s = false, const Color* overrideColor = 0); | 58 bool includeLogicalRightEdge, bool antialias = false, const Color* overr
ideColor = 0); |
| 60 static void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const P
ath&, const BorderEdge[], | 59 static void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const P
ath&, const BorderEdge[], |
| 61 float thickness, float drawThickness, BoxSide, const ComputedStyle&, | 60 float thickness, float drawThickness, BoxSide, const ComputedStyle&, |
| 62 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEd
ge, bool includeLogicalRightEdge); | 61 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEd
ge, bool includeLogicalRightEdge); |
| 63 static void clipBorderSidePolygon(GraphicsContext*, const FloatRoundedRect&
outerBorder, const FloatRoundedRect& innerBorder, | 62 static void clipBorderSidePolygon(GraphicsContext*, const FloatRoundedRect&
outerBorder, const FloatRoundedRect& innerBorder, |
| 64 BoxSide, bool firstEdgeMatches, bool secondEdgeMatches); | 63 BoxSide, bool firstEdgeMatches, bool secondEdgeMatches); |
| 65 static void clipBorderSideForComplexInnerPath(GraphicsContext*, const FloatR
oundedRect&, const FloatRoundedRect&, BoxSide, const BorderEdge[]); | 64 static void clipBorderSideForComplexInnerPath(GraphicsContext*, const FloatR
oundedRect&, const FloatRoundedRect&, BoxSide, const BorderEdge[]); |
| 66 | 65 |
| 67 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); | 66 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); |
| 68 LayoutRect scrolledBackgroundRect(); | 67 LayoutRect scrolledBackgroundRect(); |
| 69 | 68 |
| 70 // FIXME: this should be const. | 69 // FIXME: this should be const. |
| 71 LayoutBox& m_layoutBox; | 70 LayoutBox& m_layoutBox; |
| 72 }; | 71 }; |
| 73 | 72 |
| 74 } // namespace blink | 73 } // namespace blink |
| 75 | 74 |
| 76 #endif | 75 #endif |
| OLD | NEW |