| 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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 | 941 |
| 942 // Before we actually create anything, check whether in-flow context and | 942 // Before we actually create anything, check whether in-flow context and |
| 943 // fixed-position context has exactly the same clip. Reuse if possible. | 943 // fixed-position context has exactly the same clip. Reuse if possible. |
| 944 if (context.fixedPosition.clip == cssClip->parent()) { | 944 if (context.fixedPosition.clip == cssClip->parent()) { |
| 945 context.fixedPosition.clip = cssClip; | 945 context.fixedPosition.clip = cssClip; |
| 946 } else { | 946 } else { |
| 947 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { | 947 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
| 948 auto& properties = | 948 auto& properties = |
| 949 object.getMutableForPainting().ensurePaintProperties(); | 949 object.getMutableForPainting().ensurePaintProperties(); |
| 950 context.forceSubtreeUpdate |= properties.updateCssClipFixedPosition( | 950 context.forceSubtreeUpdate |= properties.updateCssClipFixedPosition( |
| 951 context.fixedPosition.clip, const_cast<TransformPaintPropertyNode*>( | 951 context.fixedPosition.clip, |
| 952 cssClip->localTransformSpace()), | 952 const_cast<TransformPaintPropertyNode*>( |
| 953 cssClip->localTransformSpace()), |
| 953 cssClip->clipRect()); | 954 cssClip->clipRect()); |
| 954 } | 955 } |
| 955 const auto* properties = object.paintProperties(); | 956 const auto* properties = object.paintProperties(); |
| 956 if (properties && properties->cssClipFixedPosition()) | 957 if (properties && properties->cssClipFixedPosition()) |
| 957 context.fixedPosition.clip = properties->cssClipFixedPosition(); | 958 context.fixedPosition.clip = properties->cssClipFixedPosition(); |
| 958 return; | 959 return; |
| 959 } | 960 } |
| 960 } | 961 } |
| 961 | 962 |
| 962 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { | 963 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 updateOverflowClip(object, context); | 1086 updateOverflowClip(object, context); |
| 1086 updatePerspective(object, context); | 1087 updatePerspective(object, context); |
| 1087 updateSvgLocalToBorderBoxTransform(object, context); | 1088 updateSvgLocalToBorderBoxTransform(object, context); |
| 1088 updateScrollAndScrollTranslation(object, context); | 1089 updateScrollAndScrollTranslation(object, context); |
| 1089 updateOutOfFlowContext(object, context); | 1090 updateOutOfFlowContext(object, context); |
| 1090 | 1091 |
| 1091 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 1092 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
| 1092 } | 1093 } |
| 1093 | 1094 |
| 1094 } // namespace blink | 1095 } // namespace blink |
| OLD | NEW |