| 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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 { | 996 { |
| 997 ASSERT(ancestorToStopAt != this); | 997 ASSERT(ancestorToStopAt != this); |
| 998 | 998 |
| 999 bool ancestorSkipped; | 999 bool ancestorSkipped; |
| 1000 LayoutObject* container = this->container(ancestorToStopAt, &ancestorSkipped
); | 1000 LayoutObject* container = this->container(ancestorToStopAt, &ancestorSkipped
); |
| 1001 if (!container) | 1001 if (!container) |
| 1002 return nullptr; | 1002 return nullptr; |
| 1003 | 1003 |
| 1004 bool isInline = isLayoutInline(); | 1004 bool isInline = isLayoutInline(); |
| 1005 bool isFixedPos = !isInline && style()->position() == FixedPosition; | 1005 bool isFixedPos = !isInline && style()->position() == FixedPosition; |
| 1006 bool hasTransform = !isInline && hasLayer() && layer()->transform(); | 1006 bool containsFixedPosition = canContainFixedPositionObjects(); |
| 1007 | 1007 |
| 1008 LayoutSize adjustmentForSkippedAncestor; | 1008 LayoutSize adjustmentForSkippedAncestor; |
| 1009 if (ancestorSkipped) { | 1009 if (ancestorSkipped) { |
| 1010 // There can't be a transform between paintInvalidationContainer and anc
estorToStopAt, because transforms create containers, so it should be safe | 1010 // There can't be a transform between paintInvalidationContainer and anc
estorToStopAt, because transforms create containers, so it should be safe |
| 1011 // to just subtract the delta between the ancestor and ancestorToStopAt. | 1011 // to just subtract the delta between the ancestor and ancestorToStopAt. |
| 1012 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont
ainer(container); | 1012 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont
ainer(container); |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 LayoutSize containerOffset = offsetFromContainer(container); | 1015 LayoutSize containerOffset = offsetFromContainer(container); |
| 1016 bool offsetDependsOnPoint; | 1016 bool offsetDependsOnPoint; |
| 1017 if (isLayoutFlowThread()) { | 1017 if (isLayoutFlowThread()) { |
| 1018 containerOffset += columnOffset(LayoutPoint()); | 1018 containerOffset += columnOffset(LayoutPoint()); |
| 1019 offsetDependsOnPoint = true; | 1019 offsetDependsOnPoint = true; |
| 1020 } else { | 1020 } else { |
| 1021 offsetDependsOnPoint = container->style()->isFlippedBlocksWritingMode()
&& container->isBox(); | 1021 offsetDependsOnPoint = container->style()->isFlippedBlocksWritingMode()
&& container->isBox(); |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 bool preserve3D = container->style()->preserves3D() || style()->preserves3D(
); | 1024 bool preserve3D = container->style()->preserves3D() || style()->preserves3D(
); |
| 1025 GeometryInfoFlags flags = 0; | 1025 GeometryInfoFlags flags = 0; |
| 1026 if (preserve3D) | 1026 if (preserve3D) |
| 1027 flags |= AccumulatingTransform; | 1027 flags |= AccumulatingTransform; |
| 1028 if (offsetDependsOnPoint) | 1028 if (offsetDependsOnPoint) |
| 1029 flags |= IsNonUniform; | 1029 flags |= IsNonUniform; |
| 1030 if (isFixedPos) | 1030 if (isFixedPos) |
| 1031 flags |= IsFixedPosition; | 1031 flags |= IsFixedPosition; |
| 1032 if (hasTransform) | 1032 if (containsFixedPosition) |
| 1033 flags |= HasTransform; | 1033 flags |= ContainsFixedPosition; |
| 1034 if (shouldUseTransformFromContainer(container)) { | 1034 if (shouldUseTransformFromContainer(container)) { |
| 1035 TransformationMatrix t; | 1035 TransformationMatrix t; |
| 1036 getTransformFromContainer(container, containerOffset, t); | 1036 getTransformFromContainer(container, containerOffset, t); |
| 1037 t.translateRight(adjustmentForSkippedAncestor.width().toFloat(), adjustm
entForSkippedAncestor.height().toFloat()); | 1037 t.translateRight(adjustmentForSkippedAncestor.width().toFloat(), adjustm
entForSkippedAncestor.height().toFloat()); |
| 1038 geometryMap.push(this, t, flags, LayoutSize()); | 1038 geometryMap.push(this, t, flags, LayoutSize()); |
| 1039 } else { | 1039 } else { |
| 1040 containerOffset += adjustmentForSkippedAncestor; | 1040 containerOffset += adjustmentForSkippedAncestor; |
| 1041 geometryMap.push(this, containerOffset, flags, LayoutSize()); | 1041 geometryMap.push(this, containerOffset, flags, LayoutSize()); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 if (rootElementStyle->hasBackground()) | 1113 if (rootElementStyle->hasBackground()) |
| 1114 return false; | 1114 return false; |
| 1115 | 1115 |
| 1116 if (node() != document().firstBodyElement()) | 1116 if (node() != document().firstBodyElement()) |
| 1117 return false; | 1117 return false; |
| 1118 | 1118 |
| 1119 return true; | 1119 return true; |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 } // namespace blink | 1122 } // namespace blink |
| OLD | NEW |