| Index: third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h
|
| index 79f9d07250c41fea5d3c694f5f4c15efd54c0783..80293583afa7acd04e8381edbbff66f71f22010b 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h
|
| +++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h
|
| @@ -6,24 +6,56 @@
|
| #define NGLineBreaker_h
|
|
|
| #include "core/CoreExport.h"
|
| +#include "core/layout/ng/inline/ng_inline_item_result.h"
|
| #include "platform/heap/Handle.h"
|
| #include "platform/wtf/text/AtomicString.h"
|
|
|
| namespace blink {
|
|
|
| +class LazyLineBreakIterator;
|
| +class NGInlineBreakToken;
|
| +class NGInlineItem;
|
| +class NGInlineNode;
|
| class NGInlineLayoutAlgorithm;
|
|
|
| // Represents a line breaker.
|
| +//
|
| +// This class measures each NGInlineItem and determines items to form a line,
|
| +// so that NGInlineLayoutAlgorithm can build a line box from the output.
|
| class CORE_EXPORT NGLineBreaker {
|
| public:
|
| - NGLineBreaker(const AtomicString locale) : locale_(locale) {}
|
| + NGLineBreaker(NGInlineNode*,
|
| + const NGConstraintSpace*,
|
| + NGInlineBreakToken* = nullptr);
|
| ~NGLineBreaker() {}
|
| STACK_ALLOCATED();
|
|
|
| - void BreakLines(NGInlineLayoutAlgorithm*, const String&, unsigned);
|
| + // Compute the next line break point and produces NGInlineItemResults for
|
| + // the line.
|
| + // TODO(kojii): NGInlineLayoutAlgorithm is needed because floats require
|
| + // not only constraint space but also container builder. Consider refactor
|
| + // not to require algorithm.
|
| + void NextLine(NGInlineItemResults*, NGInlineLayoutAlgorithm*);
|
| +
|
| + // Create an NGInlineBreakToken for the last line returned by NextLine().
|
| + RefPtr<NGInlineBreakToken> CreateBreakToken() const;
|
|
|
| private:
|
| + void BreakLine(NGInlineItemResults*, NGInlineLayoutAlgorithm*);
|
| +
|
| + void LayoutAtomicInline(const NGInlineItem&, NGInlineItemResult*);
|
| +
|
| + void HandleOverflow(NGInlineItemResults*, const LazyLineBreakIterator&);
|
| +
|
| + void SkipCollapsibleWhitespaces();
|
| +
|
| + void AppendCloseTags(NGInlineItemResults*);
|
| +
|
| + Persistent<NGInlineNode> node_;
|
| + const NGConstraintSpace* constraint_space_;
|
| const AtomicString locale_;
|
| + unsigned item_index_;
|
| + unsigned offset_;
|
| };
|
|
|
| } // namespace blink
|
|
|