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

Unified Diff: Source/core/paint/BoxDecorationData.h

Issue 550363004: Factor painting code out of RenderBox into a new class called BoxPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/BoxDecorationData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxDecorationData.h
diff --git a/Source/core/paint/BoxDecorationData.h b/Source/core/paint/BoxDecorationData.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba1e808125e282e672c9e0fbc4c1a4e1abfa9eac
--- /dev/null
+++ b/Source/core/paint/BoxDecorationData.h
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BoxDecorationData_h
+#define BoxDecorationData_h
+
+#include "core/rendering/RenderBoxModelObject.h"
+#include "platform/graphics/Color.h"
+
+namespace blink {
+
+class RenderStyle;
+class GraphicsContext;
+
+// Information extracted from RenderStyle for box painting.
+class BoxDecorationData {
+public:
+ BoxDecorationData(const RenderStyle&, bool canRenderBorderImage, bool backgroundHasOpaqueTopLayer, GraphicsContext*);
+
+ Color backgroundColor;
+ bool hasBackground;
+ bool hasBorder;
+ bool hasAppearance;
+ BackgroundBleedAvoidance bleedAvoidance() { return static_cast<BackgroundBleedAvoidance>(m_bleedAvoidance); }
+
+private:
+ BackgroundBleedAvoidance determineBackgroundBleedAvoidance(const RenderStyle&, bool canRenderBorderImage, bool backgroundHasOpaqueTopLayer, GraphicsContext*);
+ bool borderObscuresBackgroundEdge(const RenderStyle&, const FloatSize& contextScale) const;
+ unsigned m_bleedAvoidance : 2; // BackgroundBleedAvoidance
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/paint/BoxDecorationData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698