| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 for (LayoutObject* o = this; o != fromBlock; o = o->parent()) { | 420 for (LayoutObject* o = this; o != fromBlock; o = o->parent()) { |
| 421 topMostInline = toLayoutInline(o); | 421 topMostInline = toLayoutInline(o); |
| 422 if (inlinesToClone.size() < cMaxSplitDepth) | 422 if (inlinesToClone.size() < cMaxSplitDepth) |
| 423 inlinesToClone.append(topMostInline); | 423 inlinesToClone.append(topMostInline); |
| 424 // Keep walking up the chain to ensure |topMostInline| is a child of | 424 // Keep walking up the chain to ensure |topMostInline| is a child of |
| 425 // |fromBlock|, to avoid assertion failure when |fromBlock|'s children are | 425 // |fromBlock|, to avoid assertion failure when |fromBlock|'s children are |
| 426 // moved to |toBlock| below. | 426 // moved to |toBlock| below. |
| 427 } | 427 } |
| 428 | 428 |
| 429 // Create a new clone of the top-most inline in |inlinesToClone|. | 429 // Create a new clone of the top-most inline in |inlinesToClone|. |
| 430 LayoutInline* topMostInlineToClone = inlinesToClone.last(); | 430 LayoutInline* topMostInlineToClone = inlinesToClone.back(); |
| 431 LayoutInline* cloneInline = topMostInlineToClone->clone(); | 431 LayoutInline* cloneInline = topMostInlineToClone->clone(); |
| 432 | 432 |
| 433 // Now we are at the block level. We need to put the clone into the |toBlock|. | 433 // Now we are at the block level. We need to put the clone into the |toBlock|. |
| 434 toBlock->children()->appendChildNode(toBlock, cloneInline); | 434 toBlock->children()->appendChildNode(toBlock, cloneInline); |
| 435 | 435 |
| 436 // Now take all the children after |topMostInline| and remove them from the | 436 // Now take all the children after |topMostInline| and remove them from the |
| 437 // |fromBlock| and put them into the toBlock. | 437 // |fromBlock| and put them into the toBlock. |
| 438 fromBlock->moveChildrenTo(toBlock, topMostInline->nextSibling(), nullptr, | 438 fromBlock->moveChildrenTo(toBlock, topMostInline->nextSibling(), nullptr, |
| 439 true); | 439 true); |
| 440 | 440 |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1512 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
| 1513 } | 1513 } |
| 1514 | 1514 |
| 1515 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1515 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
| 1516 LayoutRect LayoutInline::debugRect() const { | 1516 LayoutRect LayoutInline::debugRect() const { |
| 1517 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1517 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
| 1518 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1518 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
| 1519 } | 1519 } |
| 1520 | 1520 |
| 1521 } // namespace blink | 1521 } // namespace blink |
| OLD | NEW |