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

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

Issue 2470733002: Revert of [LayoutNG] Remove simple constructors from NGPhysicalConstraintSpace. (Closed)
Patch Set: Created 4 years, 1 month 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_physical_constraint_space.h ('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 #include "core/layout/ng/ng_physical_constraint_space.h" 5 #include "core/layout/ng/ng_physical_constraint_space.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace( 9 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace(
10 NGPhysicalSize container_size, 10 NGPhysicalSize container_size,
11 bool fixed_width, 11 bool fixed_width,
12 bool fixed_height, 12 bool fixed_height,
13 bool width_direction_triggers_scrollbar, 13 bool width_direction_triggers_scrollbar,
14 bool height_direction_triggers_scrollbar, 14 bool height_direction_triggers_scrollbar,
15 NGFragmentationType width_direction_fragmentation_type, 15 NGFragmentationType width_direction_fragmentation_type,
16 NGFragmentationType height_direction_fragmentation_type, 16 NGFragmentationType height_direction_fragmentation_type,
17 bool is_new_fc) 17 bool is_new_fc)
18 : container_size_(container_size), 18 : container_size_(container_size),
19 fixed_width_(fixed_width), 19 fixed_width_(fixed_width),
20 fixed_height_(fixed_height), 20 fixed_height_(fixed_height),
21 width_direction_triggers_scrollbar_(width_direction_triggers_scrollbar), 21 width_direction_triggers_scrollbar_(width_direction_triggers_scrollbar),
22 height_direction_triggers_scrollbar_(height_direction_triggers_scrollbar), 22 height_direction_triggers_scrollbar_(height_direction_triggers_scrollbar),
23 width_direction_fragmentation_type_(width_direction_fragmentation_type), 23 width_direction_fragmentation_type_(width_direction_fragmentation_type),
24 height_direction_fragmentation_type_(height_direction_fragmentation_type), 24 height_direction_fragmentation_type_(height_direction_fragmentation_type),
25 is_new_fc_(is_new_fc) {} 25 is_new_fc_(is_new_fc) {}
26 26
27 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace(
28 NGPhysicalSize container_size)
29 : container_size_(container_size),
30 fixed_width_(0),
31 fixed_height_(0),
32 width_direction_triggers_scrollbar_(0),
33 height_direction_triggers_scrollbar_(0),
34 width_direction_fragmentation_type_(FragmentNone),
35 height_direction_fragmentation_type_(FragmentNone) {}
36
37 NGPhysicalConstraintSpace::NGPhysicalConstraintSpace()
38 : fixed_width_(0),
39 fixed_height_(0),
40 width_direction_triggers_scrollbar_(0),
41 height_direction_triggers_scrollbar_(0),
42 width_direction_fragmentation_type_(FragmentNone),
43 height_direction_fragmentation_type_(FragmentNone) {}
44
27 void NGPhysicalConstraintSpace::AddExclusion(const NGExclusion* exclusion, 45 void NGPhysicalConstraintSpace::AddExclusion(const NGExclusion* exclusion,
28 unsigned options) { 46 unsigned options) {
29 exclusions_.append(exclusion); 47 exclusions_.append(exclusion);
30 } 48 }
31 49
32 const HeapVector<Member<const NGExclusion>>& 50 const HeapVector<Member<const NGExclusion>>&
33 NGPhysicalConstraintSpace::Exclusions(unsigned options) const { 51 NGPhysicalConstraintSpace::Exclusions(unsigned options) const {
34 // TODO(layout-ng): Filter based on options? Perhaps layout Opportunities 52 // TODO(layout-ng): Filter based on options? Perhaps layout Opportunities
35 // should filter instead? 53 // should filter instead?
36 return exclusions_; 54 return exclusions_;
37 } 55 }
38 56
39 } // namespace blink 57 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698