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

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

Issue 2943573002: Make NGInlineItemsBuilder construct whitespace-collapsed offset mapping (Closed)
Patch Set: Wed Jun 28 11:44:29 PDT 2017 Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EmptyOffsetMappingBuilder_h 5 #ifndef EmptyOffsetMappingBuilder_h
6 #define EmptyOffsetMappingBuilder_h 6 #define EmptyOffsetMappingBuilder_h
7 7
8 #include "platform/wtf/Allocator.h" 8 #include "platform/wtf/Allocator.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // A mock class providing all APIs of an offset mapping builder, but not doing 12 // A mock class providing all APIs of an offset mapping builder, but not doing
13 // anything. For templates functions/classes that can optionally create an 13 // anything. For templates functions/classes that can optionally create an
14 // offset mapping, this mock class is passed to create an instantiation that 14 // offset mapping, this mock class is passed to create an instantiation that
15 // does not create any offset mapping. 15 // does not create any offset mapping.
16 class EmptyOffsetMappingBuilder { 16 class EmptyOffsetMappingBuilder {
17 STACK_ALLOCATED(); 17 STACK_ALLOCATED();
18 18
19 public: 19 public:
20 EmptyOffsetMappingBuilder() = default; 20 EmptyOffsetMappingBuilder() = default;
21 void AppendIdentityMapping(unsigned) {}
22 void AppendCollapsedMapping(unsigned) {}
23 void CollapseTrailingSpace(unsigned) {}
21 24
22 private: 25 private:
23 DISALLOW_COPY_AND_ASSIGN(EmptyOffsetMappingBuilder); 26 DISALLOW_COPY_AND_ASSIGN(EmptyOffsetMappingBuilder);
24 }; 27 };
25 28
26 } // namespace blink 29 } // namespace blink
27 30
28 #endif // EmptyOffsetMappingBuilder_h 31 #endif // EmptyOffsetMappingBuilder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698