OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "core/layout/ng/ng_physical_fragment.h" | 5 #include "core/layout/ng/ng_physical_fragment.h" |
6 | 6 |
7 #include "core/layout/ng/ng_break_token.h" | 7 #include "core/layout/ng/ng_break_token.h" |
8 #include "core/layout/ng/ng_physical_box_fragment.h" | 8 #include "core/layout/ng/ng_physical_box_fragment.h" |
9 #include "core/layout/ng/ng_physical_text_fragment.h" | 9 #include "core/layout/ng/ng_physical_text_fragment.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 type_(type), | 22 type_(type), |
23 is_placed_(false) {} | 23 is_placed_(false) {} |
24 | 24 |
25 void NGPhysicalFragment::destroy() const { | 25 void NGPhysicalFragment::destroy() const { |
26 if (Type() == kFragmentText) | 26 if (Type() == kFragmentText) |
27 delete static_cast<const NGPhysicalTextFragment*>(this); | 27 delete static_cast<const NGPhysicalTextFragment*>(this); |
28 else | 28 else |
29 delete static_cast<const NGPhysicalBoxFragment*>(this); | 29 delete static_cast<const NGPhysicalBoxFragment*>(this); |
30 } | 30 } |
31 | 31 |
| 32 const ComputedStyle& NGPhysicalFragment::Style() const { |
| 33 DCHECK(layout_object_); |
| 34 return layout_object_->styleRef(); |
| 35 } |
| 36 |
32 } // namespace blink | 37 } // namespace blink |
OLD | NEW |