| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google 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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 // layout replaced elements | 1470 // layout replaced elements |
| 1471 bool hasInlineChild = false; | 1471 bool hasInlineChild = false; |
| 1472 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { | 1472 for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { |
| 1473 RenderObject* o = walker.current(); | 1473 RenderObject* o = walker.current(); |
| 1474 if (!hasInlineChild && o->isInline()) | 1474 if (!hasInlineChild && o->isInline()) |
| 1475 hasInlineChild = true; | 1475 hasInlineChild = true; |
| 1476 | 1476 |
| 1477 if (o->isReplaced() || o->isFloating() || o->isPositioned()) { | 1477 if (o->isReplaced() || o->isFloating() || o->isPositioned()) { |
| 1478 RenderBox* box = toRenderBox(o); | 1478 RenderBox* box = toRenderBox(o); |
| 1479 | 1479 |
| 1480 if (relayoutChildren || o->style()->width().isPercent() || o->st
yle()->height().isPercent()) | 1480 if (relayoutChildren || box->hasRelativeDimensions()) |
| 1481 o->setChildNeedsLayout(true, false); | 1481 o->setChildNeedsLayout(true, false); |
| 1482 | 1482 |
| 1483 // If relayoutChildren is set and the child has percentage paddi
ng or an embedded content box, we also need to invalidate the childs pref widths
. | 1483 // If relayoutChildren is set and the child has percentage paddi
ng or an embedded content box, we also need to invalidate the childs pref widths
. |
| 1484 if (relayoutChildren && box->needsPreferredWidthsRecalculation()
) | 1484 if (relayoutChildren && box->needsPreferredWidthsRecalculation()
) |
| 1485 o->setPreferredLogicalWidthsDirty(true, false); | 1485 o->setPreferredLogicalWidthsDirty(true, false); |
| 1486 | 1486 |
| 1487 if (o->isPositioned()) | 1487 if (o->isPositioned()) |
| 1488 o->containingBlock()->insertPositionedObject(box); | 1488 o->containingBlock()->insertPositionedObject(box); |
| 1489 else if (o->isFloating()) | 1489 else if (o->isFloating()) |
| 1490 layoutState.floats().append(FloatWithRect(box)); | 1490 layoutState.floats().append(FloatWithRect(box)); |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); | 2798 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); |
| 2799 | 2799 |
| 2800 setLineGridBox(lineGridBox); | 2800 setLineGridBox(lineGridBox); |
| 2801 | 2801 |
| 2802 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying | 2802 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying |
| 2803 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping | 2803 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping |
| 2804 // to this grid. | 2804 // to this grid. |
| 2805 } | 2805 } |
| 2806 | 2806 |
| 2807 } | 2807 } |
| OLD | NEW |