| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 { | 309 { |
| 310 // Make sure we don't append things after :after-generated content if we hav
e it. | 310 // Make sure we don't append things after :after-generated content if we hav
e it. |
| 311 if (!beforeChild && isAfterContent(lastChild())) | 311 if (!beforeChild && isAfterContent(lastChild())) |
| 312 beforeChild = lastChild(); | 312 beforeChild = lastChild(); |
| 313 | 313 |
| 314 if (!newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned() &&
!newChild->isTablePart()) { | 314 if (!newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned() &&
!newChild->isTablePart()) { |
| 315 // We are placing a block inside an inline. We have to perform a split o
f this | 315 // We are placing a block inside an inline. We have to perform a split o
f this |
| 316 // inline into continuations. This involves creating an anonymous block
box to hold | 316 // inline into continuations. This involves creating an anonymous block
box to hold |
| 317 // |newChild|. We then make that block box a continuation of this inlin
e. We take all of | 317 // |newChild|. We then make that block box a continuation of this inlin
e. We take all of |
| 318 // the children after |beforeChild| and put them in a clone of this obje
ct. | 318 // the children after |beforeChild| and put them in a clone of this obje
ct. |
| 319 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith
Display(containingBlock()->styleRef(), BLOCK); | 319 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith
Display(containingBlock()->styleRef(), EDisplay::Block); |
| 320 | 320 |
| 321 // If inside an inline affected by in-flow positioning the block needs t
o be affected by it too. | 321 // If inside an inline affected by in-flow positioning the block needs t
o be affected by it too. |
| 322 // Giving the block a layer like this allows it to collect the x/y offse
ts from inline parents later. | 322 // Giving the block a layer like this allows it to collect the x/y offse
ts from inline parents later. |
| 323 if (LayoutObject* positionedAncestor = inFlowPositionedInlineAncestor(th
is)) | 323 if (LayoutObject* positionedAncestor = inFlowPositionedInlineAncestor(th
is)) |
| 324 newStyle->setPosition(positionedAncestor->style()->position()); | 324 newStyle->setPosition(positionedAncestor->style()->position()); |
| 325 | 325 |
| 326 LayoutBlockFlow* newBox = LayoutBlockFlow::createAnonymous(&document()); | 326 LayoutBlockFlow* newBox = LayoutBlockFlow::createAnonymous(&document()); |
| 327 newBox->setStyle(newStyle.release()); | 327 newBox->setStyle(newStyle.release()); |
| 328 LayoutBoxModelObject* oldContinuation = continuation(); | 328 LayoutBoxModelObject* oldContinuation = continuation(); |
| 329 setContinuation(newBox); | 329 setContinuation(newBox); |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1379 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
| 1380 LayoutRect LayoutInline::debugRect() const | 1380 LayoutRect LayoutInline::debugRect() const |
| 1381 { | 1381 { |
| 1382 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1382 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
| 1383 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1383 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 } // namespace blink | 1386 } // namespace blink |
| OLD | NEW |