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

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

Issue 2836293004: [LayoutNG] Move NGInlineNode data to NGInlineNodeData. (Closed)
Patch Set: rebase. 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
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 LayoutNGBlockFlow_h 5 #ifndef LayoutNGBlockFlow_h
6 #define LayoutNGBlockFlow_h 6 #define LayoutNGBlockFlow_h
7 7
8 #include "core/CoreExport.h"
8 #include "core/layout/LayoutBlockFlow.h" 9 #include "core/layout/LayoutBlockFlow.h"
10 #include "core/layout/ng/inline/ng_inline_node_data.h"
9 #include "core/layout/ng/ng_block_node.h" 11 #include "core/layout/ng/ng_block_node.h"
10 12
11 namespace blink { 13 namespace blink {
12 14
13 // This overrides the default layout block algorithm to use Layout NG. 15 // This overrides the default layout block algorithm to use Layout NG.
14 class LayoutNGBlockFlow final : public LayoutBlockFlow { 16 class CORE_EXPORT LayoutNGBlockFlow final : public LayoutBlockFlow {
15 public: 17 public:
16 explicit LayoutNGBlockFlow(Element*); 18 explicit LayoutNGBlockFlow(Element*);
17 ~LayoutNGBlockFlow() override = default; 19 ~LayoutNGBlockFlow() override = default;
18 20
19 void UpdateBlockLayout(bool relayout_children) override; 21 void UpdateBlockLayout(bool relayout_children) override;
20 NGBlockNode* BoxForTesting() const { return box_.Get(); } 22 NGBlockNode* BoxForTesting() const { return box_.Get(); }
21 23
24 NGInlineNodeData& GetNGInlineNodeData() const;
25 void ResetNGInlineNodeData();
26
22 private: 27 private:
23 bool IsOfType(LayoutObjectType) const override; 28 bool IsOfType(LayoutObjectType) const override;
24 29
30 std::unique_ptr<NGInlineNodeData> ng_inline_node_data_;
25 Persistent<NGBlockNode> box_; 31 Persistent<NGBlockNode> box_;
26 }; 32 };
27 33
28 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutNGBlockFlow, IsLayoutNGBlockFlow()); 34 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutNGBlockFlow, IsLayoutNGBlockFlow());
29 35
30 } // namespace blink 36 } // namespace blink
31 37
32 #endif // LayoutNGBlockFlow_h 38 #endif // LayoutNGBlockFlow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698