Chromium Code Reviews| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 } | 251 } |
| 252 | 252 |
| 253 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) | 253 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) |
| 254 { | 254 { |
| 255 ASSERT(needsLayout()); | 255 ASSERT(needsLayout()); |
| 256 | 256 |
| 257 if (!relayoutChildren && simplifiedLayout()) | 257 if (!relayoutChildren && simplifiedLayout()) |
| 258 return; | 258 return; |
| 259 | 259 |
| 260 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); | 260 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); |
| 261 LayoutStateMaintainer statePusher(*this, locationOffset()); | |
| 262 | 261 |
| 263 RenderFlowThread* flowThread = flowThreadContainingBlock(); | 262 { |
| 264 if (updateRegionsAndShapesLogicalSize(flowThread)) | 263 // LayoutStateMaintainer needs this deliberate scope to pop before repai nt |
| 265 relayoutChildren = true; | 264 LayoutStateMaintainer statePusher(*this, locationOffset()); |
| 266 | 265 |
| 267 LayoutSize previousSize = size(); | 266 RenderFlowThread* flowThread = flowThreadContainingBlock(); |
| 267 if (updateRegionsAndShapesLogicalSize(flowThread)) | |
| 268 relayoutChildren = true; | |
| 268 | 269 |
| 269 updateLogicalWidth(); | 270 LayoutSize previousSize = size(); |
| 270 updateLogicalHeight(); | |
| 271 | 271 |
| 272 if (previousSize != size() | 272 updateLogicalWidth(); |
| 273 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient( ) == HORIZONTAL | 273 updateLogicalHeight(); |
| 274 && parent()->style()->boxAlign() == BSTRETCH)) | |
| 275 relayoutChildren = true; | |
| 276 | 274 |
| 277 setHeight(0); | 275 if (previousSize != size() |
| 276 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOri ent() == HORIZONTAL | |
| 277 && parent()->style()->boxAlign() == BSTRETCH)) | |
| 278 relayoutChildren = true; | |
| 278 | 279 |
| 279 m_stretchingChildren = false; | 280 setHeight(0); |
| 280 | 281 |
| 281 if (isHorizontal()) | 282 m_stretchingChildren = false; |
| 282 layoutHorizontalBox(relayoutChildren); | |
| 283 else | |
| 284 layoutVerticalBox(relayoutChildren); | |
| 285 | 283 |
| 286 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); | 284 if (isHorizontal()) |
| 287 updateLogicalHeight(); | 285 layoutHorizontalBox(relayoutChildren); |
| 286 else | |
| 287 layoutVerticalBox(relayoutChildren); | |
| 288 | 288 |
| 289 if (previousSize.height() != height()) | 289 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); |
| 290 relayoutChildren = true; | 290 updateLogicalHeight(); |
| 291 | 291 |
| 292 layoutPositionedObjects(relayoutChildren || isRoot()); | 292 if (previousSize.height() != height()) |
| 293 relayoutChildren = true; | |
| 293 | 294 |
| 294 computeRegionRangeForBlock(flowThread); | 295 layoutPositionedObjects(relayoutChildren || isRoot()); |
| 295 | 296 |
| 296 computeOverflow(oldClientAfterEdge); | 297 computeRegionRangeForBlock(flowThread); |
| 297 | 298 |
| 298 statePusher.pop(); | 299 computeOverflow(oldClientAfterEdge); |
| 299 | 300 |
| 300 updateLayerTransform(); | 301 updateLayerTransform(); |
|
Julien - ping for review
2014/03/13 17:44:27
Interestingly updateLayerTransform was out of the
| |
| 302 } | |
| 301 | 303 |
| 302 if (view()->layoutState()->pageLogicalHeight()) | 304 if (view()->layoutState()->pageLogicalHeight()) |
| 303 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(*this, log icalTop())); | 305 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(*this, log icalTop())); |
| 304 | 306 |
| 305 // Update our scrollbars if we're overflow:auto/scroll/hidden now that we kn ow if | 307 // Update our scrollbars if we're overflow:auto/scroll/hidden now that we kn ow if |
| 306 // we overflow or not. | 308 // we overflow or not. |
| 307 if (hasOverflowClip()) | 309 if (hasOverflowClip()) |
| 308 layer()->scrollableArea()->updateAfterLayout(); | 310 layer()->scrollableArea()->updateAfterLayout(); |
| 309 | 311 |
| 310 // Repaint with our new bounds if they are different from our old bounds. | 312 // Repaint with our new bounds if they are different from our old bounds. |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1078 if (isPseudoElement()) | 1080 if (isPseudoElement()) |
| 1079 return "RenderDeprecatedFlexibleBox (generated)"; | 1081 return "RenderDeprecatedFlexibleBox (generated)"; |
| 1080 if (isAnonymous()) | 1082 if (isAnonymous()) |
| 1081 return "RenderDeprecatedFlexibleBox (generated)"; | 1083 return "RenderDeprecatedFlexibleBox (generated)"; |
| 1082 if (isRelPositioned()) | 1084 if (isRelPositioned()) |
| 1083 return "RenderDeprecatedFlexibleBox (relative positioned)"; | 1085 return "RenderDeprecatedFlexibleBox (relative positioned)"; |
| 1084 return "RenderDeprecatedFlexibleBox"; | 1086 return "RenderDeprecatedFlexibleBox"; |
| 1085 } | 1087 } |
| 1086 | 1088 |
| 1087 } // namespace WebCore | 1089 } // namespace WebCore |
| OLD | NEW |