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 BoxDecorationData_h | 5 #ifndef BoxDecorationData_h |
6 #define BoxDecorationData_h | 6 #define BoxDecorationData_h |
7 | 7 |
8 #include "core/layout/BackgroundBleedAvoidance.h" | 8 #include "core/layout/BackgroundBleedAvoidance.h" |
9 #include "platform/graphics/Color.h" | 9 #include "platform/graphics/Color.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class LayoutBox; | 13 class LayoutBox; |
| 14 class NGPhysicalFragment; |
| 15 class ComputedStyle; |
14 | 16 |
15 // Information extracted from ComputedStyle for box painting. | 17 // Information extracted from ComputedStyle for box painting. |
16 struct BoxDecorationData { | 18 struct BoxDecorationData { |
17 STACK_ALLOCATED(); | 19 STACK_ALLOCATED(); |
18 | 20 |
19 public: | 21 public: |
20 BoxDecorationData(const LayoutBox&); | 22 BoxDecorationData(const LayoutBox&); |
| 23 BoxDecorationData(const NGPhysicalFragment*); |
21 | 24 |
22 Color background_color; | 25 Color background_color; |
23 BackgroundBleedAvoidance bleed_avoidance; | 26 BackgroundBleedAvoidance bleed_avoidance; |
24 bool has_background; | 27 bool has_background; |
25 bool has_border_decoration; | 28 bool has_border_decoration; |
26 bool has_appearance; | 29 bool has_appearance; |
27 | 30 |
28 private: | 31 private: |
| 32 BoxDecorationData(const ComputedStyle*); |
29 BackgroundBleedAvoidance DetermineBackgroundBleedAvoidance(const LayoutBox&); | 33 BackgroundBleedAvoidance DetermineBackgroundBleedAvoidance(const LayoutBox&); |
30 }; | 34 }; |
31 | 35 |
32 } // namespace blink | 36 } // namespace blink |
33 | 37 |
34 #endif | 38 #endif |
OLD | NEW |