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

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

Issue 2597633002: Even empty block intervals should be associated with a fragmentainer. (Closed)
Patch Set: Created 3 years, 12 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698