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

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

Issue 2883353005: [LayoutNG] Refactor main-loop of block layout algorithm. (Closed)
Patch Set: rebase unused var. Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 NGLayoutInputNode_h 5 #ifndef NGLayoutInputNode_h
6 #define NGLayoutInputNode_h 6 #define NGLayoutInputNode_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/style/ComputedStyle.h" 9 #include "core/style/ComputedStyle.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 13 matching lines...) Expand all
24 : public GarbageCollectedFinalized<NGLayoutInputNode> { 24 : public GarbageCollectedFinalized<NGLayoutInputNode> {
25 public: 25 public:
26 enum NGLayoutInputNodeType { kLegacyBlock = 0, kLegacyInline = 1 }; 26 enum NGLayoutInputNodeType { kLegacyBlock = 0, kLegacyInline = 1 };
27 27
28 bool IsInline() const { return type_ == kLegacyInline; } 28 bool IsInline() const { return type_ == kLegacyInline; }
29 29
30 bool IsBlock() const { return type_ == kLegacyBlock; } 30 bool IsBlock() const { return type_ == kLegacyBlock; }
31 31
32 bool IsFloating() const { return IsBlock() && Style().IsFloating(); } 32 bool IsFloating() const { return IsBlock() && Style().IsFloating(); }
33 33
34 bool IsOutOfFlowPositioned() const {
35 return IsBlock() && Style().HasOutOfFlowPosition();
36 }
37
34 virtual ~NGLayoutInputNode(){}; 38 virtual ~NGLayoutInputNode(){};
35 39
36 // Performs layout on this input node, will return the layout result. 40 // Performs layout on this input node, will return the layout result.
37 virtual RefPtr<NGLayoutResult> Layout(NGConstraintSpace*, NGBreakToken*) = 0; 41 virtual RefPtr<NGLayoutResult> Layout(NGConstraintSpace*, NGBreakToken*) = 0;
38 42
39 // Returns the next sibling. 43 // Returns the next sibling.
40 virtual NGLayoutInputNode* NextSibling() = 0; 44 virtual NGLayoutInputNode* NextSibling() = 0;
41 45
42 // Returns the LayoutObject which is associated with this node. 46 // Returns the LayoutObject which is associated with this node.
43 virtual LayoutObject* GetLayoutObject() const = 0; 47 virtual LayoutObject* GetLayoutObject() const = 0;
(...skipping 17 matching lines...) Expand all
61 protected: 65 protected:
62 explicit NGLayoutInputNode(NGLayoutInputNodeType type) : type_(type) {} 66 explicit NGLayoutInputNode(NGLayoutInputNodeType type) : type_(type) {}
63 67
64 private: 68 private:
65 unsigned type_ : 1; 69 unsigned type_ : 1;
66 }; 70 };
67 71
68 } // namespace blink 72 } // namespace blink
69 73
70 #endif // NGLayoutInputNode_h 74 #endif // NGLayoutInputNode_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698