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

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

Issue 2850893003: Add container_block_offset,top_offset to NGFloatingObject. (Closed)
Patch Set: add-inline-to-block-flow-with-block-children-that-do-not-need-anonymous-boxes.html is still broken 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 #include "core/layout/ng/ng_fragment_builder.h" 5 #include "core/layout/ng/ng_fragment_builder.h"
6 6
7 #include "core/layout/ng/inline/ng_physical_text_fragment.h" 7 #include "core/layout/ng/inline/ng_physical_text_fragment.h"
8 #include "core/layout/ng/ng_block_break_token.h" 8 #include "core/layout/ng/ng_block_break_token.h"
9 #include "core/layout/ng/ng_block_node.h" 9 #include "core/layout/ng/ng_block_node.h"
10 #include "core/layout/ng/ng_break_token.h" 10 #include "core/layout/ng/ng_break_token.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 if (did_break_) { 192 if (did_break_) {
193 break_token = NGBlockBreakToken::Create(node_.Get(), used_block_size_, 193 break_token = NGBlockBreakToken::Create(node_.Get(), used_block_size_,
194 child_break_tokens_); 194 child_break_tokens_);
195 } else { 195 } else {
196 break_token = NGBlockBreakToken::Create(node_.Get()); 196 break_token = NGBlockBreakToken::Create(node_.Get());
197 } 197 }
198 198
199 for (auto& positioned_float : positioned_floats_) { 199 for (auto& positioned_float : positioned_floats_) {
200 NGPhysicalFragment* floating_fragment = positioned_float.fragment.Get(); 200 NGPhysicalFragment* floating_fragment = positioned_float.fragment.Get();
201 floating_fragment->SetOffset(positioned_float.offset.ConvertToPhysical( 201 floating_fragment->SetOffset(
202 writing_mode_, direction_, physical_size, floating_fragment->Size())); 202 positioned_float.logical_offset.ConvertToPhysical(
203 writing_mode_, direction_, physical_size,
204 floating_fragment->Size()));
203 } 205 }
204 206
205 RefPtr<NGPhysicalBoxFragment> fragment = AdoptRef(new NGPhysicalBoxFragment( 207 RefPtr<NGPhysicalBoxFragment> fragment = AdoptRef(new NGPhysicalBoxFragment(
206 node_->GetLayoutObject(), physical_size, 208 node_->GetLayoutObject(), physical_size,
207 overflow_.ConvertToPhysical(writing_mode_), children_, positioned_floats_, 209 overflow_.ConvertToPhysical(writing_mode_), children_, positioned_floats_,
208 bfc_offset_, end_margin_strut_, std::move(break_token))); 210 bfc_offset_, end_margin_strut_, std::move(break_token)));
209 211
210 return AdoptRef( 212 return AdoptRef(
211 new NGLayoutResult(std::move(fragment), out_of_flow_descendants_, 213 new NGLayoutResult(std::move(fragment), out_of_flow_descendants_,
212 out_of_flow_positions_, unpositioned_floats_)); 214 out_of_flow_positions_, unpositioned_floats_));
213 } 215 }
214 216
215 } // namespace blink 217 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698