| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NGInlineLayoutAlgorithm_h | |
| 6 #define NGInlineLayoutAlgorithm_h | |
| 7 | |
| 8 #include "core/CoreExport.h" | |
| 9 #include "core/layout/ng/ng_break_token.h" | |
| 10 #include "core/layout/ng/ng_layout_algorithm.h" | |
| 11 #include "platform/heap/Handle.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class NGInlineNode; | |
| 16 class NGLineBuilder; | |
| 17 | |
| 18 // A class for text layout. This takes a NGInlineNode which consists only | |
| 19 // non-atomic inlines and produces NGTextFragments. | |
| 20 // | |
| 21 // Unlike other layout algorithms this takes a NGInlineNode as its input instead | |
| 22 // of the ComputedStyle as it operates over multiple inlines with different | |
| 23 // style. | |
| 24 class CORE_EXPORT NGTextLayoutAlgorithm : public NGLayoutAlgorithm { | |
| 25 public: | |
| 26 // Default constructor. | |
| 27 // @param inline_box The inline box to produce fragments from. | |
| 28 // @param space The constraint space which the algorithm should generate a | |
| 29 // fragments within. | |
| 30 NGTextLayoutAlgorithm(NGInlineNode* inline_box, | |
| 31 NGBreakToken* break_token = nullptr); | |
| 32 | |
| 33 RefPtr<NGLayoutResult> Layout() override; | |
| 34 void LayoutInline(NGLineBuilder*); | |
| 35 | |
| 36 private: | |
| 37 Persistent<NGInlineNode> inline_box_; | |
| 38 NGBreakToken* break_token_; | |
| 39 | |
| 40 friend class NGInlineNodeTest; | |
| 41 }; | |
| 42 | |
| 43 } // namespace blink | |
| 44 | |
| 45 #endif // NGInlineLayoutAlgorithm_h | |
| OLD | NEW |