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 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2276 RenderObject* object = resolver.position().m_obj; | 2276 RenderObject* object = resolver.position().m_obj; |
2277 if (object->isOutOfFlowPositioned()) { | 2277 if (object->isOutOfFlowPositioned()) { |
2278 setStaticPositions(m_block, toRenderBox(object)); | 2278 setStaticPositions(m_block, toRenderBox(object)); |
2279 if (object->style()->isOriginalDisplayInlineType()) { | 2279 if (object->style()->isOriginalDisplayInlineType()) { |
2280 resolver.runs().addRun(createRun(0, 1, object, resolver)); | 2280 resolver.runs().addRun(createRun(0, 1, object, resolver)); |
2281 lineInfo.incrementRunsFromLeadingWhitespace(); | 2281 lineInfo.incrementRunsFromLeadingWhitespace(); |
2282 } | 2282 } |
2283 } else if (object->isFloating()) { | 2283 } else if (object->isFloating()) { |
2284 // The top margin edge of a self-collapsing block that clears a floa
t intrudes up into it by the height of the margin, | 2284 // The top margin edge of a self-collapsing block that clears a floa
t intrudes up into it by the height of the margin, |
2285 // so in order to place this child float at the top content edge of
the self-collapsing block add the margin back in before placement. | 2285 // so in order to place this child float at the top content edge of
the self-collapsing block add the margin back in before placement. |
2286 LayoutUnit marginOffset = (m_block->isSelfCollapsingBlock() && m_blo
ck->getClearDelta(m_block, LayoutUnit())) ? m_block->collapsedMarginBeforeForChi
ld(m_block) : LayoutUnit(); | 2286 LayoutUnit marginOffset = (m_block->isSelfCollapsingBlock() && m_blo
ck->style()->clear() && m_block->getClearDelta(m_block, LayoutUnit())) ? m_block
->collapsedMarginBeforeForChild(m_block) : LayoutUnit(); |
2287 LayoutUnit oldLogicalHeight = m_block->logicalHeight(); | 2287 LayoutUnit oldLogicalHeight = m_block->logicalHeight(); |
2288 m_block->setLogicalHeight(oldLogicalHeight + marginOffset); | 2288 m_block->setLogicalHeight(oldLogicalHeight + marginOffset); |
2289 m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRend
erBox(object)), lastFloatFromPreviousLine, lineInfo, width); | 2289 m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRend
erBox(object)), lastFloatFromPreviousLine, lineInfo, width); |
2290 m_block->setLogicalHeight(oldLogicalHeight); | 2290 m_block->setLogicalHeight(oldLogicalHeight); |
2291 } else if (object->isText() && object->style()->hasTextCombine() && obje
ct->isCombineText() && !toRenderCombineText(object)->isCombined()) { | 2291 } else if (object->isText() && object->style()->hasTextCombine() && obje
ct->isCombineText() && !toRenderCombineText(object)->isCombined()) { |
2292 toRenderCombineText(object)->combineText(); | 2292 toRenderCombineText(object)->combineText(); |
2293 if (toRenderCombineText(object)->isCombined()) | 2293 if (toRenderCombineText(object)->isCombined()) |
2294 continue; | 2294 continue; |
2295 } | 2295 } |
2296 resolver.increment(); | 2296 resolver.increment(); |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3308 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); | 3308 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); |
3309 | 3309 |
3310 setLineGridBox(lineGridBox); | 3310 setLineGridBox(lineGridBox); |
3311 | 3311 |
3312 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying | 3312 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying |
3313 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping | 3313 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping |
3314 // to this grid. | 3314 // to this grid. |
3315 } | 3315 } |
3316 | 3316 |
3317 } | 3317 } |
OLD | NEW |