| 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. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 if (!newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned() && | 341 if (!newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned() && |
| 342 !newChild->isTablePart()) { | 342 !newChild->isTablePart()) { |
| 343 // We are placing a block inside an inline. We have to perform a split of | 343 // We are placing a block inside an inline. We have to perform a split of |
| 344 // this inline into continuations. This involves creating an anonymous | 344 // this inline into continuations. This involves creating an anonymous |
| 345 // block box to hold |newChild|. We then make that block box a continuation | 345 // block box to hold |newChild|. We then make that block box a continuation |
| 346 // of this inline. We take all of the children after |beforeChild| and put | 346 // of this inline. We take all of the children after |beforeChild| and put |
| 347 // them in a clone of this object. | 347 // them in a clone of this object. |
| 348 RefPtr<ComputedStyle> newStyle = | 348 RefPtr<ComputedStyle> newStyle = |
| 349 ComputedStyle::createAnonymousStyleWithDisplay( | 349 ComputedStyle::createAnonymousStyleWithDisplay( |
| 350 containingBlock()->styleRef(), EDisplay::Block); | 350 containingBlock()->styleRef(), EDisplay::kBlock); |
| 351 | 351 |
| 352 // If inside an inline affected by in-flow positioning the block needs to be | 352 // If inside an inline affected by in-flow positioning the block needs to be |
| 353 // affected by it too. Giving the block a layer like this allows it to | 353 // affected by it too. Giving the block a layer like this allows it to |
| 354 // collect the x/y offsets from inline parents later. | 354 // collect the x/y offsets from inline parents later. |
| 355 if (LayoutObject* positionedAncestor = inFlowPositionedInlineAncestor(this)) | 355 if (LayoutObject* positionedAncestor = inFlowPositionedInlineAncestor(this)) |
| 356 newStyle->setPosition(positionedAncestor->style()->position()); | 356 newStyle->setPosition(positionedAncestor->style()->position()); |
| 357 | 357 |
| 358 LayoutBlockFlow* newBox = LayoutBlockFlow::createAnonymous(&document()); | 358 LayoutBlockFlow* newBox = LayoutBlockFlow::createAnonymous(&document()); |
| 359 newBox->setStyle(std::move(newStyle)); | 359 newBox->setStyle(std::move(newStyle)); |
| 360 LayoutBoxModelObject* oldContinuation = continuation(); | 360 LayoutBoxModelObject* oldContinuation = continuation(); |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1534 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1534 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
| 1535 } | 1535 } |
| 1536 | 1536 |
| 1537 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1537 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
| 1538 LayoutRect LayoutInline::debugRect() const { | 1538 LayoutRect LayoutInline::debugRect() const { |
| 1539 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1539 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
| 1540 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1540 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
| 1541 } | 1541 } |
| 1542 | 1542 |
| 1543 } // namespace blink | 1543 } // namespace blink |
| OLD | NEW |