Commit 0eb47bbf authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

[LayoutNG] Reorganize code in ng_offset_mapping_builder.h

This patch moves the definition of NGOffsetMappingBuilder::SourceNodeScope
to the beginning of NGOffsetMappingBuilder before all member functions
for better coding style.

Bug: 699017
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: If0a6d9ea5fad9194a5a3148f4724a45861964d6c
Reviewed-on: https://chromium-review.googlesource.com/1147547
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577379}
parent ae0a2fe4
......@@ -25,22 +25,6 @@ class CORE_EXPORT NGOffsetMappingBuilder {
STACK_ALLOCATED();
public:
NGOffsetMappingBuilder();
// Append an identity offset mapping of the specified length with null
// annotation to the builder.
void AppendIdentityMapping(unsigned length);
// Append a collapsed offset mapping from the specified length with null
// annotation to the builder.
void AppendCollapsedMapping(unsigned length);
// TODO(xiaochengh): Add the following API when we start to fix offset mapping
// for text-transform.
// Append an expanded offset mapping to the specified length with null
// annotation to the builder.
// void AppendExpandedMapping(unsigned length);
// A scope-like object that, mappings appended inside the scope are marked as
// from the given source node. When multiple scopes nest, only the inner-most
// scope is effective. Note that at most one of the nested scopes may have a
......@@ -89,6 +73,22 @@ class CORE_EXPORT NGOffsetMappingBuilder {
DISALLOW_COPY_AND_ASSIGN(SourceNodeScope);
};
NGOffsetMappingBuilder();
// Append an identity offset mapping of the specified length with null
// annotation to the builder.
void AppendIdentityMapping(unsigned length);
// Append a collapsed offset mapping from the specified length with null
// annotation to the builder.
void AppendCollapsedMapping(unsigned length);
// TODO(xiaochengh): Add the following API when we start to fix offset mapping
// for text-transform.
// Append an expanded offset mapping to the specified length with null
// annotation to the builder.
// void AppendExpandedMapping(unsigned length);
// This function should only be called by NGInlineItemsBuilder during
// whitespace collapsing, and in the case that the target string of the
// currently held mapping:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment