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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_box.cc

Issue 2328243002: [LayoutNG] Remove unnecessary #inclusions of LayoutObject and derived class definitions. (Closed)
Patch Set: Created 4 years, 3 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 #include "core/layout/ng/ng_box.h" 5 #include "core/layout/ng/ng_box.h"
6 6
7 #include "core/layout/LayoutObject.h"
8 #include "core/layout/ng/layout_ng_block_flow.h" 7 #include "core/layout/ng/layout_ng_block_flow.h"
9 #include "core/layout/ng/ng_block_layout_algorithm.h" 8 #include "core/layout/ng/ng_block_layout_algorithm.h"
10 #include "core/layout/ng/ng_constraint_space.h" 9 #include "core/layout/ng/ng_constraint_space.h"
11 #include "core/layout/ng/ng_direction.h" 10 #include "core/layout/ng/ng_direction.h"
12 #include "core/layout/ng/ng_fragment.h" 11 #include "core/layout/ng/ng_fragment.h"
13 #include "core/layout/ng/ng_fragment_builder.h" 12 #include "core/layout/ng/ng_fragment_builder.h"
14 #include "core/layout/ng/ng_writing_mode.h" 13 #include "core/layout/ng/ng_writing_mode.h"
15 #include "core/layout/LayoutBlockFlow.h"
16 #include "core/layout/LayoutBox.h"
17 14
18 namespace blink { 15 namespace blink {
19 NGBox::NGBox(LayoutObject* layout_object) 16 NGBox::NGBox(LayoutObject* layout_object)
20 : layout_box_(toLayoutBox(layout_object)) { 17 : layout_box_(toLayoutBox(layout_object)) {
21 DCHECK(layout_box_); 18 DCHECK(layout_box_);
22 } 19 }
23 20
24 NGBox::NGBox(ComputedStyle* style) : layout_box_(nullptr), style_(style) { 21 NGBox::NGBox(ComputedStyle* style) : layout_box_(nullptr), style_(style) {
25 DCHECK(style_); 22 DCHECK(style_);
26 } 23 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 128
132 bool NGBox::CanUseNewLayout() { 129 bool NGBox::CanUseNewLayout() {
133 if (!layout_box_) 130 if (!layout_box_)
134 return true; 131 return true;
135 if (!layout_box_->isLayoutBlockFlow()) 132 if (!layout_box_->isLayoutBlockFlow())
136 return false; 133 return false;
137 const LayoutBlockFlow* block_flow = toLayoutBlockFlow(layout_box_); 134 const LayoutBlockFlow* block_flow = toLayoutBlockFlow(layout_box_);
138 return !block_flow->childrenInline() || !block_flow->firstChild(); 135 return !block_flow->childrenInline() || !block_flow->firstChild();
139 } 136 }
140 } // namespace blink 137 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_box.h ('k') | third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698