Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/FragmentainerIterator.h" | 5 #include "core/layout/FragmentainerIterator.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutMultiColumnSet.h" | 7 #include "core/layout/LayoutMultiColumnSet.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 m_flowThread.flipForWritingMode(boundsInFlowThread); | 22 m_flowThread.flipForWritingMode(boundsInFlowThread); |
| 23 | 23 |
| 24 if (m_flowThread.isHorizontalWritingMode()) { | 24 if (m_flowThread.isHorizontalWritingMode()) { |
| 25 m_logicalTopInFlowThread = boundsInFlowThread.y(); | 25 m_logicalTopInFlowThread = boundsInFlowThread.y(); |
| 26 m_logicalBottomInFlowThread = boundsInFlowThread.maxY(); | 26 m_logicalBottomInFlowThread = boundsInFlowThread.maxY(); |
| 27 } else { | 27 } else { |
| 28 m_logicalTopInFlowThread = boundsInFlowThread.x(); | 28 m_logicalTopInFlowThread = boundsInFlowThread.x(); |
| 29 m_logicalBottomInFlowThread = boundsInFlowThread.maxX(); | 29 m_logicalBottomInFlowThread = boundsInFlowThread.maxX(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 // Jump to the first interesting column set. | 32 // Jump to the first interesting column set. |
|
szager1
2016/12/21 23:47:11
This comment seems obsolete.
mstensho (USE GERRIT)
2016/12/22 08:10:26
Not really. We're still picking a column set based
| |
| 33 m_currentColumnSet = flowThread.columnSetAtBlockOffset( | 33 m_currentColumnSet = flowThread.columnSetAtBlockOffset( |
| 34 m_logicalTopInFlowThread, LayoutBox::AssociateWithLatterPage); | 34 m_logicalTopInFlowThread, LayoutBox::AssociateWithLatterPage); |
| 35 if (!m_currentColumnSet || | 35 if (!m_currentColumnSet) { |
| 36 m_currentColumnSet->logicalTopInFlowThread() >= | |
| 37 m_logicalBottomInFlowThread) { | |
| 38 setAtEnd(); | 36 setAtEnd(); |
| 39 return; | 37 return; |
| 40 } | 38 } |
| 41 // Then find the first interesting fragmentainer group. | 39 // Then find the first interesting fragmentainer group. |
| 42 m_currentFragmentainerGroupIndex = | 40 m_currentFragmentainerGroupIndex = |
| 43 m_currentColumnSet->fragmentainerGroupIndexAtFlowThreadOffset( | 41 m_currentColumnSet->fragmentainerGroupIndexAtFlowThreadOffset( |
| 44 m_logicalTopInFlowThread, LayoutBox::AssociateWithLatterPage); | 42 m_logicalTopInFlowThread, LayoutBox::AssociateWithLatterPage); |
| 45 | 43 |
| 46 // Now find the first and last fragmentainer we're interested in. We'll also | 44 // Now find the first and last fragmentainer we're interested in. We'll also |
| 47 // clip against the clip rect here. In case the clip rect doesn't intersect | 45 // clip against the clip rect here. In case the clip rect doesn't intersect |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 if (m_currentFragmentainerIndex < firstFragmentainerInClipRect) | 154 if (m_currentFragmentainerIndex < firstFragmentainerInClipRect) |
| 157 m_currentFragmentainerIndex = firstFragmentainerInClipRect; | 155 m_currentFragmentainerIndex = firstFragmentainerInClipRect; |
| 158 if (m_endFragmentainerIndex > lastFragmentainerInClipRect) | 156 if (m_endFragmentainerIndex > lastFragmentainerInClipRect) |
| 159 m_endFragmentainerIndex = lastFragmentainerInClipRect; | 157 m_endFragmentainerIndex = lastFragmentainerInClipRect; |
| 160 } | 158 } |
| 161 DCHECK(m_endFragmentainerIndex >= m_currentFragmentainerIndex); | 159 DCHECK(m_endFragmentainerIndex >= m_currentFragmentainerIndex); |
| 162 return true; | 160 return true; |
| 163 } | 161 } |
| 164 | 162 |
| 165 } // namespace blink | 163 } // namespace blink |
| OLD | NEW |