Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_block_node.h

Issue 2726233003: [LayoutNG] Remove style_ and layout_result_ members on NGBlockNode. (Closed)
Patch Set: fix test which had un-owned fragment tree. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NGBlockNode_h 5 #ifndef NGBlockNode_h
6 #define NGBlockNode_h 6 #define NGBlockNode_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/LayoutBox.h" 9 #include "core/layout/LayoutBox.h"
10 #include "core/layout/ng/ng_layout_input_node.h" 10 #include "core/layout/ng/ng_layout_input_node.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Save static position for legacy AbsPos layout. 61 // Save static position for legacy AbsPos layout.
62 void SaveStaticOffsetForLegacy(const NGLogicalOffset&); 62 void SaveStaticOffsetForLegacy(const NGLogicalOffset&);
63 private: 63 private:
64 64
65 bool CanUseNewLayout(); 65 bool CanUseNewLayout();
66 bool HasInlineChildren(); 66 bool HasInlineChildren();
67 67
68 // After we run the layout algorithm, this function copies back the geometry 68 // After we run the layout algorithm, this function copies back the geometry
69 // data to the layout box. 69 // data to the layout box.
70 void CopyFragmentDataToLayoutBox(const NGConstraintSpace&); 70 void CopyFragmentDataToLayoutBox(const NGConstraintSpace&, NGLayoutResult*);
71 71
72 // We can either wrap a layout_box_ or a style_/next_sibling_/first_child_ 72 // We can either wrap a layout_box_ or a next_sibling_/first_child_
73 // combination. 73 // combination.
74 LayoutBox* layout_box_; 74 LayoutBox* layout_box_;
75 RefPtr<ComputedStyle> style_;
76 Member<NGLayoutInputNode> next_sibling_; 75 Member<NGLayoutInputNode> next_sibling_;
77 Member<NGLayoutInputNode> first_child_; 76 Member<NGLayoutInputNode> first_child_;
78 // TODO(mstensho): An input node may produce multiple fragments, so this
79 // should probably be renamed to last_result_ or something like that, since
80 // the last fragment is all we care about when resuming layout.
81 RefPtr<NGLayoutResult> layout_result_;
82 }; 77 };
83 78
84 DEFINE_TYPE_CASTS(NGBlockNode, 79 DEFINE_TYPE_CASTS(NGBlockNode,
85 NGLayoutInputNode, 80 NGLayoutInputNode,
86 node, 81 node,
87 node->Type() == NGLayoutInputNode::kLegacyBlock, 82 node->Type() == NGLayoutInputNode::kLegacyBlock,
88 node.Type() == NGLayoutInputNode::kLegacyBlock); 83 node.Type() == NGLayoutInputNode::kLegacyBlock);
89 84
90 } // namespace blink 85 } // namespace blink
91 86
92 #endif // NGBlockNode 87 #endif // NGBlockNode
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698