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

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

Issue 2370553002: Refactor LocalBorderBoxProperties to use PropertyTreeState (Closed)
Patch Set: Rebase from space Created 4 years, 2 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 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 void ObjectPaintProperties::getContentsProperties(GeometryPropertyTreeState& pro perties) const 9 GeometryPropertyTreeState ObjectPaintProperties::getContentsProperties() const
chrishtr 2016/09/26 17:09:51 The old code was optimized to remove an extra copy
10 { 10 {
11 properties = localBorderBoxProperties()->geometryPropertyTreeState; 11 const LocalBorderBoxProperties* localBorderBox = localBorderBoxProperties();
12 GeometryPropertyTreeState geometryPropertyTreeState(
13 localBorderBox->propertyTreeState.transform,
14 localBorderBox->propertyTreeState.clip,
15 localBorderBox->propertyTreeState.effect);
12 if (scrollTranslation()) 16 if (scrollTranslation())
13 properties.transform = scrollTranslation(); 17 geometryPropertyTreeState.transform = scrollTranslation();
14 else if (svgLocalToBorderBoxTransform()) 18 else if (svgLocalToBorderBoxTransform())
15 properties.transform = svgLocalToBorderBoxTransform(); 19 geometryPropertyTreeState.transform = svgLocalToBorderBoxTransform();
16 20
17 if (overflowClip()) 21 if (overflowClip())
18 properties.clip = overflowClip(); 22 geometryPropertyTreeState.clip = overflowClip();
19 else if (cssClip()) 23 else if (cssClip())
szager1 2016/09/24 01:30:17 Is it possible to have both overflow and css clip?
chrishtr 2016/09/26 17:09:51 yes
20 properties.clip = cssClip(); 24 geometryPropertyTreeState.clip = cssClip();
25
21 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow. 26 // TODO(chrishtr): cssClipFixedPosition needs to be handled somehow.
27
28 return geometryPropertyTreeState;
22 } 29 }
23 30
24 } // namespace blink 31 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698