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 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 4023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4034 RenderBox* boxToSplit = toRenderBox(beforeChild->parent()); | 4034 RenderBox* boxToSplit = toRenderBox(beforeChild->parent()); |
4035 if (boxToSplit->firstChild() != beforeChild && boxToSplit->isAnonymous()
) { | 4035 if (boxToSplit->firstChild() != beforeChild && boxToSplit->isAnonymous()
) { |
4036 didSplitParentAnonymousBoxes = true; | 4036 didSplitParentAnonymousBoxes = true; |
4037 | 4037 |
4038 // We have to split the parent box into two boxes and move children | 4038 // We have to split the parent box into two boxes and move children |
4039 // from |beforeChild| to end into the new post box. | 4039 // from |beforeChild| to end into the new post box. |
4040 RenderBox* postBox = boxToSplit->createAnonymousBoxWithSameTypeAs(th
is); | 4040 RenderBox* postBox = boxToSplit->createAnonymousBoxWithSameTypeAs(th
is); |
4041 postBox->setChildrenInline(boxToSplit->childrenInline()); | 4041 postBox->setChildrenInline(boxToSplit->childrenInline()); |
4042 RenderBox* parentBox = toRenderBox(boxToSplit->parent()); | 4042 RenderBox* parentBox = toRenderBox(boxToSplit->parent()); |
4043 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo
xToSplit->nextSibling()); | 4043 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo
xToSplit->nextSibling()); |
4044 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, boxToSplit->hasL
ayer()); | 4044 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true); |
4045 | 4045 |
4046 markBoxForRelayoutAfterSplit(boxToSplit); | 4046 markBoxForRelayoutAfterSplit(boxToSplit); |
4047 markBoxForRelayoutAfterSplit(postBox); | 4047 markBoxForRelayoutAfterSplit(postBox); |
4048 | 4048 |
4049 beforeChild = postBox; | 4049 beforeChild = postBox; |
4050 } else | 4050 } else |
4051 beforeChild = boxToSplit; | 4051 beforeChild = boxToSplit; |
4052 } | 4052 } |
4053 | 4053 |
4054 if (didSplitParentAnonymousBoxes) | 4054 if (didSplitParentAnonymousBoxes) |
4055 markBoxForRelayoutAfterSplit(this); | 4055 markBoxForRelayoutAfterSplit(this); |
4056 | 4056 |
4057 ASSERT(beforeChild->parent() == this); | 4057 ASSERT(beforeChild->parent() == this); |
4058 return beforeChild; | 4058 return beforeChild; |
4059 } | 4059 } |
4060 | 4060 |
4061 } // namespace WebCore | 4061 } // namespace WebCore |
OLD | NEW |