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

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

Issue 1472053002: Jump to the next outer column when an inner column is too short. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 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 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 void LayoutFlowThread::generateColumnSetIntervalTree() 157 void LayoutFlowThread::generateColumnSetIntervalTree()
158 { 158 {
159 // FIXME: Optimize not to clear the interval all the time. This implies manu ally managing the tree nodes lifecycle. 159 // FIXME: Optimize not to clear the interval all the time. This implies manu ally managing the tree nodes lifecycle.
160 m_multiColumnSetIntervalTree.clear(); 160 m_multiColumnSetIntervalTree.clear();
161 m_multiColumnSetIntervalTree.initIfNeeded(); 161 m_multiColumnSetIntervalTree.initIfNeeded();
162 for (auto columnSet : m_multiColumnSetList) 162 for (auto columnSet : m_multiColumnSetList)
163 m_multiColumnSetIntervalTree.add(MultiColumnSetIntervalTree::createInter val(columnSet->logicalTopInFlowThread(), columnSet->logicalBottomInFlowThread(), columnSet)); 163 m_multiColumnSetIntervalTree.add(MultiColumnSetIntervalTree::createInter val(columnSet->logicalTopInFlowThread(), columnSet->logicalBottomInFlowThread(), columnSet));
164 } 164 }
165 165
166 LayoutUnit LayoutFlowThread::nextLogicalTopForUnbreakableContent(LayoutUnit flow ThreadOffset, LayoutUnit contentLogicalHeight) const
167 {
168 LayoutMultiColumnSet* columnSet = columnSetAtBlockOffset(flowThreadOffset);
169 if (!columnSet)
170 return flowThreadOffset;
171 return columnSet->nextLogicalTopForUnbreakableContent(flowThreadOffset, cont entLogicalHeight);
172 }
173
166 void LayoutFlowThread::collectLayerFragments(PaintLayerFragments& layerFragments , const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRectInFlowThread) 174 void LayoutFlowThread::collectLayerFragments(PaintLayerFragments& layerFragments , const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRectInFlowThread)
167 { 175 {
168 ASSERT(!m_columnSetsInvalidated); 176 ASSERT(!m_columnSetsInvalidated);
169 177
170 LayoutRect dirtyRectInMulticolContainer(dirtyRectInFlowThread); 178 LayoutRect dirtyRectInMulticolContainer(dirtyRectInFlowThread);
171 dirtyRectInMulticolContainer.moveBy(location()); 179 dirtyRectInMulticolContainer.moveBy(location());
172 180
173 for (LayoutMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be gin(); iter != m_multiColumnSetList.end(); ++iter) { 181 for (LayoutMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be gin(); iter != m_multiColumnSetList.end(); ++iter) {
174 LayoutMultiColumnSet* columnSet = *iter; 182 LayoutMultiColumnSet* columnSet = *iter;
175 columnSet->collectLayerFragments(layerFragments, layerBoundingBox, dirty RectInMulticolContainer); 183 columnSet->collectLayerFragments(layerFragments, layerBoundingBox, dirty RectInMulticolContainer);
(...skipping 13 matching lines...) Expand all
189 197
190 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval) 198 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval)
191 { 199 {
192 if (m_result) 200 if (m_result)
193 return; 201 return;
194 if (interval.low() <= m_offset && interval.high() > m_offset) 202 if (interval.low() <= m_offset && interval.high() > m_offset)
195 m_result = interval.data(); 203 m_result = interval.data();
196 } 204 }
197 205
198 } // namespace blink 206 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlowThread.h ('k') | third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698