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 BoxDecorationData_h
6 #define BoxDecorationData_h
8 #include "core/rendering/RenderBoxModelObject.h"
9 #include "platform/graphics/Color.h"
14 class GraphicsContext;
16 // Information extracted from RenderStyle for box painting.
17 class BoxDecorationData {
19 BoxDecorationData(const RenderStyle&, bool canRenderBorderImage, bool backgroundHasOpaqueTopLayer, GraphicsContext*);
21 Color backgroundColor;
25 BackgroundBleedAvoidance bleedAvoidance() { return static_cast<BackgroundBleedAvoidance>(m_bleedAvoidance); }
28 BackgroundBleedAvoidance determineBackgroundBleedAvoidance(const RenderStyle&, bool canRenderBorderImage, bool backgroundHasOpaqueTopLayer, GraphicsContext*);
29 bool borderObscuresBackgroundEdge(const RenderStyle&, const FloatSize& contextScale) const;
30 unsigned m_bleedAvoidance : 2; // BackgroundBleedAvoidance