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

Side by Side 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: revert forAllFrameViews change in FrameView.cpp. I don't know what I was thinking. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef ObjectPaintProperties_h 5 #ifndef ObjectPaintProperties_h
6 #define ObjectPaintProperties_h 6 #define ObjectPaintProperties_h
7 7
8 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 8 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
9 #include "wtf/PassRefPtr.h" 9 #include "wtf/PassRefPtr.h"
10 #include "wtf/RefPtr.h" 10 #include "wtf/RefPtr.h"
(...skipping 11 matching lines...) Expand all
22 // transforms). 22 // transforms).
23 class ObjectPaintProperties { 23 class ObjectPaintProperties {
24 WTF_MAKE_NONCOPYABLE(ObjectPaintProperties); 24 WTF_MAKE_NONCOPYABLE(ObjectPaintProperties);
25 WTF_MAKE_FAST_ALLOCATED(ObjectPaintProperties); 25 WTF_MAKE_FAST_ALLOCATED(ObjectPaintProperties);
26 public: 26 public:
27 static PassOwnPtr<ObjectPaintProperties> create() 27 static PassOwnPtr<ObjectPaintProperties> create()
28 { 28 {
29 return adoptPtr(new ObjectPaintProperties()); 29 return adoptPtr(new ObjectPaintProperties());
30 } 30 }
31 31
32 bool hasTransform() const { return m_transform; } 32 // The hierarchy of transform subtree created by a LayoutObject.
33 // [ paintOffsetTranslation ] Normally paint offset is accumulated without creating a node
34 // | until we see, for example, transform or position:fixed.
35 // +---[ transform ] The space created by CSS transform.
36 // +---[ perspective ] The space created by CSS perspective .
37 // +---[ scrollTranslation ] The space created by overflow clip.
38 void setPaintOffsetTranslation(PassRefPtr<TransformPaintPropertyNode> paintO ffsetTranslation) { m_paintOffsetTranslation = paintOffsetTranslation; }
39 const TransformPaintPropertyNode* paintOffsetTranslation() const { return m_ paintOffsetTranslation.get(); }
40
33 void setTransform(PassRefPtr<TransformPaintPropertyNode> transform) { m_tran sform = transform; } 41 void setTransform(PassRefPtr<TransformPaintPropertyNode> transform) { m_tran sform = transform; }
34 const TransformPaintPropertyNode* transform() const { return m_transform.get (); } 42 const TransformPaintPropertyNode* transform() const { return m_transform.get (); }
35 43
36 bool hasPerspective() const { return m_perspective; }
37 void setPerspective(PassRefPtr<TransformPaintPropertyNode> perspective) { m_ perspective = perspective; } 44 void setPerspective(PassRefPtr<TransformPaintPropertyNode> perspective) { m_ perspective = perspective; }
38 const TransformPaintPropertyNode* perspective() const { return m_perspective .get(); } 45 const TransformPaintPropertyNode* perspective() const { return m_perspective .get(); }
39 46
47 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans lation) { m_scrollTranslation = scrollTranslation; }
48 const TransformPaintPropertyNode* scrollTranslation() const { return m_scrol lTranslation.get(); }
49
40 private: 50 private:
41 ObjectPaintProperties() { } 51 ObjectPaintProperties() { }
42 52
53 RefPtr<TransformPaintPropertyNode> m_paintOffsetTranslation;
43 RefPtr<TransformPaintPropertyNode> m_transform; 54 RefPtr<TransformPaintPropertyNode> m_transform;
44 RefPtr<TransformPaintPropertyNode> m_perspective; 55 RefPtr<TransformPaintPropertyNode> m_perspective;
56 RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
45 }; 57 };
46 58
47 } // namespace blink 59 } // namespace blink
48 60
49 #endif // ObjectPaintProperties_h 61 #endif // ObjectPaintProperties_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698