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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 if (ancestorSkipped) { | 969 if (ancestorSkipped) { |
970 // There can't be a transform between paintInvalidationContainer and anc
estorToStopAt, because transforms create containers, so it should be safe | 970 // There can't be a transform between paintInvalidationContainer and anc
estorToStopAt, because transforms create containers, so it should be safe |
971 // to just subtract the delta between the ancestor and ancestorToStopAt. | 971 // to just subtract the delta between the ancestor and ancestorToStopAt. |
972 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont
ainer(container); | 972 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont
ainer(container); |
973 } | 973 } |
974 | 974 |
975 bool offsetDependsOnPoint = false; | 975 bool offsetDependsOnPoint = false; |
976 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), &
offsetDependsOnPoint); | 976 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), &
offsetDependsOnPoint); |
977 | 977 |
978 bool preserve3D = container->style()->preserves3D() || style()->preserves3D(
); | 978 bool preserve3D = container->style()->preserves3D() || style()->preserves3D(
); |
| 979 GeometryInfoFlags flags = 0; |
| 980 if (preserve3D) |
| 981 flags |= AccumulatingTransform; |
| 982 if (offsetDependsOnPoint) |
| 983 flags |= IsNonUniform; |
| 984 if (isFixedPos) |
| 985 flags |= IsFixedPosition; |
| 986 if (hasTransform) |
| 987 flags |= HasTransform; |
979 if (shouldUseTransformFromContainer(container)) { | 988 if (shouldUseTransformFromContainer(container)) { |
980 TransformationMatrix t; | 989 TransformationMatrix t; |
981 getTransformFromContainer(container, containerOffset, t); | 990 getTransformFromContainer(container, containerOffset, t); |
982 t.translateRight(adjustmentForSkippedAncestor.width().toFloat(), adjustm
entForSkippedAncestor.height().toFloat()); | 991 t.translateRight(adjustmentForSkippedAncestor.width().toFloat(), adjustm
entForSkippedAncestor.height().toFloat()); |
983 geometryMap.push(this, t, preserve3D, offsetDependsOnPoint, isFixedPos,
hasTransform); | 992 geometryMap.push(this, t, flags); |
984 } else { | 993 } else { |
985 containerOffset += adjustmentForSkippedAncestor; | 994 containerOffset += adjustmentForSkippedAncestor; |
986 geometryMap.push(this, containerOffset, preserve3D, offsetDependsOnPoint
, isFixedPos, hasTransform); | 995 geometryMap.push(this, containerOffset, flags); |
987 } | 996 } |
988 | 997 |
989 return ancestorSkipped ? ancestorToStopAt : container; | 998 return ancestorSkipped ? ancestorToStopAt : container; |
990 } | 999 } |
991 | 1000 |
992 void LayoutBoxModelObject::moveChildTo(LayoutBoxModelObject* toBoxModelObject, L
ayoutObject* child, LayoutObject* beforeChild, bool fullRemoveInsert) | 1001 void LayoutBoxModelObject::moveChildTo(LayoutBoxModelObject* toBoxModelObject, L
ayoutObject* child, LayoutObject* beforeChild, bool fullRemoveInsert) |
993 { | 1002 { |
994 // We assume that callers have cleared their positioned objects list for chi
ld moves (!fullRemoveInsert) so the | 1003 // We assume that callers have cleared their positioned objects list for chi
ld moves (!fullRemoveInsert) so the |
995 // positioned layoutObject maps don't become stale. It would be too slow to
do the map lookup on each call. | 1004 // positioned layoutObject maps don't become stale. It would be too slow to
do the map lookup on each call. |
996 ASSERT(!fullRemoveInsert || !isLayoutBlock() || !toLayoutBlock(this)->hasPos
itionedObjects()); | 1005 ASSERT(!fullRemoveInsert || !isLayoutBlock() || !toLayoutBlock(this)->hasPos
itionedObjects()); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 if (rootElementStyle->hasBackground()) | 1067 if (rootElementStyle->hasBackground()) |
1059 return false; | 1068 return false; |
1060 | 1069 |
1061 if (node() != document().firstBodyElement()) | 1070 if (node() != document().firstBodyElement()) |
1062 return false; | 1071 return false; |
1063 | 1072 |
1064 return true; | 1073 return true; |
1065 } | 1074 } |
1066 | 1075 |
1067 } // namespace blink | 1076 } // namespace blink |
OLD | NEW |