| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 explicit LayoutBox(ContainerNode*); | 192 explicit LayoutBox(ContainerNode*); |
| 193 | 193 |
| 194 PaintLayerType layerTypeRequired() const override; | 194 PaintLayerType layerTypeRequired() const override; |
| 195 | 195 |
| 196 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov
erride; | 196 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov
erride; |
| 197 | 197 |
| 198 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } | 198 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } |
| 199 | 199 |
| 200 // Use this with caution! No type checking is done! | 200 // Use this with caution! No type checking is done! |
| 201 LayoutBox* firstChildBox() const; | 201 LayoutBox* firstChildBox() const; |
| 202 LayoutBox* firstInFlowChildBox() const; |
| 202 LayoutBox* lastChildBox() const; | 203 LayoutBox* lastChildBox() const; |
| 203 | 204 |
| 204 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } | 205 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } |
| 205 int pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); } | 206 int pixelSnappedHeight() const { return m_frameRect.pixelSnappedHeight(); } |
| 206 | 207 |
| 207 void setX(LayoutUnit x) | 208 void setX(LayoutUnit x) |
| 208 { | 209 { |
| 209 if (x == m_frameRect.x()) | 210 if (x == m_frameRect.x()) |
| 210 return; | 211 return; |
| 211 m_frameRect.setX(x); | 212 m_frameRect.setX(x); |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Leng
th& height, LayoutUnit intrinsicContentHeight) const; | 733 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Leng
th& height, LayoutUnit intrinsicContentHeight) const; |
| 733 LayoutUnit computeReplacedLogicalWidthUsing(SizeType, const Length& width) c
onst; | 734 LayoutUnit computeReplacedLogicalWidthUsing(SizeType, const Length& width) c
onst; |
| 734 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic
alWidth, ShouldComputePreferred = ComputeActual) const; | 735 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic
alWidth, ShouldComputePreferred = ComputeActual) const; |
| 735 LayoutUnit computeReplacedLogicalHeightUsing(SizeType, const Length& height)
const; | 736 LayoutUnit computeReplacedLogicalHeightUsing(SizeType, const Length& height)
const; |
| 736 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log
icalHeight) const; | 737 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log
icalHeight) const; |
| 737 | 738 |
| 738 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const; | 739 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const; |
| 739 virtual LayoutUnit computeReplacedLogicalHeight(LayoutUnit estimatedUsedWidt
h = LayoutUnit()) const; | 740 virtual LayoutUnit computeReplacedLogicalHeight(LayoutUnit estimatedUsedWidt
h = LayoutUnit()) const; |
| 740 | 741 |
| 741 bool percentageLogicalHeightIsResolvable() const; | 742 bool percentageLogicalHeightIsResolvable() const; |
| 742 bool hasDefiniteLogicalHeight() const; | |
| 743 LayoutUnit computePercentageLogicalHeight(const Length& height) const; | 743 LayoutUnit computePercentageLogicalHeight(const Length& height) const; |
| 744 | 744 |
| 745 // Block flows subclass availableWidth/Height to handle multi column layout
(shrinking the width/height available to children when laying out.) | 745 // Block flows subclass availableWidth/Height to handle multi column layout
(shrinking the width/height available to children when laying out.) |
| 746 LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); } | 746 LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); } |
| 747 LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const; | 747 LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const; |
| 748 LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeight
Type) const; | 748 LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeight
Type) const; |
| 749 | 749 |
| 750 // There are a few cases where we need to refer specifically to the availabl
e physical width and available physical height. | 750 // There are a few cases where we need to refer specifically to the availabl
e physical width and available physical height. |
| 751 // Relative positioning is one of those cases, since left/top offsets are ph
ysical. | 751 // Relative positioning is one of those cases, since left/top offsets are ph
ysical. |
| 752 LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode(
) ? availableLogicalWidth() : availableLogicalHeight(IncludeMarginBorderPadding)
; } | 752 LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode(
) ? availableLogicalWidth() : availableLogicalHeight(IncludeMarginBorderPadding)
; } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 inline LayoutBox* LayoutBox::parentBox() const | 1162 inline LayoutBox* LayoutBox::parentBox() const |
| 1163 { | 1163 { |
| 1164 return toLayoutBox(parent()); | 1164 return toLayoutBox(parent()); |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 inline LayoutBox* LayoutBox::firstChildBox() const | 1167 inline LayoutBox* LayoutBox::firstChildBox() const |
| 1168 { | 1168 { |
| 1169 return toLayoutBox(slowFirstChild()); | 1169 return toLayoutBox(slowFirstChild()); |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 inline LayoutBox* LayoutBox::firstInFlowChildBox() const |
| 1173 { |
| 1174 LayoutBox* child = firstChildBox(); |
| 1175 while (child && child->isOutOfFlowPositioned()) |
| 1176 child = child->nextSiblingBox(); |
| 1177 return child; |
| 1178 } |
| 1179 |
| 1172 inline LayoutBox* LayoutBox::lastChildBox() const | 1180 inline LayoutBox* LayoutBox::lastChildBox() const |
| 1173 { | 1181 { |
| 1174 return toLayoutBox(slowLastChild()); | 1182 return toLayoutBox(slowLastChild()); |
| 1175 } | 1183 } |
| 1176 | 1184 |
| 1177 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const | 1185 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const |
| 1178 { | 1186 { |
| 1179 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); | 1187 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); |
| 1180 LayoutBox* previousBox = previousSiblingBox(); | 1188 LayoutBox* previousBox = previousSiblingBox(); |
| 1181 if (previousBox->isLayoutFlowThread()) | 1189 if (previousBox->isLayoutFlowThread()) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1210 || breakValue == BreakLeft | 1218 || breakValue == BreakLeft |
| 1211 || breakValue == BreakPage | 1219 || breakValue == BreakPage |
| 1212 || breakValue == BreakRecto | 1220 || breakValue == BreakRecto |
| 1213 || breakValue == BreakRight | 1221 || breakValue == BreakRight |
| 1214 || breakValue == BreakVerso; | 1222 || breakValue == BreakVerso; |
| 1215 } | 1223 } |
| 1216 | 1224 |
| 1217 } // namespace blink | 1225 } // namespace blink |
| 1218 | 1226 |
| 1219 #endif // LayoutBox_h | 1227 #endif // LayoutBox_h |
| OLD | NEW |