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

Unified Diff: third_party/WebKit/Source/core/layout/ng/api/ng_offset_mapping_builder.h

Issue 2943573002: Make NGInlineItemsBuilder construct whitespace-collapsed offset mapping (Closed)
Patch Set: Wed Jun 21 16:40:35 PDT 2017 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/api/ng_offset_mapping_builder.h
diff --git a/third_party/WebKit/Source/core/layout/ng/api/ng_offset_mapping_builder.h b/third_party/WebKit/Source/core/layout/ng/api/ng_offset_mapping_builder.h
new file mode 100644
index 0000000000000000000000000000000000000000..0efde3353d1a62de64363ef549cd78149c715539
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/api/ng_offset_mapping_builder.h
@@ -0,0 +1,30 @@
+// 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 NGOffsetMappingBuilder_h
+#define NGOffsetMappingBuilder_h
+
+#include "core/CoreExport.h"
+#include "platform/wtf/Allocator.h"
+
+namespace blink {
+
+// TODO(xiaochengh): Documentation.
+class CORE_EXPORT NGOffsetMappingBuilder {
+ STACK_ALLOCATED();
+
+ public:
+ NGOffsetMappingBuilder();
+ virtual ~NGOffsetMappingBuilder();
yosin_UTC9 2017/06/22 03:31:04 Why interface? Do you want to introduce DoNothingO
Xiaocheng 2017/06/22 03:36:10 I would like to have different types of offset map
yosin_UTC9 2017/06/22 03:44:22 Editing is case 3. What cases do use 1 and 2?
+
+ virtual void AppendBijection(unsigned length);
+ virtual void AppendCollapsed(unsigned length);
+ virtual void CollapseLastCharacter();
+
+ DISALLOW_COPY_AND_ASSIGN(NGOffsetMappingBuilder);
yosin_UTC9 2017/06/22 03:31:04 nit: |DISALLOW_...| should be in private section.
Xiaocheng 2017/06/22 03:36:10 Will do.
+};
+
+} // namespace blink
+
+#endif // OffsetMappingBuilder_h

Powered by Google App Engine
This is Rietveld 408576698