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

Unified Diff: Source/core/rendering/style/BorderEdge.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 debug build. 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
Index: Source/core/rendering/style/BorderEdge.h
diff --git a/Source/core/rendering/style/BorderEdge.h b/Source/core/rendering/style/BorderEdge.h
new file mode 100644
index 0000000000000000000000000000000000000000..fb7fcac0dea94cef3201af5dceaf8cad9914123b
--- /dev/null
+++ b/Source/core/rendering/style/BorderEdge.h
@@ -0,0 +1,38 @@
+// 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 BorderEdge_h
+#define BorderEdge_h
+
+#include "core/rendering/style/RenderStyleConstants.h"
+#include "platform/graphics/Color.h"
+
+namespace blink {
+
+class BorderEdge {
pdr. 2014/09/09 20:45:42 This should probably be a struct.
chrishtr 2014/09/09 22:38:18 Done.
+public:
+ BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent = true);
+ BorderEdge();
+
+ bool hasVisibleColorAndStyle() const;
+ bool shouldRender() const;
+ bool presentButInvisible() const;
+ bool obscuresBackgroundEdge(float scale) const;
+ bool obscuresBackground() const;
+ int usedWidth() const;
+
+ void getDoubleBorderStripeWidths(int& outerWidth, int& innerWidth) const;
+
+ bool sharesColorWith(const BorderEdge& other) const;
+
+ int width;
+ Color color;
+ EBorderStyle style;
+ bool isTransparent;
+ bool isPresent;
pdr. 2014/09/09 20:45:42 Should we pack these too?
chrishtr 2014/09/09 22:38:18 Done
+};
+
+} // namespace blink
+
+#endif // BorderEdge_h

Powered by Google App Engine
This is Rietveld 408576698