OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 explicit LayoutBox(ContainerNode*); | 194 explicit LayoutBox(ContainerNode*); |
195 | 195 |
196 PaintLayerType layerTypeRequired() const override; | 196 PaintLayerType layerTypeRequired() const override; |
197 | 197 |
198 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov erride; | 198 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov erride; |
199 | 199 |
200 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } | 200 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } |
201 | 201 |
202 // Use this with caution! No type checking is done! | 202 // Use this with caution! No type checking is done! |
203 LayoutBox* firstChildBox() const; | 203 LayoutBox* firstChildBox() const; |
204 LayoutBox* firstInFlowChildBox() const; | |
205 LayoutBox* lastChildBox() const; | 204 LayoutBox* lastChildBox() const; |
206 | 205 |
207 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } | 206 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } |
208 int pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); } | 207 int pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); } |
209 | 208 |
210 void setX(LayoutUnit x) | 209 void setX(LayoutUnit x) |
211 { | 210 { |
212 if (x == m_frameRect.x()) | 211 if (x == m_frameRect.x()) |
213 return; | 212 return; |
214 m_frameRect.setX(x); | 213 m_frameRect.setX(x); |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
735 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Leng th& height, LayoutUnit intrinsicContentHeight) const; | 734 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Leng th& height, LayoutUnit intrinsicContentHeight) const; |
736 LayoutUnit computeReplacedLogicalWidthUsing(SizeType, const Length& width) c onst; | 735 LayoutUnit computeReplacedLogicalWidthUsing(SizeType, const Length& width) c onst; |
737 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const; | 736 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const; |
738 LayoutUnit computeReplacedLogicalHeightUsing(SizeType, const Length& height) const; | 737 LayoutUnit computeReplacedLogicalHeightUsing(SizeType, const Length& height) const; |
739 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const; | 738 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const; |
740 | 739 |
741 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const; | 740 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const; |
742 virtual LayoutUnit computeReplacedLogicalHeight(LayoutUnit estimatedUsedWidt h = LayoutUnit()) const; | 741 virtual LayoutUnit computeReplacedLogicalHeight(LayoutUnit estimatedUsedWidt h = LayoutUnit()) const; |
743 | 742 |
744 bool percentageLogicalHeightIsResolvable() const; | 743 bool percentageLogicalHeightIsResolvable() const; |
744 static LayoutUnit availableLogicalHeightForPercentageComputation(const Layou tBlock*, bool skippedAutoHeightContainingBlock, bool scrollsOverflowY); | |
svillar
2016/07/18 08:43:30
If the first parameter is never null then it shoul
Manuel Rego
2016/07/19 13:12:32
Done.
| |
745 LayoutUnit computePercentageLogicalHeight(const Length& height) const; | 745 LayoutUnit computePercentageLogicalHeight(const Length& height) const; |
746 | 746 |
747 // Block flows subclass availableWidth/Height to handle multi column layout (shrinking the width/height available to children when laying out.) | 747 // Block flows subclass availableWidth/Height to handle multi column layout (shrinking the width/height available to children when laying out.) |
748 LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); } | 748 LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); } |
749 LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const; | 749 LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const; |
750 LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeight Type) const; | 750 LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeight Type) const; |
751 | 751 |
752 // There are a few cases where we need to refer specifically to the availabl e physical width and available physical height. | 752 // There are a few cases where we need to refer specifically to the availabl e physical width and available physical height. |
753 // Relative positioning is one of those cases, since left/top offsets are ph ysical. | 753 // Relative positioning is one of those cases, since left/top offsets are ph ysical. |
754 LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode( ) ? availableLogicalWidth() : availableLogicalHeight(IncludeMarginBorderPadding) ; } | 754 LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode( ) ? availableLogicalWidth() : availableLogicalHeight(IncludeMarginBorderPadding) ; } |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1176 inline LayoutBox* LayoutBox::parentBox() const | 1176 inline LayoutBox* LayoutBox::parentBox() const |
1177 { | 1177 { |
1178 return toLayoutBox(parent()); | 1178 return toLayoutBox(parent()); |
1179 } | 1179 } |
1180 | 1180 |
1181 inline LayoutBox* LayoutBox::firstChildBox() const | 1181 inline LayoutBox* LayoutBox::firstChildBox() const |
1182 { | 1182 { |
1183 return toLayoutBox(slowFirstChild()); | 1183 return toLayoutBox(slowFirstChild()); |
1184 } | 1184 } |
1185 | 1185 |
1186 inline LayoutBox* LayoutBox::firstInFlowChildBox() const | |
1187 { | |
1188 LayoutBox* child = firstChildBox(); | |
1189 while (child && child->isOutOfFlowPositioned()) | |
1190 child = child->nextSiblingBox(); | |
1191 return child; | |
1192 } | |
1193 | |
1194 inline LayoutBox* LayoutBox::lastChildBox() const | 1186 inline LayoutBox* LayoutBox::lastChildBox() const |
1195 { | 1187 { |
1196 return toLayoutBox(slowLastChild()); | 1188 return toLayoutBox(slowLastChild()); |
1197 } | 1189 } |
1198 | 1190 |
1199 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const | 1191 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const |
1200 { | 1192 { |
1201 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); | 1193 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); |
1202 LayoutBox* previousBox = previousSiblingBox(); | 1194 LayoutBox* previousBox = previousSiblingBox(); |
1203 if (previousBox->isLayoutFlowThread()) | 1195 if (previousBox->isLayoutFlowThread()) |
(...skipping 28 matching lines...) Expand all Loading... | |
1232 || breakValue == BreakLeft | 1224 || breakValue == BreakLeft |
1233 || breakValue == BreakPage | 1225 || breakValue == BreakPage |
1234 || breakValue == BreakRecto | 1226 || breakValue == BreakRecto |
1235 || breakValue == BreakRight | 1227 || breakValue == BreakRight |
1236 || breakValue == BreakVerso; | 1228 || breakValue == BreakVerso; |
1237 } | 1229 } |
1238 | 1230 |
1239 } // namespace blink | 1231 } // namespace blink |
1240 | 1232 |
1241 #endif // LayoutBox_h | 1233 #endif // LayoutBox_h |
OLD | NEW |