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

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

Issue 2536453002: Rename some functions about layout locations (Closed)
Patch Set: Rebase Created 4 years 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 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // A column out of range doesn't have a flow thread portion, so we need to 120 // A column out of range doesn't have a flow thread portion, so we need to
121 // clamp to make sure that we stay within the actual columns. This means that 121 // clamp to make sure that we stay within the actual columns. This means that
122 // content in the overflow area will be mapped to the last actual column, 122 // content in the overflow area will be mapped to the last actual column,
123 // instead of being mapped to an imaginary column further ahead. 123 // instead of being mapped to an imaginary column further ahead.
124 unsigned columnIndex = offsetInFlowThread >= logicalBottomInFlowThread() 124 unsigned columnIndex = offsetInFlowThread >= logicalBottomInFlowThread()
125 ? actualColumnCount() - 1 125 ? actualColumnCount() - 1
126 : columnIndexAtOffset(offsetInFlowThread, rule); 126 : columnIndexAtOffset(offsetInFlowThread, rule);
127 127
128 LayoutRect portionRect(flowThreadPortionRectAt(columnIndex)); 128 LayoutRect portionRect(flowThreadPortionRectAt(columnIndex));
129 flowThread->flipForWritingMode(portionRect); 129 flowThread->flipForWritingMode(portionRect);
130 portionRect.moveBy(flowThread->topLeftLocation()); 130 portionRect.moveBy(flowThread->physicalLocation());
131 131
132 LayoutRect columnRect(columnRectAt(columnIndex)); 132 LayoutRect columnRect(columnRectAt(columnIndex));
133 columnRect.move(offsetFromColumnSet()); 133 columnRect.move(offsetFromColumnSet());
134 m_columnSet.flipForWritingMode(columnRect); 134 m_columnSet.flipForWritingMode(columnRect);
135 columnRect.moveBy(m_columnSet.topLeftLocation()); 135 columnRect.moveBy(m_columnSet.physicalLocation());
136 136
137 LayoutSize translationRelativeToFlowThread = 137 LayoutSize translationRelativeToFlowThread =
138 columnRect.location() - portionRect.location(); 138 columnRect.location() - portionRect.location();
139 if (mode == CoordinateSpaceConversion::Containing) 139 if (mode == CoordinateSpaceConversion::Containing)
140 return translationRelativeToFlowThread; 140 return translationRelativeToFlowThread;
141 141
142 LayoutSize enclosingTranslation; 142 LayoutSize enclosingTranslation;
143 if (LayoutMultiColumnFlowThread* enclosingFlowThread = 143 if (LayoutMultiColumnFlowThread* enclosingFlowThread =
144 flowThread->enclosingFlowThread()) { 144 flowThread->enclosingFlowThread()) {
145 const MultiColumnFragmentainerGroup& firstRow = 145 const MultiColumnFragmentainerGroup& firstRow =
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 MultiColumnFragmentainerGroupList::addExtraGroup() { 594 MultiColumnFragmentainerGroupList::addExtraGroup() {
595 append(MultiColumnFragmentainerGroup(m_columnSet)); 595 append(MultiColumnFragmentainerGroup(m_columnSet));
596 return last(); 596 return last();
597 } 597 }
598 598
599 void MultiColumnFragmentainerGroupList::deleteExtraGroups() { 599 void MultiColumnFragmentainerGroupList::deleteExtraGroups() {
600 shrink(1); 600 shrink(1);
601 } 601 }
602 602
603 } // namespace blink 603 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp ('k') | third_party/WebKit/Source/core/layout/line/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698