| 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/FindPropertiesNeedingUpdate.h" | 20 #include "core/paint/FindPropertiesNeedingUpdate.h" |
| 21 #include "core/paint/ObjectPaintProperties.h" | 21 #include "core/paint/ObjectPaintProperties.h" |
| 22 #include "core/paint/PaintLayer.h" | 22 #include "core/paint/PaintLayer.h" |
| 23 #include "core/paint/SVGRootPainter.h" | 23 #include "core/paint/SVGRootPainter.h" |
| 24 #include "platform/transforms/TransformationMatrix.h" | 24 #include "platform/transforms/TransformationMatrix.h" |
| 25 #include "wtf/PtrUtil.h" | 25 #include "wtf/PtrUtil.h" |
| 26 | 26 |
| 27 namespace blink { | 27 namespace blink { |
| 28 | 28 |
| 29 PaintPropertyTreeBuilderContext | 29 void PaintPropertyTreeBuilder::setupInitialContext( |
| 30 PaintPropertyTreeBuilder::setupInitialContext() { | 30 PaintPropertyTreeBuilderContext& context) { |
| 31 PaintPropertyTreeBuilderContext context; | |
| 32 context.current.clip = context.absolutePosition.clip = | 31 context.current.clip = context.absolutePosition.clip = |
| 33 context.fixedPosition.clip = ClipPaintPropertyNode::root(); | 32 context.fixedPosition.clip = ClipPaintPropertyNode::root(); |
| 34 context.currentEffect = EffectPaintPropertyNode::root(); | 33 context.currentEffect = EffectPaintPropertyNode::root(); |
| 35 context.inputClipOfCurrentEffect = ClipPaintPropertyNode::root(); | 34 context.inputClipOfCurrentEffect = ClipPaintPropertyNode::root(); |
| 36 context.current.transform = context.absolutePosition.transform = | 35 context.current.transform = context.absolutePosition.transform = |
| 37 context.fixedPosition.transform = TransformPaintPropertyNode::root(); | 36 context.fixedPosition.transform = TransformPaintPropertyNode::root(); |
| 38 context.current.scroll = context.absolutePosition.scroll = | 37 context.current.scroll = context.absolutePosition.scroll = |
| 39 context.fixedPosition.scroll = ScrollPaintPropertyNode::root(); | 38 context.fixedPosition.scroll = ScrollPaintPropertyNode::root(); |
| 40 return context; | |
| 41 } | 39 } |
| 42 | 40 |
| 43 // True if a new property was created, false if an existing one was updated. | 41 // True if a new property was created, false if an existing one was updated. |
| 44 static bool updatePreTranslation( | 42 static bool updatePreTranslation( |
| 45 FrameView& frameView, | 43 FrameView& frameView, |
| 46 PassRefPtr<const TransformPaintPropertyNode> parent, | 44 PassRefPtr<const TransformPaintPropertyNode> parent, |
| 47 const TransformationMatrix& matrix, | 45 const TransformationMatrix& matrix, |
| 48 const FloatPoint3D& origin) { | 46 const FloatPoint3D& origin) { |
| 49 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); | 47 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); |
| 50 if (auto* existingPreTranslation = frameView.preTranslation()) { | 48 if (auto* existingPreTranslation = frameView.preTranslation()) { |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 updateOverflowClip(object, context); | 1125 updateOverflowClip(object, context); |
| 1128 updatePerspective(object, context); | 1126 updatePerspective(object, context); |
| 1129 updateSvgLocalToBorderBoxTransform(object, context); | 1127 updateSvgLocalToBorderBoxTransform(object, context); |
| 1130 updateScrollAndScrollTranslation(object, context); | 1128 updateScrollAndScrollTranslation(object, context); |
| 1131 updateOutOfFlowContext(object, context); | 1129 updateOutOfFlowContext(object, context); |
| 1132 | 1130 |
| 1133 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 1131 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
| 1134 } | 1132 } |
| 1135 | 1133 |
| 1136 } // namespace blink | 1134 } // namespace blink |
| OLD | NEW |