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_block_layout_algorithm.cc

Issue 2770483002: CS of out-of-flow positioned objects should have is_new_fc == true (Closed)
Patch Set: Created 3 years, 9 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_block_layout_algorithm.h" 5 #include "core/layout/ng/ng_block_layout_algorithm.h"
6 6
7 #include "core/layout/ng/ng_absolute_utils.h" 7 #include "core/layout/ng/ng_absolute_utils.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_child_iterator.h" 9 #include "core/layout/ng/ng_block_child_iterator.h"
10 #include "core/layout/ng/ng_box_fragment.h" 10 #include "core/layout/ng/ng_box_fragment.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 LayoutUnit space_available; 520 LayoutUnit space_available;
521 if (constraint_space_->HasBlockFragmentation()) { 521 if (constraint_space_->HasBlockFragmentation()) {
522 space_available = ConstraintSpace().FragmentainerSpaceAvailable(); 522 space_available = ConstraintSpace().FragmentainerSpaceAvailable();
523 // If a block establishes a new formatting context we must know our 523 // If a block establishes a new formatting context we must know our
524 // position in the formatting context, and are able to adjust the 524 // position in the formatting context, and are able to adjust the
525 // fragmentation line. 525 // fragmentation line.
526 if (is_new_bfc) { 526 if (is_new_bfc) {
527 DCHECK(builder_.BfcOffset()); 527 DCHECK(builder_.BfcOffset());
528 space_available -= curr_bfc_offset_.block_offset; 528 space_available -= curr_bfc_offset_.block_offset;
529 // TODO(glebl): Check correctness of the statement below.
530 space_builder_.SetBfcOffset(NGLogicalOffset());
529 } 531 }
530 } 532 }
531 space_builder_.SetFragmentainerSpaceAvailable(space_available); 533 space_builder_.SetFragmentainerSpaceAvailable(space_available);
532 534
533 return space_builder_.ToConstraintSpace( 535 return space_builder_.ToConstraintSpace(
534 FromPlatformWritingMode(child_style.getWritingMode())); 536 FromPlatformWritingMode(child_style.getWritingMode()));
535 } 537 }
536 } // namespace blink 538 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698