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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 return nextToLast; | 295 return nextToLast; |
296 return last; | 296 return last; |
297 } | 297 } |
298 | 298 |
299 void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
ject* beforeChild) | 299 void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
ject* beforeChild) |
300 { | 300 { |
301 // Make sure we don't append things after :after-generated content if we hav
e it. | 301 // Make sure we don't append things after :after-generated content if we hav
e it. |
302 if (!beforeChild && isAfterContent(lastChild())) | 302 if (!beforeChild && isAfterContent(lastChild())) |
303 beforeChild = lastChild(); | 303 beforeChild = lastChild(); |
304 | 304 |
305 if (!newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned()) { | 305 if (!newChild->isInline() && !newChild->isTablePart() && !newChild->isFloati
ngOrOutOfFlowPositioned()) { |
306 // We are placing a block inside an inline. We have to perform a split o
f this | 306 // We are placing a block inside an inline. We have to perform a split o
f this |
307 // inline into continuations. This involves creating an anonymous block
box to hold | 307 // inline into continuations. This involves creating an anonymous block
box to hold |
308 // |newChild|. We then make that block box a continuation of this inlin
e. We take all of | 308 // |newChild|. We then make that block box a continuation of this inlin
e. We take all of |
309 // the children after |beforeChild| and put them in a clone of this obje
ct. | 309 // the children after |beforeChild| and put them in a clone of this obje
ct. |
310 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisp
lay(style(), BLOCK); | 310 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisp
lay(style(), BLOCK); |
311 | 311 |
312 // If inside an inline affected by in-flow positioning the block needs t
o be affected by it too. | 312 // If inside an inline affected by in-flow positioning the block needs t
o be affected by it too. |
313 // Giving the block a layer like this allows it to collect the x/y offse
ts from inline parents later. | 313 // Giving the block a layer like this allows it to collect the x/y offse
ts from inline parents later. |
314 if (RenderObject* positionedAncestor = inFlowPositionedInlineAncestor(th
is)) | 314 if (RenderObject* positionedAncestor = inFlowPositionedInlineAncestor(th
is)) |
315 newStyle->setPosition(positionedAncestor->style()->position()); | 315 newStyle->setPosition(positionedAncestor->style()->position()); |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1577 container = this; | 1577 container = this; |
1578 | 1578 |
1579 FloatPoint absPos = container->localToAbsolute(); | 1579 FloatPoint absPos = container->localToAbsolute(); |
1580 region.bounds.setX(absPos.x() + region.bounds.x()); | 1580 region.bounds.setX(absPos.x() + region.bounds.x()); |
1581 region.bounds.setY(absPos.y() + region.bounds.y()); | 1581 region.bounds.setY(absPos.y() + region.bounds.y()); |
1582 | 1582 |
1583 regions.append(region); | 1583 regions.append(region); |
1584 } | 1584 } |
1585 | 1585 |
1586 } // namespace WebCore | 1586 } // namespace WebCore |
OLD | NEW |