Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Side by Side Diff: Source/WebCore/rendering/RenderBoxModelObject.cpp

Issue 10729003: Merge 121001 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 if (useTransforms && shouldUseTransformFromContainer(o)) { 2747 if (useTransforms && shouldUseTransformFromContainer(o)) {
2748 TransformationMatrix t; 2748 TransformationMatrix t;
2749 getTransformFromContainer(o, containerOffset, t); 2749 getTransformFromContainer(o, containerOffset, t);
2750 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate Transform : TransformState::FlattenTransform); 2750 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate Transform : TransformState::FlattenTransform);
2751 } else 2751 } else
2752 transformState.move(containerOffset.width(), containerOffset.height(), p reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo rm); 2752 transformState.move(containerOffset.width(), containerOffset.height(), p reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo rm);
2753 } 2753 }
2754 2754
2755 void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, R enderObject* child, RenderObject* beforeChild, bool fullRemoveInsert) 2755 void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, R enderObject* child, RenderObject* beforeChild, bool fullRemoveInsert)
2756 { 2756 {
2757 // FIXME: We need a performant way to handle clearing positioned objects fro m our list that are
2758 // in |child|'s subtree so we could just clear them here. Because of this, w e assume that callers
2759 // have cleared their positioned objects list for child moves (!fullRemoveIn sert) to avoid any badness.
2760 ASSERT(!fullRemoveInsert || !isRenderBlock() || !toRenderBlock(this)->hasPos itionedObjects());
2761
2757 ASSERT(this == child->parent()); 2762 ASSERT(this == child->parent());
2758 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2763 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2759 if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObje ct->isRenderInline())) { 2764 if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObje ct->isRenderInline())) {
2760 // Takes care of adding the new child correctly if toBlock and fromBlock 2765 // Takes care of adding the new child correctly if toBlock and fromBlock
2761 // have different kind of children (block vs inline). 2766 // have different kind of children (block vs inline).
2762 toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, chil d), beforeChild); 2767 toBoxModelObject->addChild(virtualChildren()->removeChildNode(this, chil d), beforeChild);
2763 } else 2768 } else
2764 toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, v irtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, f ullRemoveInsert); 2769 toBoxModelObject->virtualChildren()->insertChildNode(toBoxModelObject, v irtualChildren()->removeChildNode(this, child, fullRemoveInsert), beforeChild, f ullRemoveInsert);
2765 } 2770 }
2766 2771
2767 void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject , RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, b ool fullRemoveInsert) 2772 void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject , RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, b ool fullRemoveInsert)
2768 { 2773 {
2774 // This condition is rarely hit since this function is usually called on
2775 // anonymous blocks which can no longer carry positioned objects (see r12076 1)
2776 // or when fullRemoveInsert is false.
2777 if (fullRemoveInsert && isRenderBlock()) {
2778 RenderBlock* block = toRenderBlock(this);
2779 if (block->hasPositionedObjects())
2780 block->removePositionedObjects(0);
2781 }
2782
2769 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2783 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2770 for (RenderObject* child = startChild; child && child != endChild; ) { 2784 for (RenderObject* child = startChild; child && child != endChild; ) {
2771 // Save our next sibling as moveChildTo will clear it. 2785 // Save our next sibling as moveChildTo will clear it.
2772 RenderObject* nextSibling = child->nextSibling(); 2786 RenderObject* nextSibling = child->nextSibling();
2773 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2787 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2774 child = nextSibling; 2788 child = nextSibling;
2775 } 2789 }
2776 } 2790 }
2777 2791
2778 } // namespace WebCore 2792 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698