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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 } | 1212 } |
1213 | 1213 |
1214 if (!positionedObject->normalChildNeedsLayout() && (relayoutChildren ||
needsLayoutDueToStaticPosition(positionedObject))) | 1214 if (!positionedObject->normalChildNeedsLayout() && (relayoutChildren ||
needsLayoutDueToStaticPosition(positionedObject))) |
1215 layoutScope.setChildNeedsLayout(positionedObject); | 1215 layoutScope.setChildNeedsLayout(positionedObject); |
1216 | 1216 |
1217 // If relayoutChildren is set and the child has percentage padding or an
embedded content box, we also need to invalidate the childs pref widths. | 1217 // If relayoutChildren is set and the child has percentage padding or an
embedded content box, we also need to invalidate the childs pref widths. |
1218 if (relayoutChildren && positionedObject->needsPreferredWidthsRecalculat
ion()) | 1218 if (relayoutChildren && positionedObject->needsPreferredWidthsRecalculat
ion()) |
1219 positionedObject->setPreferredLogicalWidthsDirty(MarkOnlyThis); | 1219 positionedObject->setPreferredLogicalWidthsDirty(MarkOnlyThis); |
1220 | 1220 |
1221 LayoutUnit logicalTopEstimate; | 1221 LayoutUnit logicalTopEstimate; |
1222 bool needsBlockDirectionLocationSetBeforeLayout = isPaginated && !positi
onedObject->isUnsplittableForPagination(); | 1222 bool needsBlockDirectionLocationSetBeforeLayout = isPaginated && positio
nedObject->paginationBreakability() != ForbidBreaks; |
1223 if (needsBlockDirectionLocationSetBeforeLayout) { | 1223 if (needsBlockDirectionLocationSetBeforeLayout) { |
1224 // Out-of-flow objects are normally positioned after layout (while i
n-flow objects are | 1224 // Out-of-flow objects are normally positioned after layout (while i
n-flow objects are |
1225 // positioned before layout). If the child object is paginated in th
e same context as | 1225 // positioned before layout). If the child object is paginated in th
e same context as |
1226 // we are, estimate its logical top now. We need to know this up-fro
nt, to correctly | 1226 // we are, estimate its logical top now. We need to know this up-fro
nt, to correctly |
1227 // evaluate if we need to mark for relayout, and, if our estimate is
correct, we'll | 1227 // evaluate if we need to mark for relayout, and, if our estimate is
correct, we'll |
1228 // even be able to insert correct pagination struts on the first att
empt. | 1228 // even be able to insert correct pagination struts on the first att
empt. |
1229 LogicalExtentComputedValues computedValues; | 1229 LogicalExtentComputedValues computedValues; |
1230 positionedObject->computeLogicalHeight(positionedObject->logicalHeig
ht(), positionedObject->logicalTop(), computedValues); | 1230 positionedObject->computeLogicalHeight(positionedObject->logicalHeig
ht(), positionedObject->logicalTop(), computedValues); |
1231 logicalTopEstimate = computedValues.m_position; | 1231 logicalTopEstimate = computedValues.m_position; |
1232 positionedObject->setLogicalTop(logicalTopEstimate); | 1232 positionedObject->setLogicalTop(logicalTopEstimate); |
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2888 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2888 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
2889 { | 2889 { |
2890 showLayoutObject(); | 2890 showLayoutObject(); |
2891 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2891 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
2892 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2892 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
2893 } | 2893 } |
2894 | 2894 |
2895 #endif | 2895 #endif |
2896 | 2896 |
2897 } // namespace blink | 2897 } // namespace blink |
OLD | NEW |