Index: third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h b/third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..825ede41c6f6105293891729bfe01dfb7f3a55c4 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h |
@@ -0,0 +1,28 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef EmptyOffsetMappingBuilder_h |
+#define EmptyOffsetMappingBuilder_h |
+ |
+#include "platform/wtf/Allocator.h" |
+ |
+namespace blink { |
+ |
+// A mock class providing all APIs of an offset mapping builder, but not doing |
+// anything. For templates functions/classes that can optionally create an |
+// offset mapping, this mock class is passed to create an instantiation that |
+// does not create any offset mapping. |
+class EmptyOffsetMappingBuilder { |
+ STACK_ALLOCATED(); |
+ |
+ public: |
+ EmptyOffsetMappingBuilder() = default; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(EmptyOffsetMappingBuilder); |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // EmptyOffsetMappingBuilder_h |