Index: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.h |
index 24dc8d10fea5d58fa1fe545a63f02af269bd9fca..7cc65a7a20c7c0c34ee357ed4c46f922960b06ea 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.h |
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.h |
@@ -6,6 +6,7 @@ |
#define NGInlineItemsBuilder_h |
#include "core/CoreExport.h" |
+#include "core/layout/ng/inline/empty_offset_mapping_builder.h" |
#include "core/layout/ng/inline/ng_inline_node.h" |
#include "platform/wtf/Allocator.h" |
#include "platform/wtf/Vector.h" |
@@ -27,12 +28,16 @@ class NGInlineItem; |
// By calling EnterInline/ExitInline, it inserts bidirectional control |
// characters as defined in: |
// https://drafts.csswg.org/css-writing-modes-3/#bidi-control-codes-injection-table |
-class CORE_EXPORT NGInlineItemsBuilder { |
+// TODO(xiaochengh): Utilize the passed-in OffsetMappingBuilder to construct |
+// the whitespace-collapsed offset mapping. |
+template <typename OffsetMappingBuilder> |
+class CORE_TEMPLATE_CLASS_EXPORT NGInlineItemsBuilderTemplate { |
STACK_ALLOCATED(); |
public: |
- explicit NGInlineItemsBuilder(Vector<NGInlineItem>* items) : items_(items) {} |
- ~NGInlineItemsBuilder(); |
+ explicit NGInlineItemsBuilderTemplate(Vector<NGInlineItem>* items) |
+ : items_(items) {} |
+ ~NGInlineItemsBuilderTemplate(); |
String ToString(); |
@@ -122,6 +127,12 @@ class CORE_EXPORT NGInlineItemsBuilder { |
void Exit(LayoutObject*); |
}; |
+extern template class CORE_EXTERN_TEMPLATE_EXPORT |
+ NGInlineItemsBuilderTemplate<EmptyOffsetMappingBuilder>; |
+ |
+using NGInlineItemsBuilder = |
+ NGInlineItemsBuilderTemplate<EmptyOffsetMappingBuilder>; |
+ |
} // namespace blink |
#endif // NGInlineItemsBuilder_h |