Commit 4358fab1 authored by Christian Biesinger's avatar Christian Biesinger Committed by Commit Bot

[layoutng] Rename NGBaseFragmentBuilder to NGFragmentBuilder

Second part of crrev.com/c/1293449, as requested in crrev.com/c/1289720

R=mstensho@chromium.org

Change-Id: I2535614b236ec4fef12b80c395431bc4d281e22a
Reviewed-on: https://chromium-review.googlesource.com/c/1293454Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601543}
parent 78541fab
......@@ -401,8 +401,6 @@ blink_core_sources("layout") {
"ng/list/ng_unpositioned_list_marker.h",
"ng/ng_absolute_utils.cc",
"ng/ng_absolute_utils.h",
"ng/ng_base_fragment_builder.cc",
"ng/ng_base_fragment_builder.h",
"ng/ng_block_break_token.cc",
"ng/ng_block_break_token.h",
"ng/ng_block_child_iterator.cc",
......@@ -432,6 +430,8 @@ blink_core_sources("layout") {
"ng/ng_floats_utils.cc",
"ng/ng_floats_utils.h",
"ng/ng_fragment.h",
"ng/ng_fragment_builder.cc",
"ng/ng_fragment_builder.h",
"ng/ng_fragmentation_utils.cc",
"ng/ng_fragmentation_utils.h",
"ng/ng_layout_algorithm.h",
......
......@@ -32,7 +32,7 @@ NGLineOrientation ToLineOrientation(WritingMode writing_mode) {
NGTextFragmentBuilder::NGTextFragmentBuilder(NGInlineNode node,
WritingMode writing_mode)
: NGBaseFragmentBuilder(writing_mode, TextDirection::kLtr),
: NGFragmentBuilder(writing_mode, TextDirection::kLtr),
inline_node_(node) {}
void NGTextFragmentBuilder::SetItem(
......
......@@ -9,7 +9,7 @@
#include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h"
#include "third_party/blink/renderer/core/layout/ng/inline/ng_physical_text_fragment.h"
#include "third_party/blink/renderer/core/layout/ng/inline/ng_text_end_effect.h"
#include "third_party/blink/renderer/core/layout/ng/ng_base_fragment_builder.h"
#include "third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h"
#include "third_party/blink/renderer/platform/wtf/allocator.h"
namespace blink {
......@@ -18,7 +18,7 @@ class LayoutObject;
class ShapeResult;
struct NGInlineItemResult;
class CORE_EXPORT NGTextFragmentBuilder final : public NGBaseFragmentBuilder {
class CORE_EXPORT NGTextFragmentBuilder final : public NGFragmentBuilder {
STACK_ALLOCATED();
public:
......
......@@ -16,7 +16,7 @@ NGContainerFragmentBuilder::NGContainerFragmentBuilder(
scoped_refptr<const ComputedStyle> style,
WritingMode writing_mode,
TextDirection direction)
: NGBaseFragmentBuilder(std::move(style), writing_mode, direction) {}
: NGFragmentBuilder(std::move(style), writing_mode, direction) {}
NGContainerFragmentBuilder::~NGContainerFragmentBuilder() = default;
......
......@@ -12,8 +12,8 @@
#include "third_party/blink/renderer/core/layout/ng/geometry/ng_logical_size.h"
#include "third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h"
#include "third_party/blink/renderer/core/layout/ng/list/ng_unpositioned_list_marker.h"
#include "third_party/blink/renderer/core/layout/ng/ng_base_fragment_builder.h"
#include "third_party/blink/renderer/core/layout/ng/ng_floats_utils.h"
#include "third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h"
#include "third_party/blink/renderer/core/layout/ng/ng_link.h"
#include "third_party/blink/renderer/core/layout/ng/ng_out_of_flow_positioned_descendant.h"
#include "third_party/blink/renderer/platform/text/text_direction.h"
......@@ -27,7 +27,7 @@ class NGExclusionSpace;
class NGLayoutResult;
class NGPhysicalFragment;
class CORE_EXPORT NGContainerFragmentBuilder : public NGBaseFragmentBuilder {
class CORE_EXPORT NGContainerFragmentBuilder : public NGFragmentBuilder {
STACK_ALLOCATED();
public:
......
......@@ -2,16 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/layout/ng/ng_base_fragment_builder.h"
#include "third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
namespace blink {
NGBaseFragmentBuilder::NGBaseFragmentBuilder(
scoped_refptr<const ComputedStyle> style,
WritingMode writing_mode,
TextDirection direction)
NGFragmentBuilder::NGFragmentBuilder(scoped_refptr<const ComputedStyle> style,
WritingMode writing_mode,
TextDirection direction)
: style_(std::move(style)),
writing_mode_(writing_mode),
direction_(direction),
......@@ -19,13 +18,13 @@ NGBaseFragmentBuilder::NGBaseFragmentBuilder(
DCHECK(style_);
}
NGBaseFragmentBuilder::NGBaseFragmentBuilder(WritingMode writing_mode,
TextDirection direction)
NGFragmentBuilder::NGFragmentBuilder(WritingMode writing_mode,
TextDirection direction)
: writing_mode_(writing_mode), direction_(direction) {}
NGBaseFragmentBuilder::~NGBaseFragmentBuilder() = default;
NGFragmentBuilder::~NGFragmentBuilder() = default;
NGBaseFragmentBuilder& NGBaseFragmentBuilder::SetStyle(
NGFragmentBuilder& NGFragmentBuilder::SetStyle(
scoped_refptr<const ComputedStyle> style,
NGStyleVariant style_variant) {
DCHECK(style);
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NGBaseFragmentBuilder_h
#define NGBaseFragmentBuilder_h
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_FRAGMENT_BUILDER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_FRAGMENT_BUILDER_H_
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/core_export.h"
......@@ -20,21 +20,22 @@ class ComputedStyle;
class LayoutObject;
class NGBreakToken;
class CORE_EXPORT NGBaseFragmentBuilder {
class CORE_EXPORT NGFragmentBuilder {
STACK_ALLOCATED();
public:
virtual ~NGBaseFragmentBuilder();
virtual ~NGFragmentBuilder();
const ComputedStyle& Style() const {
DCHECK(style_);
return *style_;
}
NGBaseFragmentBuilder& SetStyleVariant(NGStyleVariant style_variant) {
NGFragmentBuilder& SetStyleVariant(NGStyleVariant style_variant) {
style_variant_ = style_variant;
return *this;
}
NGBaseFragmentBuilder& SetStyle(scoped_refptr<const ComputedStyle>,
NGStyleVariant);
NGFragmentBuilder& SetStyle(scoped_refptr<const ComputedStyle>,
NGStyleVariant);
WritingMode GetWritingMode() const { return writing_mode_; }
TextDirection Direction() const { return direction_; }
......@@ -42,7 +43,7 @@ class CORE_EXPORT NGBaseFragmentBuilder {
LayoutUnit InlineSize() const { return size_.inline_size; }
LayoutUnit BlockSize() const { return size_.block_size; }
const NGLogicalSize& Size() const { return size_; }
NGBaseFragmentBuilder& SetInlineSize(LayoutUnit inline_size) {
NGFragmentBuilder& SetInlineSize(LayoutUnit inline_size) {
DCHECK_GE(inline_size, LayoutUnit());
size_.inline_size = inline_size;
return *this;
......@@ -52,10 +53,10 @@ class CORE_EXPORT NGBaseFragmentBuilder {
LayoutObject* GetLayoutObject() { return layout_object_; }
protected:
NGBaseFragmentBuilder(scoped_refptr<const ComputedStyle>,
WritingMode,
TextDirection);
NGBaseFragmentBuilder(WritingMode, TextDirection);
NGFragmentBuilder(scoped_refptr<const ComputedStyle>,
WritingMode,
TextDirection);
NGFragmentBuilder(WritingMode, TextDirection);
private:
scoped_refptr<const ComputedStyle> style_;
......@@ -71,4 +72,4 @@ class CORE_EXPORT NGBaseFragmentBuilder {
} // namespace blink
#endif // NGBaseFragmentBuilder
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_FRAGMENT_BUILDER_H_
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