| 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 "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/layout/LayoutInline.h" | 10 #include "core/layout/LayoutInline.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 context.currentEffect = rootFrame.rootEffect(); | 44 context.currentEffect = rootFrame.rootEffect(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void createOrUpdateFrameViewPreTranslation(FrameView& frameView, | 47 void createOrUpdateFrameViewPreTranslation(FrameView& frameView, |
| 48 PassRefPtr<const TransformPaintPropertyNode> parent, | 48 PassRefPtr<const TransformPaintPropertyNode> parent, |
| 49 const TransformationMatrix& matrix, | 49 const TransformationMatrix& matrix, |
| 50 const FloatPoint3D& origin) | 50 const FloatPoint3D& origin) |
| 51 { | 51 { |
| 52 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); | 52 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); |
| 53 if (TransformPaintPropertyNode* existingPreTranslation = frameView.preTransl
ation()) | 53 if (TransformPaintPropertyNode* existingPreTranslation = frameView.preTransl
ation()) |
| 54 existingPreTranslation->update(parent, matrix, origin); | 54 existingPreTranslation->update(std::move(parent), matrix, origin); |
| 55 else | 55 else |
| 56 frameView.setPreTranslation(TransformPaintPropertyNode::create(parent, m
atrix, origin)); | 56 frameView.setPreTranslation(TransformPaintPropertyNode::create(std::move
(parent), matrix, origin)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void createOrUpdateFrameViewContentClip(FrameView& frameView, | 59 void createOrUpdateFrameViewContentClip(FrameView& frameView, |
| 60 PassRefPtr<const ClipPaintPropertyNode> parent, | 60 PassRefPtr<const ClipPaintPropertyNode> parent, |
| 61 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, | 61 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, |
| 62 const FloatRoundedRect& clipRect) | 62 const FloatRoundedRect& clipRect) |
| 63 { | 63 { |
| 64 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); | 64 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); |
| 65 if (ClipPaintPropertyNode* existingContentClip = frameView.contentClip()) | 65 if (ClipPaintPropertyNode* existingContentClip = frameView.contentClip()) |
| 66 existingContentClip->update(parent, localTransformSpace, clipRect); | 66 existingContentClip->update(std::move(parent), std::move(localTransformS
pace), clipRect); |
| 67 else | 67 else |
| 68 frameView.setContentClip(ClipPaintPropertyNode::create(parent, localTran
sformSpace, clipRect)); | 68 frameView.setContentClip(ClipPaintPropertyNode::create(std::move(parent)
, std::move(localTransformSpace), clipRect)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void createOrUpdateFrameViewScrollTranslation(FrameView& frameView, | 71 void createOrUpdateFrameViewScrollTranslation(FrameView& frameView, |
| 72 PassRefPtr<const TransformPaintPropertyNode> parent, | 72 PassRefPtr<const TransformPaintPropertyNode> parent, |
| 73 const TransformationMatrix& matrix, | 73 const TransformationMatrix& matrix, |
| 74 const FloatPoint3D& origin) | 74 const FloatPoint3D& origin) |
| 75 { | 75 { |
| 76 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); | 76 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); |
| 77 if (TransformPaintPropertyNode* existingScrollTranslation = frameView.scroll
Translation()) | 77 if (TransformPaintPropertyNode* existingScrollTranslation = frameView.scroll
Translation()) |
| 78 existingScrollTranslation->update(parent, matrix, origin); | 78 existingScrollTranslation->update(std::move(parent), matrix, origin); |
| 79 else | 79 else |
| 80 frameView.setScrollTranslation(TransformPaintPropertyNode::create(parent
, matrix, origin)); | 80 frameView.setScrollTranslation(TransformPaintPropertyNode::create(std::m
ove(parent), matrix, origin)); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void createOrUpdateFrameViewScroll(FrameView& frameView, | 83 void createOrUpdateFrameViewScroll(FrameView& frameView, |
| 84 PassRefPtr<ScrollPaintPropertyNode> parent, | 84 PassRefPtr<ScrollPaintPropertyNode> parent, |
| 85 PassRefPtr<const TransformPaintPropertyNode> scrollOffset, | 85 PassRefPtr<const TransformPaintPropertyNode> scrollOffset, |
| 86 const IntSize& clip, const IntSize& bounds, | 86 const IntSize& clip, const IntSize& bounds, |
| 87 bool userScrollableHorizontal, | 87 bool userScrollableHorizontal, |
| 88 bool userScrollableVertical) | 88 bool userScrollableVertical) |
| 89 { | 89 { |
| 90 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); | 90 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); |
| 91 if (ScrollPaintPropertyNode* existingScroll = frameView.scroll()) | 91 if (ScrollPaintPropertyNode* existingScroll = frameView.scroll()) |
| 92 existingScroll->update(parent, scrollOffset, clip, bounds, userScrollabl
eHorizontal, userScrollableVertical); | 92 existingScroll->update(std::move(parent), std::move(scrollOffset), clip,
bounds, userScrollableHorizontal, userScrollableVertical); |
| 93 else | 93 else |
| 94 frameView.setScroll(ScrollPaintPropertyNode::create(parent, scrollOffset
, clip, bounds, userScrollableHorizontal, userScrollableVertical)); | 94 frameView.setScroll(ScrollPaintPropertyNode::create(std::move(parent), s
td::move(scrollOffset), clip, bounds, userScrollableHorizontal, userScrollableVe
rtical)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void PaintPropertyTreeBuilder::buildTreeNodes(FrameView& frameView, PaintPropert
yTreeBuilderContext& context) | 97 void PaintPropertyTreeBuilder::buildTreeNodes(FrameView& frameView, PaintPropert
yTreeBuilderContext& context) |
| 98 { | 98 { |
| 99 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 99 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 100 LayoutView* layoutView = frameView.layoutView(); | 100 LayoutView* layoutView = frameView.layoutView(); |
| 101 if (!layoutView) | 101 if (!layoutView) |
| 102 return; | 102 return; |
| 103 | 103 |
| 104 TransformationMatrix frameTranslate; | 104 TransformationMatrix frameTranslate; |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 return; | 573 return; |
| 574 | 574 |
| 575 updateOverflowClip(object, context); | 575 updateOverflowClip(object, context); |
| 576 updatePerspective(object, context); | 576 updatePerspective(object, context); |
| 577 updateSvgLocalToBorderBoxTransform(object, context); | 577 updateSvgLocalToBorderBoxTransform(object, context); |
| 578 updateScrollAndScrollTranslation(object, context); | 578 updateScrollAndScrollTranslation(object, context); |
| 579 updateOutOfFlowContext(object, context); | 579 updateOutOfFlowContext(object, context); |
| 580 } | 580 } |
| 581 | 581 |
| 582 } // namespace blink | 582 } // namespace blink |
| OLD | NEW |