OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the layout object implementation for KHTML. | 2 * This file is part of the layout object implementation for KHTML. |
3 * | 3 * |
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 5 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
6 * Copyright (C) 2003 Apple Computer, Inc. | 6 * Copyright (C) 2003 Apple Computer, Inc. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 LayoutBox* next() | 74 LayoutBox* next() |
75 { | 75 { |
76 do { | 76 do { |
77 if (!m_currentChild) { | 77 if (!m_currentChild) { |
78 ++m_ordinalIteration; | 78 ++m_ordinalIteration; |
79 | 79 |
80 if (!m_ordinalIteration) { | 80 if (!m_ordinalIteration) { |
81 m_currentOrdinal = m_forward ? 1 : m_largestOrdinal; | 81 m_currentOrdinal = m_forward ? 1 : m_largestOrdinal; |
82 } else { | 82 } else { |
83 if (static_cast<size_t>(m_ordinalIteration) >= m_ordinalValu
es.size() + 1) | 83 if (static_cast<size_t>(m_ordinalIteration) >= m_ordinalValu
es.size() + 1) |
84 return 0; | 84 return nullptr; |
85 | 85 |
86 // Only copy+sort the values once per layout even if the ite
rator is reset. | 86 // Only copy+sort the values once per layout even if the ite
rator is reset. |
87 if (m_ordinalValues.size() != m_sortedOrdinalValues.size())
{ | 87 if (m_ordinalValues.size() != m_sortedOrdinalValues.size())
{ |
88 copyToVector(m_ordinalValues, m_sortedOrdinalValues); | 88 copyToVector(m_ordinalValues, m_sortedOrdinalValues); |
89 std::sort(m_sortedOrdinalValues.begin(), m_sortedOrdinal
Values.end()); | 89 std::sort(m_sortedOrdinalValues.begin(), m_sortedOrdinal
Values.end()); |
90 } | 90 } |
91 m_currentOrdinal = m_forward ? m_sortedOrdinalValues[m_ordin
alIteration - 1] : m_sortedOrdinalValues[m_sortedOrdinalValues.size() - m_ordina
lIteration]; | 91 m_currentOrdinal = m_forward ? m_sortedOrdinalValues[m_ordin
alIteration - 1] : m_sortedOrdinalValues[m_sortedOrdinalValues.size() - m_ordina
lIteration]; |
92 } | 92 } |
93 | 93 |
94 m_currentChild = m_forward ? m_box->firstChildBox() : m_box->las
tChildBox(); | 94 m_currentChild = m_forward ? m_box->firstChildBox() : m_box->las
tChildBox(); |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 if (minHeight.isFixed() || minHeight.isAuto()) { | 1002 if (minHeight.isFixed() || minHeight.isAuto()) { |
1003 LayoutUnit minHeight = child->style()->minHeight().value(); | 1003 LayoutUnit minHeight = child->style()->minHeight().value(); |
1004 LayoutUnit height = contentHeightForChild(child); | 1004 LayoutUnit height = contentHeightForChild(child); |
1005 LayoutUnit allowedShrinkage = std::min<LayoutUnit>(0, minHeight - height
); | 1005 LayoutUnit allowedShrinkage = std::min<LayoutUnit>(0, minHeight - height
); |
1006 return allowedShrinkage; | 1006 return allowedShrinkage; |
1007 } | 1007 } |
1008 return 0; | 1008 return 0; |
1009 } | 1009 } |
1010 | 1010 |
1011 } // namespace blink | 1011 } // namespace blink |
OLD | NEW |