OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/paint/PaintPropertyTreeBuilder.h" | 5 #include "core/paint/PaintPropertyTreeBuilder.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "core/dom/DOMNodeIds.h" | 8 #include "core/dom/DOMNodeIds.h" |
9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 } | 1085 } |
1086 break; | 1086 break; |
1087 } | 1087 } |
1088 case EPosition::kSticky: | 1088 case EPosition::kSticky: |
1089 context.current.paint_offset += object.OffsetForInFlowPosition(); | 1089 context.current.paint_offset += object.OffsetForInFlowPosition(); |
1090 break; | 1090 break; |
1091 case EPosition::kFixed: | 1091 case EPosition::kFixed: |
1092 context.current = context.fixed_position; | 1092 context.current = context.fixed_position; |
1093 break; | 1093 break; |
1094 default: | 1094 default: |
1095 ASSERT_NOT_REACHED(); | 1095 NOTREACHED(); |
1096 } | 1096 } |
1097 | 1097 |
1098 if (object.IsBox()) { | 1098 if (object.IsBox()) { |
1099 // TODO(pdr): Several calls in this function walk back up the tree to | 1099 // TODO(pdr): Several calls in this function walk back up the tree to |
1100 // calculate containers (e.g., physicalLocation, offsetForInFlowPosition*). | 1100 // calculate containers (e.g., physicalLocation, offsetForInFlowPosition*). |
1101 // The containing block and other containers can be stored on | 1101 // The containing block and other containers can be stored on |
1102 // PaintPropertyTreeBuilderContext instead of recomputing them. | 1102 // PaintPropertyTreeBuilderContext instead of recomputing them. |
1103 context.current.paint_offset.MoveBy(ToLayoutBox(object).PhysicalLocation()); | 1103 context.current.paint_offset.MoveBy(ToLayoutBox(object).PhysicalLocation()); |
1104 // This is a weird quirk that table cells paint as children of table rows, | 1104 // This is a weird quirk that table cells paint as children of table rows, |
1105 // but their location have the row's location baked-in. | 1105 // but their location have the row's location baked-in. |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 UpdateOverflowClip(object, context); | 1234 UpdateOverflowClip(object, context); |
1235 UpdatePerspective(object, context); | 1235 UpdatePerspective(object, context); |
1236 UpdateSvgLocalToBorderBoxTransform(object, context); | 1236 UpdateSvgLocalToBorderBoxTransform(object, context); |
1237 UpdateScrollAndScrollTranslation(object, context); | 1237 UpdateScrollAndScrollTranslation(object, context); |
1238 UpdateOutOfFlowContext(object, context); | 1238 UpdateOutOfFlowContext(object, context); |
1239 | 1239 |
1240 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate(); | 1240 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate(); |
1241 } | 1241 } |
1242 | 1242 |
1243 } // namespace blink | 1243 } // namespace blink |
OLD | NEW |