| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the render object implementation for KHTML. | 2 * This file is part of the render 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit
pageLogicalHeight, BlockLayoutPass layoutPass) | 221 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit
pageLogicalHeight, BlockLayoutPass layoutPass) |
| 222 { | 222 { |
| 223 ASSERT(needsLayout()); | 223 ASSERT(needsLayout()); |
| 224 | 224 |
| 225 if (!relayoutChildren && simplifiedLayout()) | 225 if (!relayoutChildren && simplifiedLayout()) |
| 226 return; | 226 return; |
| 227 | 227 |
| 228 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); | 228 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); |
| 229 LayoutStateMaintainer statePusher(view(), this, LayoutSize(x(), y()), hasTra
nsform() || hasReflection() || style()->isFlippedBlocksWritingMode()); | 229 LayoutStateMaintainer statePusher(view(), this, LayoutSize(x(), y()), hasTra
nsform() || hasReflection() || style()->isFlippedBlocksWritingMode()); |
| 230 | 230 |
| 231 if (inRenderFlowThread()) { |
| 232 // Regions changing widths can force us to relayout our children. |
| 233 if (logicalWidthChangedInRegions()) |
| 234 relayoutChildren = true; |
| 235 } |
| 236 computeInitialRegionRangeForBlock(); |
| 237 |
| 231 LayoutSize previousSize = size(); | 238 LayoutSize previousSize = size(); |
| 232 | 239 |
| 233 computeLogicalWidth(); | 240 computeLogicalWidth(); |
| 234 computeLogicalHeight(); | 241 computeLogicalHeight(); |
| 235 | 242 |
| 236 m_overflow.clear(); | 243 m_overflow.clear(); |
| 237 | 244 |
| 238 if (previousSize != size() | 245 if (previousSize != size() |
| 239 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient(
) == HORIZONTAL | 246 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient(
) == HORIZONTAL |
| 240 && parent()->style()->boxAlign() == BSTRETCH)) | 247 && parent()->style()->boxAlign() == BSTRETCH)) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 260 layoutVerticalBox(relayoutChildren); | 267 layoutVerticalBox(relayoutChildren); |
| 261 | 268 |
| 262 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); | 269 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); |
| 263 computeLogicalHeight(); | 270 computeLogicalHeight(); |
| 264 | 271 |
| 265 if (previousSize.height() != height()) | 272 if (previousSize.height() != height()) |
| 266 relayoutChildren = true; | 273 relayoutChildren = true; |
| 267 | 274 |
| 268 bool needAnotherLayoutPass = layoutPositionedObjects(relayoutChildren || isR
oot()); | 275 bool needAnotherLayoutPass = layoutPositionedObjects(relayoutChildren || isR
oot()); |
| 269 | 276 |
| 277 computeRegionRangeForBlock(); |
| 278 |
| 270 if (!isFloatingOrPositioned() && height() == 0) { | 279 if (!isFloatingOrPositioned() && height() == 0) { |
| 271 // We are a block with no border and padding and a computed height | 280 // We are a block with no border and padding and a computed height |
| 272 // of 0. The CSS spec states that zero-height blocks collapse their mar
gins | 281 // of 0. The CSS spec states that zero-height blocks collapse their mar
gins |
| 273 // together. | 282 // together. |
| 274 // When blocks are self-collapsing, we just use the top margin values an
d set the | 283 // When blocks are self-collapsing, we just use the top margin values an
d set the |
| 275 // bottom margin max values to 0. This way we don't factor in the value
s | 284 // bottom margin max values to 0. This way we don't factor in the value
s |
| 276 // twice when we collapse with our previous vertically adjacent and | 285 // twice when we collapse with our previous vertically adjacent and |
| 277 // following vertically adjacent blocks. | 286 // following vertically adjacent blocks. |
| 278 LayoutUnit pos = maxPositiveMarginBefore(); | 287 LayoutUnit pos = maxPositiveMarginBefore(); |
| 279 LayoutUnit neg = maxNegativeMarginBefore(); | 288 LayoutUnit neg = maxNegativeMarginBefore(); |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 if (isPositioned()) | 1056 if (isPositioned()) |
| 1048 return "RenderDeprecatedFlexibleBox (positioned)"; | 1057 return "RenderDeprecatedFlexibleBox (positioned)"; |
| 1049 if (isAnonymous()) | 1058 if (isAnonymous()) |
| 1050 return "RenderDeprecatedFlexibleBox (generated)"; | 1059 return "RenderDeprecatedFlexibleBox (generated)"; |
| 1051 if (isRelPositioned()) | 1060 if (isRelPositioned()) |
| 1052 return "RenderDeprecatedFlexibleBox (relative positioned)"; | 1061 return "RenderDeprecatedFlexibleBox (relative positioned)"; |
| 1053 return "RenderDeprecatedFlexibleBox"; | 1062 return "RenderDeprecatedFlexibleBox"; |
| 1054 } | 1063 } |
| 1055 | 1064 |
| 1056 } // namespace WebCore | 1065 } // namespace WebCore |
| OLD | NEW |