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

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

Issue 1407543003: Preliminary paint property walk implementation for SPv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor bug fix (perspective does not clear paint offset). switch test to unit test style. add a few … Created 5 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.h
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
index 5bce0886dd627a31c625c2b97bb204dfc29e7108..2c42973dbfdd83172195ccaf5ef2ea4860777657 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
@@ -6,6 +6,9 @@
#define ObjectPaintProperties_h
#include "platform/graphics/paint/TransformPaintPropertyNode.h"
+#include "wtf/HashMap.h"
pdr. 2015/10/20 22:02:30 These three extra includes aren't necessary.
trchen 2015/10/21 06:16:19 Done.
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
@@ -29,19 +32,31 @@ public:
return adoptPtr(new ObjectPaintProperties());
}
- bool hasTransform() const { return m_transform; }
+ // The hierarchy of transform subtree created by a LayoutObject.
+ // [ preTranslation ] Normally paint offset is accumulated without creating a node
+ // | until we see, for example, transform or position:fixed.
+ // +---[ transform ] The space created by CSS transform.
+ // +---[ perspective ] The space created by CSS perspective.
+ // +---[ scrollTranslation ] The space created by overflow clip.
+ void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation) { m_preTranslation = preTranslation; }
+ const TransformPaintPropertyNode* preTranslation() const { return m_preTranslation.get(); }
+
void setTransform(PassRefPtr<TransformPaintPropertyNode> transform) { m_transform = transform; }
const TransformPaintPropertyNode* transform() const { return m_transform.get(); }
- bool hasPerspective() const { return m_perspective; }
void setPerspective(PassRefPtr<TransformPaintPropertyNode> perspective) { m_perspective = perspective; }
const TransformPaintPropertyNode* perspective() const { return m_perspective.get(); }
+ void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTranslation) { m_scrollTranslation = scrollTranslation; }
+ const TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTranslation.get(); }
+
private:
ObjectPaintProperties() { }
+ RefPtr<TransformPaintPropertyNode> m_preTranslation;
pdr. 2015/10/20 22:02:30 (bikeshed) m_paintOffsetTranslation may be easier
trchen 2015/10/21 06:16:19 Done.
RefPtr<TransformPaintPropertyNode> m_transform;
RefPtr<TransformPaintPropertyNode> m_perspective;
+ RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698