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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
index 11af26372097f6b2de63f7de1c718d6f8da8241f..ae5dde1af3d850175ddee40b2719276c1ebb96a8 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
@@ -6,19 +6,26 @@
namespace blink {
-void ObjectPaintProperties::getContentsProperties(GeometryPropertyTreeState& properties) const
chrishtr 2016/09/26 17:09:51 The old code was optimized to remove an extra copy
+GeometryPropertyTreeState ObjectPaintProperties::getContentsProperties() const
{
- properties = localBorderBoxProperties()->geometryPropertyTreeState;
+ const LocalBorderBoxProperties* localBorderBox = localBorderBoxProperties();
+ GeometryPropertyTreeState geometryPropertyTreeState(
+ localBorderBox->propertyTreeState.transform,
+ localBorderBox->propertyTreeState.clip,
+ localBorderBox->propertyTreeState.effect);
if (scrollTranslation())
- properties.transform = scrollTranslation();
+ geometryPropertyTreeState.transform = scrollTranslation();
else if (svgLocalToBorderBoxTransform())
- properties.transform = svgLocalToBorderBoxTransform();
+ geometryPropertyTreeState.transform = svgLocalToBorderBoxTransform();
if (overflowClip())
- properties.clip = overflowClip();
+ geometryPropertyTreeState.clip = overflowClip();
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
- properties.clip = cssClip();
+ geometryPropertyTreeState.clip = cssClip();
+
// TODO(chrishtr): cssClipFixedPosition needs to be handled somehow.
+
+ return geometryPropertyTreeState;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698