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 |
11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
12 * | 12 * |
13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 * Library General Public License for more details. | 16 * Library General Public License for more details. |
17 * | 17 * |
18 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
19 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "core/layout/LayoutDeprecatedFlexibleBox.h" | 25 #include "core/layout/LayoutDeprecatedFlexibleBox.h" |
26 | 26 |
| 27 #include <algorithm> |
27 #include "core/frame/UseCounter.h" | 28 #include "core/frame/UseCounter.h" |
28 #include "core/layout/LayoutView.h" | 29 #include "core/layout/LayoutView.h" |
29 #include "core/layout/TextAutosizer.h" | 30 #include "core/layout/TextAutosizer.h" |
30 #include "core/layout/TextRunConstructor.h" | 31 #include "core/layout/TextRunConstructor.h" |
31 #include "core/layout/api/LineLayoutBlockFlow.h" | 32 #include "core/layout/api/LineLayoutBlockFlow.h" |
32 #include "core/paint/PaintLayer.h" | 33 #include "core/paint/PaintLayer.h" |
33 #include "platform/fonts/Font.h" | 34 #include "platform/fonts/Font.h" |
34 #include "wtf/StdLibExtras.h" | 35 #include "wtf/StdLibExtras.h" |
35 #include "wtf/text/CharacterNames.h" | 36 #include "wtf/text/CharacterNames.h" |
36 #include <algorithm> | |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class FlexBoxIterator { | 40 class FlexBoxIterator { |
41 public: | 41 public: |
42 FlexBoxIterator(LayoutDeprecatedFlexibleBox* parent) | 42 FlexBoxIterator(LayoutDeprecatedFlexibleBox* parent) |
43 : m_box(parent), m_largestOrdinal(1) { | 43 : m_box(parent), m_largestOrdinal(1) { |
44 if (m_box->style()->boxOrient() == HORIZONTAL && | 44 if (m_box->style()->boxOrient() == HORIZONTAL && |
45 !m_box->style()->isLeftToRightDirection()) | 45 !m_box->style()->isLeftToRightDirection()) |
46 m_forward = m_box->style()->boxDirection() != EBoxDirection::kNormal; | 46 m_forward = m_box->style()->boxDirection() != EBoxDirection::kNormal; |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 if (minHeight.isFixed() || minHeight.isAuto()) { | 1265 if (minHeight.isFixed() || minHeight.isAuto()) { |
1266 LayoutUnit minHeight(child->style()->minHeight().value()); | 1266 LayoutUnit minHeight(child->style()->minHeight().value()); |
1267 LayoutUnit height = contentHeightForChild(child); | 1267 LayoutUnit height = contentHeightForChild(child); |
1268 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero(); | 1268 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero(); |
1269 return allowedShrinkage; | 1269 return allowedShrinkage; |
1270 } | 1270 } |
1271 return LayoutUnit(); | 1271 return LayoutUnit(); |
1272 } | 1272 } |
1273 | 1273 |
1274 } // namespace blink | 1274 } // namespace blink |
OLD | NEW |