Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Side by Side Diff: Source/core/paint/BoxPainter.h

Issue 1196223008: ViewPainter should skip background in print economy mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix unittests Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 25 matching lines...) Expand all
36 void paintMaskImages(const PaintInfo&, const LayoutRect&); 36 void paintMaskImages(const PaintInfo&, const LayoutRect&);
37 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin t&, const LayoutRect&); 37 void paintBoxDecorationBackgroundWithRect(const PaintInfo&, const LayoutPoin t&, const LayoutRect&);
38 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl ineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXf ermode::kSrcOver_Mode, LayoutObject* backgroundObject = nullptr); 38 static void paintFillLayerExtended(LayoutBoxModelObject&, const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, Inl ineFlowBox* = nullptr, const LayoutSize& = LayoutSize(), SkXfermode::Mode = SkXf ermode::kSrcOver_Mode, LayoutObject* backgroundObject = nullptr);
39 static void calculateBackgroundImageGeometry(LayoutBoxModelObject&, const La youtBoxModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRec t, BackgroundImageGeometry&, LayoutObject* backgroundObject = nullptr); 39 static void calculateBackgroundImageGeometry(LayoutBoxModelObject&, const La youtBoxModelObject* paintContainer, const FillLayer&, const LayoutRect& paintRec t, BackgroundImageGeometry&, LayoutObject* backgroundObject = nullptr);
40 static InterpolationQuality chooseInterpolationQuality(LayoutObject&, Graphi csContext*, Image*, const void*, const LayoutSize&); 40 static InterpolationQuality chooseInterpolationQuality(LayoutObject&, Graphi csContext*, Image*, const void*, const LayoutSize&);
41 static bool paintNinePieceImage(LayoutBoxModelObject&, GraphicsContext*, con st LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode = SkXfermode::kSrcOver_Mode); 41 static bool paintNinePieceImage(LayoutBoxModelObject&, GraphicsContext*, con st LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode = SkXfermode::kSrcOver_Mode);
42 static void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const Layou tRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNone, bo ol includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); 42 static void paintBorder(LayoutBoxModelObject&, const PaintInfo&, const Layou tRect&, const ComputedStyle&, BackgroundBleedAvoidance = BackgroundBleedNone, bo ol includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
43 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi ghtEdge = true); 43 static void paintBoxShadow(const PaintInfo&, const LayoutRect&, const Comput edStyle&, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRi ghtEdge = true);
44 static bool shouldAntialiasLines(GraphicsContext*); 44 static bool shouldAntialiasLines(GraphicsContext*);
45 static bool allCornersClippedOut(const FloatRoundedRect& border, const IntRe ct& clipRect); 45 static bool allCornersClippedOut(const FloatRoundedRect& border, const IntRe ct& clipRect);
46 static bool shouldForceWhiteBackgroundForPrintEconomy(const ComputedStyle&, const Document&);
chrishtr 2015/06/24 22:13:21 Add a comment explaining what this is. Maybe an ex
46 47
47 private: 48 private:
48 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); 49 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg roundColor, BackgroundBleedAvoidance = BackgroundBleedNone);
49 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, LayoutObject* backgroun dObject = nullptr); 50 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const LayoutRect&, BackgroundBleedAvoidance, SkXfermode::Mode, LayoutObject* backgroun dObject = nullptr);
50 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou tObject&, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const Lay outSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); 51 static FloatRoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(Layou tObject&, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const Lay outSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
51 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight, 52 static FloatRoundedRect getBackgroundRoundedRect(LayoutObject&, const Layout Rect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
52 bool includeLogicalLeftEdge, bool includeLogicalRightEdge); 53 bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
53 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&); 54 static void applyBoxShadowForBackground(GraphicsContext*, LayoutObject&);
54 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&); 55 static bool fixedBackgroundPaintsInLocalCoordinates(const LayoutObject&);
55 static IntSize calculateFillTileSize(const LayoutBoxModelObject&, const Fill Layer&, const IntSize& scaledPositioningAreaSize); 56 static IntSize calculateFillTileSize(const LayoutBoxModelObject&, const Fill Layer&, const IntSize& scaledPositioningAreaSize);
56 57
57 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset); 58 LayoutRect boundsForDrawingRecorder(const LayoutPoint& paintOffset);
58 59
59 // FIXME: this should be const. 60 // FIXME: this should be const.
60 LayoutBox& m_layoutBox; 61 LayoutBox& m_layoutBox;
61 }; 62 };
62 63
63 } // namespace blink 64 } // namespace blink
64 65
65 #endif 66 #endif
OLDNEW
« no previous file with comments | « LayoutTests/printing/print-no-background-expected.html ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698