| OLD | NEW |
| 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 BorderEdge_h | 5 #ifndef BorderEdge_h |
| 6 #define BorderEdge_h | 6 #define BorderEdge_h |
| 7 | 7 |
| 8 #include "core/style/ComputedStyleConstants.h" | 8 #include "core/style/ComputedStyleConstants.h" |
| 9 #include "platform/graphics/Color.h" | 9 #include "platform/graphics/Color.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 struct BorderEdge { | 13 struct BorderEdge { |
| 14 BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bo
ol edgeIsTransparent, bool edgeIsPresent = true); | 14 BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bo
ol edgeIsPresent = true); |
| 15 BorderEdge(); | 15 BorderEdge(); |
| 16 | 16 |
| 17 bool hasVisibleColorAndStyle() const; | 17 bool hasVisibleColorAndStyle() const; |
| 18 bool shouldRender() const; | 18 bool shouldRender() const; |
| 19 bool presentButInvisible() const; | 19 bool presentButInvisible() const; |
| 20 bool obscuresBackgroundEdge() const; | 20 bool obscuresBackgroundEdge() const; |
| 21 bool obscuresBackground() const; | 21 bool obscuresBackground() const; |
| 22 int usedWidth() const; | 22 int usedWidth() const; |
| 23 | 23 |
| 24 bool sharesColorWith(const BorderEdge& other) const; | 24 bool sharesColorWith(const BorderEdge& other) const; |
| 25 | 25 |
| 26 EBorderStyle borderStyle() const { return static_cast<EBorderStyle>(style);
} | 26 EBorderStyle borderStyle() const { return static_cast<EBorderStyle>(style);
} |
| 27 | 27 |
| 28 enum DoubleBorderStripe { | 28 enum DoubleBorderStripe { |
| 29 DoubleBorderStripeOuter, | 29 DoubleBorderStripeOuter, |
| 30 DoubleBorderStripeInner | 30 DoubleBorderStripeInner |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 int getDoubleBorderStripeWidth(DoubleBorderStripe) const; | 33 int getDoubleBorderStripeWidth(DoubleBorderStripe) const; |
| 34 | 34 |
| 35 int width; | 35 int width; |
| 36 Color color; | 36 Color color; |
| 37 bool isTransparent; | |
| 38 bool isPresent; | 37 bool isPresent; |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 unsigned style: 4; // EBorderStyle | 40 unsigned style: 4; // EBorderStyle |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 } // namespace blink | 43 } // namespace blink |
| 45 | 44 |
| 46 #endif // BorderEdge_h | 45 #endif // BorderEdge_h |
| OLD | NEW |