| 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 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 void RenderBlock::updateScrollInfoAfterLayout() | 297 void RenderBlock::updateScrollInfoAfterLayout() |
| 298 { | 298 { |
| 299 if (hasOverflowClip()) { | 299 if (hasOverflowClip()) { |
| 300 if (gDelayUpdateScrollInfo) | 300 if (gDelayUpdateScrollInfo) |
| 301 gDelayedUpdateScrollInfoSet->add(this); | 301 gDelayedUpdateScrollInfoSet->add(this); |
| 302 else | 302 else |
| 303 layer()->scrollableArea()->updateAfterLayout(); | 303 layer()->scrollableArea()->updateAfterLayout(); |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 | 306 |
| 307 void RenderBlock::layout() | |
| 308 { | |
| 309 // FIXME(sky): Inline layoutBlock here and get rid of it. | |
| 310 layoutBlock(false); | |
| 311 } | |
| 312 | |
| 313 bool RenderBlock::widthAvailableToChildrenHasChanged() | 307 bool RenderBlock::widthAvailableToChildrenHasChanged() |
| 314 { | 308 { |
| 315 bool widthAvailableToChildrenHasChanged = m_hasBorderOrPaddingLogicalWidthCh
anged; | 309 bool widthAvailableToChildrenHasChanged = m_hasBorderOrPaddingLogicalWidthCh
anged; |
| 316 m_hasBorderOrPaddingLogicalWidthChanged = false; | 310 m_hasBorderOrPaddingLogicalWidthChanged = false; |
| 317 | 311 |
| 318 // If we use border-box sizing, have percentage padding, and our parent has
changed width then the width available to our children has changed even | 312 // If we use border-box sizing, have percentage padding, and our parent has
changed width then the width available to our children has changed even |
| 319 // though our own width has remained the same. | 313 // though our own width has remained the same. |
| 320 widthAvailableToChildrenHasChanged |= style()->boxSizing() == BORDER_BOX &&
needsPreferredWidthsRecalculation() && view()->layoutState()->containingBlockLog
icalWidthChanged(); | 314 widthAvailableToChildrenHasChanged |= style()->boxSizing() == BORDER_BOX &&
needsPreferredWidthsRecalculation() && view()->layoutState()->containingBlockLog
icalWidthChanged(); |
| 321 | 315 |
| 322 return widthAvailableToChildrenHasChanged; | 316 return widthAvailableToChildrenHasChanged; |
| 323 } | 317 } |
| 324 | 318 |
| 325 bool RenderBlock::updateLogicalWidthAndColumnWidth() | 319 bool RenderBlock::updateLogicalWidthAndColumnWidth() |
| 326 { | 320 { |
| 327 LayoutUnit oldWidth = logicalWidth(); | 321 LayoutUnit oldWidth = logicalWidth(); |
| 328 updateLogicalWidth(); | 322 updateLogicalWidth(); |
| 329 return oldWidth != logicalWidth() || widthAvailableToChildrenHasChanged(); | 323 return oldWidth != logicalWidth() || widthAvailableToChildrenHasChanged(); |
| 330 } | 324 } |
| 331 | 325 |
| 332 void RenderBlock::layoutBlock(bool) | |
| 333 { | |
| 334 ASSERT_NOT_REACHED(); | |
| 335 clearNeedsLayout(); | |
| 336 } | |
| 337 | |
| 338 void RenderBlock::addOverflowFromChildren() | 326 void RenderBlock::addOverflowFromChildren() |
| 339 { | 327 { |
| 340 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo
x()) { | 328 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBo
x()) { |
| 341 if (!child->isFloatingOrOutOfFlowPositioned()) | 329 if (!child->isFloatingOrOutOfFlowPositioned()) |
| 342 addOverflowFromChild(child); | 330 addOverflowFromChild(child); |
| 343 } | 331 } |
| 344 } | 332 } |
| 345 | 333 |
| 346 void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool) | 334 void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool) |
| 347 { | 335 { |
| (...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1920 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 1908 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 1921 { | 1909 { |
| 1922 showRenderObject(); | 1910 showRenderObject(); |
| 1923 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 1911 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 1924 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 1912 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 1925 } | 1913 } |
| 1926 | 1914 |
| 1927 #endif | 1915 #endif |
| 1928 | 1916 |
| 1929 } // namespace blink | 1917 } // namespace blink |
| OLD | NEW |