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") { ...@@ -401,8 +401,6 @@ blink_core_sources("layout") {
"ng/list/ng_unpositioned_list_marker.h", "ng/list/ng_unpositioned_list_marker.h",
"ng/ng_absolute_utils.cc", "ng/ng_absolute_utils.cc",
"ng/ng_absolute_utils.h", "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.cc",
"ng/ng_block_break_token.h", "ng/ng_block_break_token.h",
"ng/ng_block_child_iterator.cc", "ng/ng_block_child_iterator.cc",
...@@ -432,6 +430,8 @@ blink_core_sources("layout") { ...@@ -432,6 +430,8 @@ blink_core_sources("layout") {
"ng/ng_floats_utils.cc", "ng/ng_floats_utils.cc",
"ng/ng_floats_utils.h", "ng/ng_floats_utils.h",
"ng/ng_fragment.h", "ng/ng_fragment.h",
"ng/ng_fragment_builder.cc",
"ng/ng_fragment_builder.h",
"ng/ng_fragmentation_utils.cc", "ng/ng_fragmentation_utils.cc",
"ng/ng_fragmentation_utils.h", "ng/ng_fragmentation_utils.h",
"ng/ng_layout_algorithm.h", "ng/ng_layout_algorithm.h",
......
...@@ -32,7 +32,7 @@ NGLineOrientation ToLineOrientation(WritingMode writing_mode) { ...@@ -32,7 +32,7 @@ NGLineOrientation ToLineOrientation(WritingMode writing_mode) {
NGTextFragmentBuilder::NGTextFragmentBuilder(NGInlineNode node, NGTextFragmentBuilder::NGTextFragmentBuilder(NGInlineNode node,
WritingMode writing_mode) WritingMode writing_mode)
: NGBaseFragmentBuilder(writing_mode, TextDirection::kLtr), : NGFragmentBuilder(writing_mode, TextDirection::kLtr),
inline_node_(node) {} inline_node_(node) {}
void NGTextFragmentBuilder::SetItem( void NGTextFragmentBuilder::SetItem(
......
...@@ -9,7 +9,7 @@ ...@@ -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_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_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/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" #include "third_party/blink/renderer/platform/wtf/allocator.h"
namespace blink { namespace blink {
...@@ -18,7 +18,7 @@ class LayoutObject; ...@@ -18,7 +18,7 @@ class LayoutObject;
class ShapeResult; class ShapeResult;
struct NGInlineItemResult; struct NGInlineItemResult;
class CORE_EXPORT NGTextFragmentBuilder final : public NGBaseFragmentBuilder { class CORE_EXPORT NGTextFragmentBuilder final : public NGFragmentBuilder {
STACK_ALLOCATED(); STACK_ALLOCATED();
public: public:
......
...@@ -16,7 +16,7 @@ NGContainerFragmentBuilder::NGContainerFragmentBuilder( ...@@ -16,7 +16,7 @@ NGContainerFragmentBuilder::NGContainerFragmentBuilder(
scoped_refptr<const ComputedStyle> style, scoped_refptr<const ComputedStyle> style,
WritingMode writing_mode, WritingMode writing_mode,
TextDirection direction) TextDirection direction)
: NGBaseFragmentBuilder(std::move(style), writing_mode, direction) {} : NGFragmentBuilder(std::move(style), writing_mode, direction) {}
NGContainerFragmentBuilder::~NGContainerFragmentBuilder() = default; NGContainerFragmentBuilder::~NGContainerFragmentBuilder() = default;
......
...@@ -12,8 +12,8 @@ ...@@ -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_logical_size.h"
#include "third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.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/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_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_link.h"
#include "third_party/blink/renderer/core/layout/ng/ng_out_of_flow_positioned_descendant.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" #include "third_party/blink/renderer/platform/text/text_direction.h"
...@@ -27,7 +27,7 @@ class NGExclusionSpace; ...@@ -27,7 +27,7 @@ class NGExclusionSpace;
class NGLayoutResult; class NGLayoutResult;
class NGPhysicalFragment; class NGPhysicalFragment;
class CORE_EXPORT NGContainerFragmentBuilder : public NGBaseFragmentBuilder { class CORE_EXPORT NGContainerFragmentBuilder : public NGFragmentBuilder {
STACK_ALLOCATED(); STACK_ALLOCATED();
public: public:
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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" #include "third_party/blink/renderer/core/style/computed_style.h"
namespace blink { namespace blink {
NGBaseFragmentBuilder::NGBaseFragmentBuilder( NGFragmentBuilder::NGFragmentBuilder(scoped_refptr<const ComputedStyle> style,
scoped_refptr<const ComputedStyle> style,
WritingMode writing_mode, WritingMode writing_mode,
TextDirection direction) TextDirection direction)
: style_(std::move(style)), : style_(std::move(style)),
...@@ -19,13 +18,13 @@ NGBaseFragmentBuilder::NGBaseFragmentBuilder( ...@@ -19,13 +18,13 @@ NGBaseFragmentBuilder::NGBaseFragmentBuilder(
DCHECK(style_); DCHECK(style_);
} }
NGBaseFragmentBuilder::NGBaseFragmentBuilder(WritingMode writing_mode, NGFragmentBuilder::NGFragmentBuilder(WritingMode writing_mode,
TextDirection direction) TextDirection direction)
: writing_mode_(writing_mode), direction_(direction) {} : writing_mode_(writing_mode), direction_(direction) {}
NGBaseFragmentBuilder::~NGBaseFragmentBuilder() = default; NGFragmentBuilder::~NGFragmentBuilder() = default;
NGBaseFragmentBuilder& NGBaseFragmentBuilder::SetStyle( NGFragmentBuilder& NGFragmentBuilder::SetStyle(
scoped_refptr<const ComputedStyle> style, scoped_refptr<const ComputedStyle> style,
NGStyleVariant style_variant) { NGStyleVariant style_variant) {
DCHECK(style); DCHECK(style);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef NGBaseFragmentBuilder_h #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_FRAGMENT_BUILDER_H_
#define NGBaseFragmentBuilder_h #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_FRAGMENT_BUILDER_H_
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/core_export.h"
...@@ -20,20 +20,21 @@ class ComputedStyle; ...@@ -20,20 +20,21 @@ class ComputedStyle;
class LayoutObject; class LayoutObject;
class NGBreakToken; class NGBreakToken;
class CORE_EXPORT NGBaseFragmentBuilder { class CORE_EXPORT NGFragmentBuilder {
STACK_ALLOCATED(); STACK_ALLOCATED();
public: public:
virtual ~NGBaseFragmentBuilder(); virtual ~NGFragmentBuilder();
const ComputedStyle& Style() const { const ComputedStyle& Style() const {
DCHECK(style_); DCHECK(style_);
return *style_; return *style_;
} }
NGBaseFragmentBuilder& SetStyleVariant(NGStyleVariant style_variant) { NGFragmentBuilder& SetStyleVariant(NGStyleVariant style_variant) {
style_variant_ = style_variant; style_variant_ = style_variant;
return *this; return *this;
} }
NGBaseFragmentBuilder& SetStyle(scoped_refptr<const ComputedStyle>, NGFragmentBuilder& SetStyle(scoped_refptr<const ComputedStyle>,
NGStyleVariant); NGStyleVariant);
WritingMode GetWritingMode() const { return writing_mode_; } WritingMode GetWritingMode() const { return writing_mode_; }
...@@ -42,7 +43,7 @@ class CORE_EXPORT NGBaseFragmentBuilder { ...@@ -42,7 +43,7 @@ class CORE_EXPORT NGBaseFragmentBuilder {
LayoutUnit InlineSize() const { return size_.inline_size; } LayoutUnit InlineSize() const { return size_.inline_size; }
LayoutUnit BlockSize() const { return size_.block_size; } LayoutUnit BlockSize() const { return size_.block_size; }
const NGLogicalSize& Size() const { return size_; } const NGLogicalSize& Size() const { return size_; }
NGBaseFragmentBuilder& SetInlineSize(LayoutUnit inline_size) { NGFragmentBuilder& SetInlineSize(LayoutUnit inline_size) {
DCHECK_GE(inline_size, LayoutUnit()); DCHECK_GE(inline_size, LayoutUnit());
size_.inline_size = inline_size; size_.inline_size = inline_size;
return *this; return *this;
...@@ -52,10 +53,10 @@ class CORE_EXPORT NGBaseFragmentBuilder { ...@@ -52,10 +53,10 @@ class CORE_EXPORT NGBaseFragmentBuilder {
LayoutObject* GetLayoutObject() { return layout_object_; } LayoutObject* GetLayoutObject() { return layout_object_; }
protected: protected:
NGBaseFragmentBuilder(scoped_refptr<const ComputedStyle>, NGFragmentBuilder(scoped_refptr<const ComputedStyle>,
WritingMode, WritingMode,
TextDirection); TextDirection);
NGBaseFragmentBuilder(WritingMode, TextDirection); NGFragmentBuilder(WritingMode, TextDirection);
private: private:
scoped_refptr<const ComputedStyle> style_; scoped_refptr<const ComputedStyle> style_;
...@@ -71,4 +72,4 @@ class CORE_EXPORT NGBaseFragmentBuilder { ...@@ -71,4 +72,4 @@ class CORE_EXPORT NGBaseFragmentBuilder {
} // namespace blink } // 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