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 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 3026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3037 | 3037 |
3038 bool preserve3D = useTransforms && (o->style()->preserves3D() || style()->pr
eserves3D()); | 3038 bool preserve3D = useTransforms && (o->style()->preserves3D() || style()->pr
eserves3D()); |
3039 if (useTransforms && shouldUseTransformFromContainer(o)) { | 3039 if (useTransforms && shouldUseTransformFromContainer(o)) { |
3040 TransformationMatrix t; | 3040 TransformationMatrix t; |
3041 getTransformFromContainer(o, containerOffset, t); | 3041 getTransformFromContainer(o, containerOffset, t); |
3042 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate
Transform : TransformState::FlattenTransform); | 3042 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate
Transform : TransformState::FlattenTransform); |
3043 } else | 3043 } else |
3044 transformState.move(containerOffset.width(), containerOffset.height(), p
reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo
rm); | 3044 transformState.move(containerOffset.width(), containerOffset.height(), p
reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo
rm); |
3045 } | 3045 } |
3046 | 3046 |
| 3047 void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, R
enderObject* child, RenderObject* beforeChild, bool fullRemoveInsert) |
| 3048 { |
| 3049 ASSERT(this == child->parent()); |
| 3050 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| 3051 if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObje
ct->isRenderInline())) { |
| 3052 // Takes care of adding the new child correctly if toBlock and fromBlock |
| 3053 // have different kind of children (block vs inline). |
| 3054 toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, chil
d), beforeChild); |
| 3055 } else |
| 3056 toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, v
irtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, f
ullRemoveInsert); |
| 3057 } |
| 3058 |
| 3059 void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject
, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, b
ool fullRemoveInsert) |
| 3060 { |
| 3061 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| 3062 for (RenderObject* child = startChild; child && child != endChild; ) { |
| 3063 // Save our next sibling as moveChildTo will clear it. |
| 3064 RenderObject* nextSibling = child->nextSibling(); |
| 3065 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
| 3066 child = nextSibling; |
| 3067 } |
| 3068 } |
| 3069 |
3047 } // namespace WebCore | 3070 } // namespace WebCore |
OLD | NEW |