Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2877033002: Fix cc scrollbar layer issues with initialization, and use element ids throughout. (Closed)
Patch Set: none Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 frame_view.SetContentClip(ClipPaintPropertyNode::Create( 70 frame_view.SetContentClip(ClipPaintPropertyNode::Create(
71 std::move(parent), std::move(local_transform_space), clip_rect)); 71 std::move(parent), std::move(local_transform_space), clip_rect));
72 return true; 72 return true;
73 } 73 }
74 74
75 static CompositorElementId CreateDomNodeBasedCompositorElementId( 75 static CompositorElementId CreateDomNodeBasedCompositorElementId(
76 const LayoutObject& object) { 76 const LayoutObject& object) {
77 // TODO(wkorman): Centralize this implementation with similar across 77 // TODO(wkorman): Centralize this implementation with similar across
78 // animation, scrolling and compositing logic. 78 // animation, scrolling and compositing logic.
79 return CreateCompositorElementId(DOMNodeIds::IdForNode(object.GetNode()), 79 return CompositorElementIdFromDOMNodeId(
80 CompositorSubElementId::kPrimary); 80 DOMNodeIds::IdForNode(object.GetNode()),
81 CompositorElementIdNamespace::kPrimary);
81 } 82 }
82 83
83 // True if a new property was created or a main thread scrolling reason changed 84 // True if a new property was created or a main thread scrolling reason changed
84 // (which can affect descendants), false if an existing one was updated. 85 // (which can affect descendants), false if an existing one was updated.
85 static bool UpdateScrollTranslation( 86 static bool UpdateScrollTranslation(
86 FrameView& frame_view, 87 FrameView& frame_view,
87 PassRefPtr<const TransformPaintPropertyNode> parent, 88 PassRefPtr<const TransformPaintPropertyNode> parent,
88 const TransformationMatrix& matrix, 89 const TransformationMatrix& matrix,
89 const FloatPoint3D& origin, 90 const FloatPoint3D& origin,
90 PassRefPtr<const ScrollPaintPropertyNode> scroll_parent, 91 PassRefPtr<const ScrollPaintPropertyNode> scroll_parent,
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 context.force_subtree_update); 1273 context.force_subtree_update);
1273 1274
1274 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate(); 1275 context.force_subtree_update |= object.SubtreeNeedsPaintPropertyUpdate();
1275 } 1276 }
1276 1277
1277 if (object.CanContainAbsolutePositionObjects()) 1278 if (object.CanContainAbsolutePositionObjects())
1278 context.container_for_absolute_position = &object; 1279 context.container_for_absolute_position = &object;
1279 } 1280 }
1280 1281
1281 } // namespace blink 1282 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698