| 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 "platform/wtf/StdLibExtras.h" |
| 35 #include "wtf/text/CharacterNames.h" | 36 #include "platform/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 : box_(parent), largest_ordinal_(1) { | 43 : box_(parent), largest_ordinal_(1) { |
| 44 if (box_->Style()->BoxOrient() == HORIZONTAL && | 44 if (box_->Style()->BoxOrient() == HORIZONTAL && |
| 45 !box_->Style()->IsLeftToRightDirection()) | 45 !box_->Style()->IsLeftToRightDirection()) |
| 46 forward_ = box_->Style()->BoxDirection() != EBoxDirection::kNormal; | 46 forward_ = box_->Style()->BoxDirection() != EBoxDirection::kNormal; |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 if (min_height.IsFixed() || min_height.IsAuto()) { | 1275 if (min_height.IsFixed() || min_height.IsAuto()) { |
| 1276 LayoutUnit min_height(child->Style()->MinHeight().Value()); | 1276 LayoutUnit min_height(child->Style()->MinHeight().Value()); |
| 1277 LayoutUnit height = ContentHeightForChild(child); | 1277 LayoutUnit height = ContentHeightForChild(child); |
| 1278 LayoutUnit allowed_shrinkage = (min_height - height).ClampPositiveToZero(); | 1278 LayoutUnit allowed_shrinkage = (min_height - height).ClampPositiveToZero(); |
| 1279 return allowed_shrinkage; | 1279 return allowed_shrinkage; |
| 1280 } | 1280 } |
| 1281 return LayoutUnit(); | 1281 return LayoutUnit(); |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 } // namespace blink | 1284 } // namespace blink |
| OLD | NEW |