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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef BorderEdge_h
6 #define BorderEdge_h
7
8 #include "core/rendering/style/RenderStyleConstants.h"
9 #include "platform/graphics/Color.h"
10
11 namespace blink {
12
13 class BorderEdge {
pdr. 2014/09/09 20:45:42 This should probably be a struct.
chrishtr 2014/09/09 22:38:18 Done.
14 public:
15 BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bo ol edgeIsTransparent, bool edgeIsPresent = true);
16 BorderEdge();
17
18 bool hasVisibleColorAndStyle() const;
19 bool shouldRender() const;
20 bool presentButInvisible() const;
21 bool obscuresBackgroundEdge(float scale) const;
22 bool obscuresBackground() const;
23 int usedWidth() const;
24
25 void getDoubleBorderStripeWidths(int& outerWidth, int& innerWidth) const;
26
27 bool sharesColorWith(const BorderEdge& other) const;
28
29 int width;
30 Color color;
31 EBorderStyle style;
32 bool isTransparent;
33 bool isPresent;
pdr. 2014/09/09 20:45:42 Should we pack these too?
chrishtr 2014/09/09 22:38:18 Done
34 };
35
36 } // namespace blink
37
38 #endif // BorderEdge_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698