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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 2854213004: Update layer size from LayoutBox::UpdateAfterLayout (Closed)
Patch Set: Fix placement of inline comment 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 648
649 SetLogicalLeftForChild(child, Style()->IsLeftToRightDirection() 649 SetLogicalLeftForChild(child, Style()->IsLeftToRightDirection()
650 ? new_position 650 ? new_position
651 : total_available_logical_width - 651 : total_available_logical_width -
652 new_position - 652 new_position -
653 LogicalWidthForChild(child)); 653 LogicalWidthForChild(child));
654 } 654 }
655 655
656 void LayoutBlockFlow::SetLogicalLeftForChild(LayoutBox& child, 656 void LayoutBlockFlow::SetLogicalLeftForChild(LayoutBox& child,
657 LayoutUnit logical_left) { 657 LayoutUnit logical_left) {
658 LayoutPoint new_location(child.Location());
658 if (IsHorizontalWritingMode()) { 659 if (IsHorizontalWritingMode()) {
659 child.SetX(logical_left); 660 new_location.SetX(logical_left);
660 } else { 661 } else {
661 child.SetY(logical_left); 662 new_location.SetY(logical_left);
662 } 663 }
664 child.SetLocationAndUpdateOverflowControlsIfNeeded(new_location);
663 } 665 }
664 666
665 void LayoutBlockFlow::SetLogicalTopForChild(LayoutBox& child, 667 void LayoutBlockFlow::SetLogicalTopForChild(LayoutBox& child,
666 LayoutUnit logical_top) { 668 LayoutUnit logical_top) {
667 if (IsHorizontalWritingMode()) { 669 if (IsHorizontalWritingMode()) {
668 child.SetY(logical_top); 670 child.SetY(logical_top);
669 } else { 671 } else {
670 child.SetX(logical_top); 672 child.SetX(logical_top);
671 } 673 }
672 } 674 }
(...skipping 4021 matching lines...) Expand 10 before | Expand all | Expand 10 after
4694 return LayoutBlock::DeprecatedInvalidatePaint(paint_invalidation_state); 4696 return LayoutBlock::DeprecatedInvalidatePaint(paint_invalidation_state);
4695 } 4697 }
4696 4698
4697 void LayoutBlockFlow::InvalidateDisplayItemClients( 4699 void LayoutBlockFlow::InvalidateDisplayItemClients(
4698 PaintInvalidationReason invalidation_reason) const { 4700 PaintInvalidationReason invalidation_reason) const {
4699 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients( 4701 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients(
4700 invalidation_reason); 4702 invalidation_reason);
4701 } 4703 }
4702 4704
4703 } // namespace blink 4705 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698