summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/blink/renderer/core/layout/layout_block_flow.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/layout/layout_block_flow.h')
-rw-r--r--chromium/third_party/blink/renderer/core/layout/layout_block_flow.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_block_flow.h b/chromium/third_party/blink/renderer/core/layout/layout_block_flow.h
index 14a179e2e71..7ca9232b862 100644
--- a/chromium/third_party/blink/renderer/core/layout/layout_block_flow.h
+++ b/chromium/third_party/blink/renderer/core/layout/layout_block_flow.h
@@ -63,6 +63,7 @@ class NGBlockBreakToken;
class NGBreakToken;
class NGConstraintSpace;
class NGLayoutResult;
+class NGOffsetMapping;
class NGPaintFragment;
class NGPhysicalFragment;
@@ -769,18 +770,8 @@ class CORE_EXPORT LayoutBlockFlow : public LayoutBlock {
USING_FAST_MALLOC(LayoutBlockFlowRareData);
public:
- LayoutBlockFlowRareData(const LayoutBlockFlow* block)
- : margins_(PositiveMarginBeforeDefault(block),
- NegativeMarginBeforeDefault(block),
- PositiveMarginAfterDefault(block),
- NegativeMarginAfterDefault(block)),
- multi_column_flow_thread_(nullptr),
- break_before_(static_cast<unsigned>(EBreakBetween::kAuto)),
- break_after_(static_cast<unsigned>(EBreakBetween::kAuto)),
- line_break_to_avoid_widow_(-1),
- did_break_at_line_to_avoid_widow_(false),
- discard_margin_before_(false),
- discard_margin_after_(false) {}
+ explicit LayoutBlockFlowRareData(const LayoutBlockFlow* block);
+ ~LayoutBlockFlowRareData();
static LayoutUnit PositiveMarginBeforeDefault(
const LayoutBlockFlow* block) {
@@ -802,7 +793,13 @@ class CORE_EXPORT LayoutBlockFlow : public LayoutBlock {
LayoutUnit first_forced_break_offset_;
- LayoutMultiColumnFlowThread* multi_column_flow_thread_;
+ LayoutMultiColumnFlowThread* multi_column_flow_thread_ = nullptr;
+
+ // |offset_mapping_| is used only for legacy layout tree for caching offset
+ // mapping for |NGInlineNode::GetOffsetMapping()|.
+ // TODO(yosin): Once we have no legacy support, we should get rid of
+ // |offset_mapping_| here.
+ std::unique_ptr<NGOffsetMapping> offset_mapping_;
unsigned break_before_ : 4;
unsigned break_after_ : 4;
@@ -813,6 +810,10 @@ class CORE_EXPORT LayoutBlockFlow : public LayoutBlock {
DISALLOW_COPY_AND_ASSIGN(LayoutBlockFlowRareData);
};
+ void ClearOffsetMapping();
+ const NGOffsetMapping* GetOffsetMapping() const;
+ void SetOffsetMapping(std::unique_ptr<NGOffsetMapping>);
+
const FloatingObjects* GetFloatingObjects() const {
return floating_objects_.get();
}