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" |
11 #include "core/frame/Settings.h" | 11 #include "core/frame/Settings.h" |
12 #include "core/layout/LayoutInline.h" | 12 #include "core/layout/LayoutInline.h" |
13 #include "core/layout/LayoutView.h" | 13 #include "core/layout/LayoutView.h" |
14 #include "core/layout/compositing/CompositingReasonFinder.h" | 14 #include "core/layout/compositing/CompositingReasonFinder.h" |
15 #include "core/layout/svg/LayoutSVGResourceMasker.h" | 15 #include "core/layout/svg/LayoutSVGResourceMasker.h" |
16 #include "core/layout/svg/LayoutSVGRoot.h" | 16 #include "core/layout/svg/LayoutSVGRoot.h" |
17 #include "core/layout/svg/SVGLayoutSupport.h" | 17 #include "core/layout/svg/SVGLayoutSupport.h" |
18 #include "core/layout/svg/SVGResources.h" | 18 #include "core/layout/svg/SVGResources.h" |
19 #include "core/layout/svg/SVGResourcesCache.h" | 19 #include "core/layout/svg/SVGResourcesCache.h" |
20 #include "core/paint/FindPaintOffsetAndVisualRectNeedingUpdate.h" | |
21 #include "core/paint/FindPropertiesNeedingUpdate.h" | 20 #include "core/paint/FindPropertiesNeedingUpdate.h" |
22 #include "core/paint/ObjectPaintProperties.h" | 21 #include "core/paint/ObjectPaintProperties.h" |
23 #include "core/paint/PaintLayer.h" | 22 #include "core/paint/PaintLayer.h" |
24 #include "core/paint/SVGRootPainter.h" | 23 #include "core/paint/SVGRootPainter.h" |
25 #include "platform/transforms/TransformationMatrix.h" | 24 #include "platform/transforms/TransformationMatrix.h" |
26 #include "wtf/PtrUtil.h" | 25 #include "wtf/PtrUtil.h" |
27 | 26 |
28 namespace blink { | 27 namespace blink { |
29 | 28 |
30 PaintPropertyTreeBuilderContext::PaintPropertyTreeBuilderContext() | 29 PaintPropertyTreeBuilderContext::PaintPropertyTreeBuilderContext() |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 DCHECK(parentRow && parentRow->isTableRow()); | 1036 DCHECK(parentRow && parentRow->isTableRow()); |
1038 context.current.paintOffset.moveBy( | 1037 context.current.paintOffset.moveBy( |
1039 -toLayoutBox(parentRow)->physicalLocation()); | 1038 -toLayoutBox(parentRow)->physicalLocation()); |
1040 } | 1039 } |
1041 } | 1040 } |
1042 } | 1041 } |
1043 | 1042 |
1044 void PaintPropertyTreeBuilder::updateForObjectLocationAndSize( | 1043 void PaintPropertyTreeBuilder::updateForObjectLocationAndSize( |
1045 const LayoutObject& object, | 1044 const LayoutObject& object, |
1046 PaintPropertyTreeBuilderContext& context) { | 1045 PaintPropertyTreeBuilderContext& context) { |
1047 #if DCHECK_IS_ON() | |
1048 FindPaintOffsetNeedingUpdateScope checkScope(object, context); | |
1049 #endif | |
1050 | |
1051 if (object.isBoxModelObject()) { | 1046 if (object.isBoxModelObject()) { |
1052 updatePaintOffset(toLayoutBoxModelObject(object), context); | 1047 updatePaintOffset(toLayoutBoxModelObject(object), context); |
1053 updatePaintOffsetTranslation(toLayoutBoxModelObject(object), context); | 1048 updatePaintOffsetTranslation(toLayoutBoxModelObject(object), context); |
1054 } | 1049 } |
1055 | 1050 |
1056 if (object.paintOffset() != context.current.paintOffset) { | 1051 if (object.paintOffset() != context.current.paintOffset) { |
1057 // Many paint properties depend on paint offset so we force an update of | 1052 // Many paint properties depend on paint offset so we force an update of |
1058 // the entire subtree on paint offset changes. | 1053 // the entire subtree on paint offset changes. |
1059 context.forceSubtreeUpdate = true; | 1054 context.forceSubtreeUpdate = true; |
1060 | 1055 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 updateOverflowClip(object, context); | 1131 updateOverflowClip(object, context); |
1137 updatePerspective(object, context); | 1132 updatePerspective(object, context); |
1138 updateSvgLocalToBorderBoxTransform(object, context); | 1133 updateSvgLocalToBorderBoxTransform(object, context); |
1139 updateScrollAndScrollTranslation(object, context); | 1134 updateScrollAndScrollTranslation(object, context); |
1140 updateOutOfFlowContext(object, context); | 1135 updateOutOfFlowContext(object, context); |
1141 | 1136 |
1142 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 1137 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
1143 } | 1138 } |
1144 | 1139 |
1145 } // namespace blink | 1140 } // namespace blink |
OLD | NEW |