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/MultiColumnFragmentainerGroup.cpp

Issue 1863413002: Correctly account for nested multicol top border / padding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/MultiColumnFragmentainerGroup.h" 5 #include "core/layout/MultiColumnFragmentainerGroup.h"
6 6
7 #include "core/layout/ColumnBalancer.h" 7 #include "core/layout/ColumnBalancer.h"
8 #include "core/layout/FragmentationContext.h" 8 #include "core/layout/FragmentationContext.h"
9 #include "core/layout/LayoutMultiColumnSet.h" 9 #include "core/layout/LayoutMultiColumnSet.h"
10 10
(...skipping 17 matching lines...) Expand all
28 LayoutSize MultiColumnFragmentainerGroup::offsetFromColumnSet() const 28 LayoutSize MultiColumnFragmentainerGroup::offsetFromColumnSet() const
29 { 29 {
30 LayoutSize offset(LayoutUnit(), logicalTop()); 30 LayoutSize offset(LayoutUnit(), logicalTop());
31 if (!m_columnSet.flowThread()->isHorizontalWritingMode()) 31 if (!m_columnSet.flowThread()->isHorizontalWritingMode())
32 return offset.transposedSize(); 32 return offset.transposedSize();
33 return offset; 33 return offset;
34 } 34 }
35 35
36 LayoutUnit MultiColumnFragmentainerGroup::blockOffsetInEnclosingFragmentationCon text() const 36 LayoutUnit MultiColumnFragmentainerGroup::blockOffsetInEnclosingFragmentationCon text() const
37 { 37 {
38 return logicalTop() + m_columnSet.logicalTop() + m_columnSet.multiColumnFlow Thread()->blockOffsetInEnclosingFragmentationContext(); 38 return logicalTop() + m_columnSet.logicalTopFromMulticolContentEdge() + m_co lumnSet.multiColumnFlowThread()->blockOffsetInEnclosingFragmentationContext();
39 } 39 }
40 40
41 void MultiColumnFragmentainerGroup::resetColumnHeight() 41 void MultiColumnFragmentainerGroup::resetColumnHeight()
42 { 42 {
43 m_maxColumnHeight = calculateMaxColumnHeight(); 43 m_maxColumnHeight = calculateMaxColumnHeight();
44 44
45 LayoutMultiColumnFlowThread* flowThread = m_columnSet.multiColumnFlowThread( ); 45 LayoutMultiColumnFlowThread* flowThread = m_columnSet.multiColumnFlowThread( );
46 if (m_columnSet.heightIsAuto()) { 46 if (m_columnSet.heightIsAuto()) {
47 FragmentationContext* enclosingFragmentationContext = flowThread->enclos ingFragmentationContext(); 47 FragmentationContext* enclosingFragmentationContext = flowThread->enclos ingFragmentationContext();
48 if (enclosingFragmentationContext && enclosingFragmentationContext->isFr agmentainerLogicalHeightKnown()) { 48 if (enclosingFragmentationContext && enclosingFragmentationContext->isFr agmentainerLogicalHeightKnown()) {
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 append(MultiColumnFragmentainerGroup(m_columnSet)); 532 append(MultiColumnFragmentainerGroup(m_columnSet));
533 return last(); 533 return last();
534 } 534 }
535 535
536 void MultiColumnFragmentainerGroupList::deleteExtraGroups() 536 void MultiColumnFragmentainerGroupList::deleteExtraGroups()
537 { 537 {
538 shrink(1); 538 shrink(1);
539 } 539 }
540 540
541 } // namespace blink 541 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698