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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp

Issue 2390443002: Unify GeometryPropertyTreeState and PropertyTreeState (Closed)
Patch Set: rebase x2 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 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 40a6133ea4540717dee534e912c77fa637a8c92a..3882ed2b9069c23ffbaf84408e783a9ee0992ea0 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp
@@ -6,26 +6,28 @@
namespace blink {
-void ObjectPaintProperties::getContentsPropertyTreeState(
- GeometryPropertyTreeState& state,
- LayoutPoint& paintOffsetFromState) const {
- state = localBorderBoxProperties()->geometryPropertyTreeState;
+ObjectPaintProperties::PropertyTreeStateWithOffset
+ObjectPaintProperties::contentsProperties() const {
+ ObjectPaintProperties::PropertyTreeStateWithOffset propertiesWithOffset =
+ *localBorderBoxProperties();
if (svgLocalToBorderBoxTransform()) {
- state.transform = svgLocalToBorderBoxTransform();
- // No paint offset from the state because svgLocalToBorderTransform
- // embeds the paint offset in it.
- paintOffsetFromState = LayoutPoint();
- } else {
- if (scrollTranslation())
- state.transform = scrollTranslation();
- paintOffsetFromState = localBorderBoxProperties()->paintOffset;
+ propertiesWithOffset.propertyTreeState.setTransform(
+ svgLocalToBorderBoxTransform());
+ // There's no paint offset for the contents because svgLocalToBorderBoxTransform bakes in
+ // the paint offset.
+ propertiesWithOffset.paintOffset = LayoutPoint();
+ } else if (scrollTranslation()) {
+ propertiesWithOffset.propertyTreeState.setTransform(scrollTranslation());
}
if (overflowClip())
- state.clip = overflowClip();
+ propertiesWithOffset.propertyTreeState.setClip(overflowClip());
else if (cssClip())
- state.clip = cssClip();
+ propertiesWithOffset.propertyTreeState.setClip(cssClip());
+
// TODO(chrishtr): cssClipFixedPosition needs to be handled somehow.
+
+ return propertiesWithOffset;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698