OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |