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

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

Issue 2549353002: Implement PaintLayer::scrollsWithViewport for SPv2. (Closed)
Patch Set: Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ObjectPaintProperties.h" 5 #include "core/paint/ObjectPaintProperties.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 ObjectPaintProperties::PropertyTreeStateWithOffset 9 ObjectPaintProperties::PropertyTreeStateWithOffset
10 ObjectPaintProperties::contentsProperties() const { 10 ObjectPaintProperties::contentsProperties() const {
11 ObjectPaintProperties::PropertyTreeStateWithOffset propertiesWithOffset = 11 ObjectPaintProperties::PropertyTreeStateWithOffset propertiesWithOffset =
12 *localBorderBoxProperties(); 12 *localBorderBoxProperties();
13 if (svgLocalToBorderBoxTransform()) { 13 if (svgLocalToBorderBoxTransform()) {
14 propertiesWithOffset.propertyTreeState.setTransform( 14 propertiesWithOffset.propertyTreeState.setTransform(
15 svgLocalToBorderBoxTransform()); 15 svgLocalToBorderBoxTransform());
16 // There's no paint offset for the contents because 16 // There's no paint offset for the contents because
17 // svgLocalToBorderBoxTransform bakes in the paint offset. 17 // svgLocalToBorderBoxTransform bakes in the paint offset.
18 propertiesWithOffset.paintOffset = LayoutPoint(); 18 propertiesWithOffset.paintOffset = LayoutPoint();
19 } else if (scrollTranslation()) { 19 } else if (scrollTranslation()) {
20 propertiesWithOffset.propertyTreeState.setTransform(scrollTranslation()); 20 propertiesWithOffset.propertyTreeState.setTransform(scrollTranslation());
21 } 21 }
22 22
23 if (scroll())
24 propertiesWithOffset.propertyTreeState.setScroll(scroll());
25
23 if (overflowClip()) 26 if (overflowClip())
24 propertiesWithOffset.propertyTreeState.setClip(overflowClip()); 27 propertiesWithOffset.propertyTreeState.setClip(overflowClip());
25 else if (cssClip()) 28 else if (cssClip())
26 propertiesWithOffset.propertyTreeState.setClip(cssClip()); 29 propertiesWithOffset.propertyTreeState.setClip(cssClip());
27 30
28 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. 31 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow.
29 32
30 return propertiesWithOffset; 33 return propertiesWithOffset;
31 } 34 }
32 35
33 } // namespace blink 36 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698