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

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

Issue 2770483002: CS of out-of-flow positioned objects should have is_new_fc == true (Closed)
Patch Set: update TestExpectations Created 3 years, 8 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_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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 NGFragmentationType NGConstraintSpace::BlockFragmentationType() const { 134 NGFragmentationType NGConstraintSpace::BlockFragmentationType() const {
135 return static_cast<NGFragmentationType>(block_direction_fragmentation_type_); 135 return static_cast<NGFragmentationType>(block_direction_fragmentation_type_);
136 } 136 }
137 137
138 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunityIterator( 138 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunityIterator(
139 const NGLogicalOffset& iter_offset) { 139 const NGLogicalOffset& iter_offset) {
140 if (layout_opp_iter_ && layout_opp_iter_->Offset() != iter_offset) 140 if (layout_opp_iter_ && layout_opp_iter_->Offset() != iter_offset)
141 layout_opp_iter_.reset(); 141 layout_opp_iter_.reset();
142 142
143 if (!layout_opp_iter_) { 143 if (!layout_opp_iter_) {
144 layout_opp_iter_ = 144 layout_opp_iter_ = WTF::makeUnique<NGLayoutOpportunityIterator>(
145 WTF::makeUnique<NGLayoutOpportunityIterator>(this, iter_offset); 145 this, AvailableSize(), iter_offset);
146 } 146 }
147 return layout_opp_iter_.get(); 147 return layout_opp_iter_.get();
148 } 148 }
149 149
150 String NGConstraintSpace::ToString() const { 150 String NGConstraintSpace::ToString() const {
151 return String::format( 151 return String::format(
152 "Offset: %s,%s Size: %sx%s MarginStrut: %s" 152 "Offset: %s,%s Size: %sx%s MarginStrut: %s"
153 " Clearance: %s", 153 " Clearance: %s",
154 bfc_offset_.inline_offset.toString().ascii().data(), 154 bfc_offset_.inline_offset.toString().ascii().data(),
155 bfc_offset_.block_offset.toString().ascii().data(), 155 bfc_offset_.block_offset.toString().ascii().data(),
156 AvailableSize().inline_size.toString().ascii().data(), 156 AvailableSize().inline_size.toString().ascii().data(),
157 AvailableSize().block_size.toString().ascii().data(), 157 AvailableSize().block_size.toString().ascii().data(),
158 margin_strut_.ToString().ascii().data(), 158 margin_strut_.ToString().ascii().data(),
159 clearance_offset_.has_value() 159 clearance_offset_.has_value()
160 ? clearance_offset_.value().toString().ascii().data() 160 ? clearance_offset_.value().toString().ascii().data()
161 : "none"); 161 : "none");
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698