| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/inline/ng_inline_item_result.h" | 5 #include "core/layout/ng/inline/ng_inline_item_result.h" |
| 6 | 6 |
| 7 #include "core/layout/ng/inline/ng_inline_node.h" |
| 8 |
| 7 namespace blink { | 9 namespace blink { |
| 8 | 10 |
| 9 NGInlineItemResult::NGInlineItemResult() {} | 11 NGInlineItemResult::NGInlineItemResult() {} |
| 10 | 12 |
| 11 NGInlineItemResult::NGInlineItemResult(unsigned index, | 13 NGInlineItemResult::NGInlineItemResult(unsigned index, |
| 12 unsigned start, | 14 unsigned start, |
| 13 unsigned end) | 15 unsigned end) |
| 14 : item_index(index), | 16 : item_index(index), |
| 15 start_offset(start), | 17 start_offset(start), |
| 16 end_offset(end), | 18 end_offset(end), |
| 17 no_break_opportunities_inside(false), | 19 no_break_opportunities_inside(false), |
| 18 prohibit_break_after(false) {} | 20 prohibit_break_after(false) {} |
| 19 | 21 |
| 22 void NGLineInfo::SetLineStyle(const NGInlineNode& node, bool is_first_line) { |
| 23 LayoutObject* layout_object = node.GetLayoutObject(); |
| 24 if (is_first_line && |
| 25 layout_object->GetDocument().GetStyleEngine().UsesFirstLineRules()) { |
| 26 is_first_line_ = true; |
| 27 line_style_ = layout_object->FirstLineStyle(); |
| 28 return; |
| 29 } |
| 30 is_first_line_ = false; |
| 31 line_style_ = layout_object->Style(); |
| 32 } |
| 33 |
| 20 } // namespace blink | 34 } // namespace blink |
| OLD | NEW |