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 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2742 if (useTransforms && shouldUseTransformFromContainer(o)) { | 2742 if (useTransforms && shouldUseTransformFromContainer(o)) { |
2743 TransformationMatrix t; | 2743 TransformationMatrix t; |
2744 getTransformFromContainer(o, containerOffset, t); | 2744 getTransformFromContainer(o, containerOffset, t); |
2745 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate
Transform : TransformState::FlattenTransform); | 2745 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate
Transform : TransformState::FlattenTransform); |
2746 } else | 2746 } else |
2747 transformState.move(containerOffset.width(), containerOffset.height(), p
reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo
rm); | 2747 transformState.move(containerOffset.width(), containerOffset.height(), p
reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo
rm); |
2748 } | 2748 } |
2749 | 2749 |
2750 void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, R
enderObject* child, RenderObject* beforeChild, bool fullRemoveInsert) | 2750 void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, R
enderObject* child, RenderObject* beforeChild, bool fullRemoveInsert) |
2751 { | 2751 { |
2752 // FIXME: We need a performant way to handle clearing positioned objects fro
m our list that are | 2752 // We assume that callers have cleared their positioned objects list for chi
ld moves (!fullRemoveInsert) so the |
2753 // in |child|'s subtree so we could just clear them here. Because of this, w
e assume that callers | 2753 // positioned renderer maps don't become stale. It would be too slow to do t
he map lookup on each call. |
2754 // have cleared their positioned objects list for child moves (!fullRemoveIn
sert) to avoid any badness. | |
2755 ASSERT(!fullRemoveInsert || !isRenderBlock() || !toRenderBlock(this)->hasPos
itionedObjects()); | 2754 ASSERT(!fullRemoveInsert || !isRenderBlock() || !toRenderBlock(this)->hasPos
itionedObjects()); |
2756 | 2755 |
2757 ASSERT(this == child->parent()); | 2756 ASSERT(this == child->parent()); |
2758 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2757 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
2759 if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObje
ct->isRenderInline())) { | 2758 if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObje
ct->isRenderInline())) { |
2760 // Takes care of adding the new child correctly if toBlock and fromBlock | 2759 // Takes care of adding the new child correctly if toBlock and fromBlock |
2761 // have different kind of children (block vs inline). | 2760 // have different kind of children (block vs inline). |
2762 toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, chil
d), beforeChild); | 2761 toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, chil
d), beforeChild); |
2763 } else | 2762 } else |
2764 toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, v
irtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, f
ullRemoveInsert); | 2763 toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, v
irtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, f
ullRemoveInsert); |
(...skipping 13 matching lines...) Expand all Loading... |
2778 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2777 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
2779 for (RenderObject* child = startChild; child && child != endChild; ) { | 2778 for (RenderObject* child = startChild; child && child != endChild; ) { |
2780 // Save our next sibling as moveChildTo will clear it. | 2779 // Save our next sibling as moveChildTo will clear it. |
2781 RenderObject* nextSibling = child->nextSibling(); | 2780 RenderObject* nextSibling = child->nextSibling(); |
2782 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2781 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
2783 child = nextSibling; | 2782 child = nextSibling; |
2784 } | 2783 } |
2785 } | 2784 } |
2786 | 2785 |
2787 } // namespace WebCore | 2786 } // namespace WebCore |
OLD | NEW |