Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1315)

Unified Diff: third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h

Issue 2960673004: Templatize NGInlineItemsBuilder to take a OffsetMappingBuilder parameter (Closed)
Patch Set: Move EmptyOffsetMappingBuilder to ng/inline/ Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698