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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 if (o->isLayoutFlowThread()) { | 845 if (o->isLayoutFlowThread()) { |
846 // Descending into a flow thread. Convert to the local coordinate space,
i.e. flow thread coordinates. | 846 // Descending into a flow thread. Convert to the local coordinate space,
i.e. flow thread coordinates. |
847 const LayoutFlowThread* flowThread = toLayoutFlowThread(o); | 847 const LayoutFlowThread* flowThread = toLayoutFlowThread(o); |
848 LayoutPoint visualPoint = LayoutPoint(transformState.mappedPoint()); | 848 LayoutPoint visualPoint = LayoutPoint(transformState.mappedPoint()); |
849 transformState.move(visualPoint - flowThread->visualPointToFlowThreadPoi
nt(visualPoint)); | 849 transformState.move(visualPoint - flowThread->visualPointToFlowThreadPoi
nt(visualPoint)); |
850 // |containerOffset| is also in visual coordinates. Convert to flow thre
ad coordinates. | 850 // |containerOffset| is also in visual coordinates. Convert to flow thre
ad coordinates. |
851 // TODO(mstensho): Wouldn't it be better add a parameter to instruct off
setFromContainer() | 851 // TODO(mstensho): Wouldn't it be better add a parameter to instruct off
setFromContainer() |
852 // to return flowthread coordinates in the first place? We're effectivel
y performing two | 852 // to return flowthread coordinates in the first place? We're effectivel
y performing two |
853 // conversions here, when in fact none is needed. | 853 // conversions here, when in fact none is needed. |
854 containerOffset = toLayoutSize(flowThread->visualPointToFlowThreadPoint(
toLayoutPoint(containerOffset))); | 854 containerOffset = toLayoutSize(flowThread->visualPointToFlowThreadPoint(
toLayoutPoint(containerOffset))); |
855 } else if (!style()->hasOutOfFlowPosition() && o->hasColumns()) { | |
856 LayoutBlock* block = toLayoutBlock(o); | |
857 LayoutPoint point(roundedLayoutPoint(transformState.mappedPoint())); | |
858 point -= containerOffset; | |
859 block->adjustForColumnRect(containerOffset, point); | |
860 } | 855 } |
861 | 856 |
862 bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || styl
e()->preserves3D()); | 857 bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || styl
e()->preserves3D()); |
863 if (mode & UseTransforms && shouldUseTransformFromContainer(o)) { | 858 if (mode & UseTransforms && shouldUseTransformFromContainer(o)) { |
864 TransformationMatrix t; | 859 TransformationMatrix t; |
865 getTransformFromContainer(o, containerOffset, t); | 860 getTransformFromContainer(o, containerOffset, t); |
866 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate
Transform : TransformState::FlattenTransform); | 861 transformState.applyTransform(t, preserve3D ? TransformState::Accumulate
Transform : TransformState::FlattenTransform); |
867 } else { | 862 } else { |
868 transformState.move(containerOffset.width(), containerOffset.height(), p
reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo
rm); | 863 transformState.move(containerOffset.width(), containerOffset.height(), p
reserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransfo
rm); |
869 } | 864 } |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 933 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
939 for (LayoutObject* child = startChild; child && child != endChild; ) { | 934 for (LayoutObject* child = startChild; child && child != endChild; ) { |
940 // Save our next sibling as moveChildTo will clear it. | 935 // Save our next sibling as moveChildTo will clear it. |
941 LayoutObject* nextSibling = child->nextSibling(); | 936 LayoutObject* nextSibling = child->nextSibling(); |
942 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 937 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
943 child = nextSibling; | 938 child = nextSibling; |
944 } | 939 } |
945 } | 940 } |
946 | 941 |
947 } // namespace blink | 942 } // namespace blink |
OLD | NEW |