| Index: third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc
|
| index 230e04d1794f874e9355ec7aebb006729d3a2a04..5528d7ac0e5aa0f17951e0f8d9a71d9fac9ac3dd 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc
|
| @@ -6,27 +6,36 @@
|
|
|
| #include "core/layout/ng/ng_break_token.h"
|
| #include "core/layout/ng/ng_physical_box_fragment.h"
|
| +#include "core/layout/ng/ng_physical_line_box_fragment.h"
|
| #include "core/layout/ng/ng_physical_text_fragment.h"
|
|
|
| namespace blink {
|
|
|
| NGPhysicalFragment::NGPhysicalFragment(LayoutObject* layout_object,
|
| NGPhysicalSize size,
|
| - NGPhysicalSize overflow,
|
| NGFragmentType type,
|
| RefPtr<NGBreakToken> break_token)
|
| : layout_object_(layout_object),
|
| size_(size),
|
| - overflow_(overflow),
|
| break_token_(std::move(break_token)),
|
| type_(type),
|
| is_placed_(false) {}
|
|
|
| void NGPhysicalFragment::destroy() const {
|
| - if (Type() == kFragmentText)
|
| - delete static_cast<const NGPhysicalTextFragment*>(this);
|
| - else
|
| - delete static_cast<const NGPhysicalBoxFragment*>(this);
|
| + switch (Type()) {
|
| + case kFragmentBox:
|
| + delete static_cast<const NGPhysicalBoxFragment*>(this);
|
| + break;
|
| + case kFragmentText:
|
| + delete static_cast<const NGPhysicalTextFragment*>(this);
|
| + break;
|
| + case kFragmentLineBox:
|
| + delete static_cast<const NGPhysicalLineBoxFragment*>(this);
|
| + break;
|
| + default:
|
| + NOTREACHED();
|
| + break;
|
| + }
|
| }
|
|
|
| const ComputedStyle& NGPhysicalFragment::Style() const {
|
|
|