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

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

Issue 2582913002: Remove obsolete NGConstraintSpace::ChildSpace (Closed)
Patch Set: Created 4 years 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_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_constraint_space.h" 5 #include "core/layout/ng/ng_constraint_space.h"
6 6
7 #include "core/layout/LayoutBlock.h" 7 #include "core/layout/LayoutBlock.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/layout/ng/ng_constraint_space_builder.h" 9 #include "core/layout/ng/ng_constraint_space_builder.h"
10 #include "core/layout/ng/ng_layout_opportunity_iterator.h" 10 #include "core/layout/ng/ng_layout_opportunity_iterator.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // TODO(layout-ng): Implement. 95 // TODO(layout-ng): Implement.
96 } 96 }
97 97
98 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( 98 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities(
99 unsigned clear, 99 unsigned clear,
100 bool for_inline_or_bfc) { 100 bool for_inline_or_bfc) {
101 NGLayoutOpportunityIterator* iterator = new NGLayoutOpportunityIterator(this); 101 NGLayoutOpportunityIterator* iterator = new NGLayoutOpportunityIterator(this);
102 return iterator; 102 return iterator;
103 } 103 }
104 104
105 NGConstraintSpace* NGConstraintSpace::ChildSpace(
106 const ComputedStyle* style) const {
107 return NGConstraintSpaceBuilder(this)
108 .SetWritingMode(FromPlatformWritingMode(style->getWritingMode()))
109 .SetTextDirection(style->direction())
110 .ToConstraintSpace();
111 }
112
113 String NGConstraintSpace::ToString() const { 105 String NGConstraintSpace::ToString() const {
114 return String::format("%s,%s %sx%s", 106 return String::format("%s,%s %sx%s",
115 offset_.inline_offset.toString().ascii().data(), 107 offset_.inline_offset.toString().ascii().data(),
116 offset_.block_offset.toString().ascii().data(), 108 offset_.block_offset.toString().ascii().data(),
117 AvailableSize().inline_size.toString().ascii().data(), 109 AvailableSize().inline_size.toString().ascii().data(),
118 AvailableSize().block_size.toString().ascii().data()); 110 AvailableSize().block_size.toString().ascii().data());
119 } 111 }
120 112
121 } // namespace blink 113 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698