Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| index cce21118cf6e03488c017f90abb01b3817857cf8..82f5379a83e83a82eca5f372f4cd6edc5cfe59e3 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| @@ -36,6 +36,7 @@ |
| #ifndef LayoutBlockFlow_h |
| #define LayoutBlockFlow_h |
| +#include <memory> |
| #include "core/CoreExport.h" |
| #include "core/layout/FloatingObjects.h" |
| #include "core/layout/LayoutBlock.h" |
| @@ -43,7 +44,7 @@ |
| #include "core/layout/line/LineBoxList.h" |
| #include "core/layout/line/RootInlineBox.h" |
| #include "core/layout/line/TrailingObjects.h" |
| -#include <memory> |
| +#include "core/layout/ng/inline/ng_inline_node_data.h" |
| namespace blink { |
| @@ -283,6 +284,18 @@ class CORE_EXPORT LayoutBlockFlow : public LayoutBlock { |
| rare_data_->multi_column_flow_thread_ = nullptr; |
| } |
| + NGInlineNodeData& GetNGInlineNodeData() const { |
| + DCHECK(rare_data_); |
| + DCHECK(rare_data_->ng_inline_node_data_); |
| + return *rare_data_->ng_inline_node_data_.get(); |
| + } |
| + |
| + void InitNGInlineNodeData() { |
| + LayoutBlockFlowRareData& rare_data = EnsureRareData(); |
| + if (!rare_data.ng_inline_node_data_) |
| + rare_data.ng_inline_node_data_ = WTF::WrapUnique(new NGInlineNodeData); |
|
kojii
2017/04/26 02:21:17
nit: MakeUnique()?
https://sites.google.com/a/chro
ikilpatrick
2017/05/01 20:46:34
Done.
|
| + } |
| + |
| void AddOverflowFromInlineChildren(); |
| // FIXME: This should be const to avoid a const_cast, but can modify child |
| @@ -697,6 +710,7 @@ class CORE_EXPORT LayoutBlockFlow : public LayoutBlock { |
| PositiveMarginAfterDefault(block), |
| NegativeMarginAfterDefault(block)), |
| multi_column_flow_thread_(nullptr), |
| + ng_inline_node_data_(nullptr), |
| break_before_(static_cast<unsigned>(EBreakBetween::kAuto)), |
| break_after_(static_cast<unsigned>(EBreakBetween::kAuto)), |
| line_break_to_avoid_widow_(-1), |
| @@ -725,6 +739,7 @@ class CORE_EXPORT LayoutBlockFlow : public LayoutBlock { |
| LayoutUnit first_forced_break_offset_; |
| LayoutMultiColumnFlowThread* multi_column_flow_thread_; |
| + std::unique_ptr<NGInlineNodeData> ng_inline_node_data_; |
| unsigned break_before_ : 4; |
| unsigned break_after_ : 4; |